GNUmakefile.in 1.63 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
13
14
15
#
# Force dependencies to make sure configure regenerates if the .in file
# is changed.
# 
all: defs.php3 dbdefs.php3
16

17
include $(TESTBED_SRCDIR)/GNUmakerules
18

19
20
21
#
# Generate a list of all the files we want to install from the current
# directory and the source directory. 
22
#
23
24
25
26
27
28
29
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)

30
31
32
PIXFILES  = $(wildcard $(SRCDIR)/pix/*.jpg)
PIXFILES += $(wildcard $(SRCDIR)/pix/*.gif)

Leigh B. Stoller's avatar
Leigh B. Stoller committed
33
DOCFILES  = $(wildcard $(SRCDIR)/doc/*.html)
34
35
36
37
38
39
DOCFILES += $(wildcard $(SRCDIR)/doc/*.jpg)
DOCFILES += $(wildcard $(SRCDIR)/doc/*.gif)

TUTFILES  = $(wildcard $(SRCDIR)/tutorial/*.html)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.jpg)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.gif)
40
TUTFILES += $(SRCDIR)/tutorial/tb_compat.tcl
Leigh B. Stoller's avatar
Leigh B. Stoller committed
41

42
43
44
45
#
# Kill the directory part of the names. The vpath rule will do the rest.
#
ALLFILES = $(notdir $(FILES))
46
ALLPIXES = $(notdir $(PIXFILES))
Leigh B. Stoller's avatar
Leigh B. Stoller committed
47
ALLDOCS  = $(notdir $(DOCFILES))
48
ALLTUTS  = $(notdir $(TUTFILES))
49
50

install: $(addprefix $(INSTALL_WWWDIR)/, $(ALLFILES)) \
Leigh B. Stoller's avatar
Leigh B. Stoller committed
51
	$(addprefix $(INSTALL_WWWDIR)/pix/, $(ALLPIXES)) \
52
	$(addprefix $(INSTALL_WWWDIR)/tutorial/, $(ALLTUTS)) \
Leigh B. Stoller's avatar
Leigh B. Stoller committed
53
	$(addprefix $(INSTALL_WWWDIR)/doc/, $(ALLDOCS))
54
55
56
	cd $(INSTALL_WWWDIR) && \
		rm -f tbdb.html; \
		ln -s index.html tbdb.html;
57

58
$(INSTALL_WWWDIR)/%: %
59
	@echo "Installing $<"
60
	-mkdir -p $(patsubst %/,%,$(dir $@))
61
	$(INSTALL_DATA) $< $@