GNUmakefile.in 2.04 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
AUTOICONS  = $(wildcard $(SRCDIR)/autostatus-icons/*.gif)
AUTOICONS += $(wildcard $(SRCDIR)/autostatus-icons/*.png)

34
35
36
PIXFILES  = $(wildcard $(SRCDIR)/pix/*.jpg)
PIXFILES += $(wildcard $(SRCDIR)/pix/*.gif)

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

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

install: $(addprefix $(INSTALL_WWWDIR)/, $(ALLFILES)) \
Leigh B. Stoller's avatar
Leigh B. Stoller committed
58
	$(addprefix $(INSTALL_WWWDIR)/pix/, $(ALLPIXES)) \
59
	$(addprefix $(INSTALL_WWWDIR)/tutorial/, $(ALLTUTS)) \
60
61
	$(addprefix $(INSTALL_WWWDIR)/doc/, $(ALLDOCS)) \
	$(addprefix $(INSTALL_WWWDIR)/autostatus-icons/, $(ALLICONS))
62
63
	cd $(INSTALL_WWWDIR) && \
		rm -f tbdb.html; \
64
65
66
		ln -s index.html tbdb.html; \
		rm -f icons; \
		ln -s /usr/local/www/icons icons;
67

68
$(INSTALL_WWWDIR)/%: %
69
	@echo "Installing $<"
70
	-mkdir -p $(patsubst %/,%,$(dir $@))
71
	$(INSTALL_DATA) $< $@