GNUmakefile.in 1.08 KB
Newer Older
1
2
3
#
# For installation.
#
4
5
6
7
8
9
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= www

include $(OBJDIR)/Makeconf
10
11
12

all:

13
include $(TESTBED_SRCDIR)/GNUmakerules
14

15
16
17
18
19
20
21
22
23
24
25
#
# Generate a list of all the files we want to install from the current
# directory and the source directory. 
# 
FILES	= $(wildcard *.css *.jpg *.gif *.html *.php3)
FILES  += $(wildcard $(SRCDIR)/*.css)
FILES  += $(wildcard $(SRCDIR)/*.jpg)
FILES  += $(wildcard $(SRCDIR)/*.gif)
FILES  += $(wildcard $(SRCDIR)/*.html)
FILES  += $(wildcard $(SRCDIR)/*.php3)

26
27
28
PIXFILES  = $(wildcard $(SRCDIR)/pix/*.jpg)
PIXFILES += $(wildcard $(SRCDIR)/pix/*.gif)

Leigh B. Stoller's avatar
Leigh B. Stoller committed
29
30
DOCFILES  = $(wildcard $(SRCDIR)/doc/*.html)

31
32
33
34
#
# Kill the directory part of the names. The vpath rule will do the rest.
#
ALLFILES = $(notdir $(FILES))
35
ALLPIXES = $(notdir $(PIXFILES))
Leigh B. Stoller's avatar
Leigh B. Stoller committed
36
ALLDOCS  = $(notdir $(DOCFILES))
37
38

install: $(addprefix $(INSTALL_WWWDIR)/, $(ALLFILES)) \
Leigh B. Stoller's avatar
Leigh B. Stoller committed
39
40
	$(addprefix $(INSTALL_WWWDIR)/pix/, $(ALLPIXES)) \
	$(addprefix $(INSTALL_WWWDIR)/doc/, $(ALLDOCS))
41

42
$(INSTALL_WWWDIR)/%: %
43
	@echo "Installing $<"
44
	-mkdir -p $(patsubst %/,%,$(dir $@))
45
	$(INSTALL_DATA) $< $@