GNUmakefile.in 1.78 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
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)
29
FILES  += $(SRCDIR)/.htaccess $(SRCDIR)/error.shtml
30

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

Leigh B. Stoller's avatar
Leigh B. Stoller committed
34
DOCFILES  = $(wildcard $(SRCDIR)/doc/*.html)
35
36
37
38
39
40
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)
41
42
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.php3)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.ns)
43
TUTFILES += $(SRCDIR)/tutorial/tb_compat.tcl
Leigh B. Stoller's avatar
Leigh B. Stoller committed
44

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

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

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