GNUmakefile.in 1.73 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
41
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.php3)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.ns)
42
TUTFILES += $(SRCDIR)/tutorial/tb_compat.tcl
Leigh B. Stoller's avatar
Leigh B. Stoller committed
43

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

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

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