GNUmakefile.in 979 Bytes
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)

29
30
31
32
#
# Kill the directory part of the names. The vpath rule will do the rest.
#
ALLFILES = $(notdir $(FILES))
33
34
35
36
37
ALLPIXES = $(notdir $(PIXFILES))

install: $(addprefix $(INSTALL_WWWDIR)/, $(ALLFILES)) \
	$(addprefix $(INSTALL_WWWDIR)/pix/, $(ALLPIXES))

38
$(INSTALL_WWWDIR)/%: %
39
	@echo "Installing $<"
40
	-mkdir -p $(patsubst %/,%,$(dir $@))
41
	$(INSTALL_DATA) $< $@