GNUmakefile.in 2.72 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
DOCFILES += $(wildcard $(SRCDIR)/doc/*.jpg)
DOCFILES += $(wildcard $(SRCDIR)/doc/*.gif)
40
DOCFILES += $(wildcard $(SRCDIR)/doc/*.php3)
41
42
43
44

TUTFILES  = $(wildcard $(SRCDIR)/tutorial/*.html)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.jpg)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.gif)
45
46
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.php3)
TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.ns)
47
TUTFILES += $(SRCDIR)/tutorial/tb_compat.tcl
Leigh B. Stoller's avatar
Leigh B. Stoller committed
48

49
50
51
52
53
54
BUIFILES  = $(wildcard $(SRCDIR)/buildui/*.html)
BUIFILES += $(wildcard $(SRCDIR)/buildui/*.jpg)
BUIFILES += $(wildcard $(SRCDIR)/buildui/*.gif)
BUIFILES += $(wildcard $(SRCDIR)/buildui/*.php3)
BUIFILES += $(wildcard $(SRCDIR)/buildui/*.class)

Leigh B. Stoller's avatar
Leigh B. Stoller committed
55
56
WEBDBFILES = $(wildcard $(SRCDIR)/webdb/*.php3)

57
58
59
60
#
# Kill the directory part of the names. The vpath rule will do the rest.
#
ALLFILES = $(notdir $(FILES))
61
ALLPIXES = $(notdir $(PIXFILES))
Leigh B. Stoller's avatar
Leigh B. Stoller committed
62
ALLDOCS  = $(notdir $(DOCFILES))
63
ALLTUTS  = $(notdir $(TUTFILES))
64
ALLICONS = $(notdir $(AUTOICONS))
Leigh B. Stoller's avatar
Leigh B. Stoller committed
65
ALLWEBDB = $(notdir $(WEBDBFILES))
66
ALLBUI   = $(notdir $(BUIFILES))
67
68

install: $(addprefix $(INSTALL_WWWDIR)/, $(ALLFILES)) \
Leigh B. Stoller's avatar
Leigh B. Stoller committed
69
	$(addprefix $(INSTALL_WWWDIR)/pix/, $(ALLPIXES)) \
70
	$(addprefix $(INSTALL_WWWDIR)/tutorial/, $(ALLTUTS)) \
71
	$(addprefix $(INSTALL_WWWDIR)/doc/, $(ALLDOCS)) \
Leigh B. Stoller's avatar
Leigh B. Stoller committed
72
	$(addprefix $(INSTALL_WWWDIR)/webdb/, $(ALLWEBDB)) \
73
	$(addprefix $(INSTALL_WWWDIR)/buildui/, $(ALLBUI)) \
74
	$(addprefix $(INSTALL_WWWDIR)/autostatus-icons/, $(ALLICONS))
75
	cd $(INSTALL_WWWDIR) && \
76
77
78
79
80
81
		if test -d ../webglimpse; \
		then \
			rm -f webglimpse; \
			ln -s ../webglimpse webglimpse; \
			(cd webglimpse && wgreindex -q); \
		fi; \
82
		rm -f tbdb.html; \
83
84
85
		ln -s index.html tbdb.html; \
		rm -f icons; \
		ln -s /usr/local/www/icons icons;
86

87

88
$(INSTALL_WWWDIR)/%: %
89
	@echo "Installing $<"
90
	-mkdir -p $(patsubst %/,%,$(dir $@))
91
	$(INSTALL_DATA) $(subst $$,\$$,$<) $(subst $$,\$$,$@)