-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
101 lines (87 loc) · 2.71 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
.PHONY: doc pkgdoc www initdir install uninstall dist clean distclean
CURRENT_VERSION := $(shell grep '^set MODULES_CURRENT_VERSION' \
modulecmd.tcl | cut -d ' ' -f 3)
DIST_PREFIX := modules-tcl-$(CURRENT_VERSION)
# set default installation paths
prefix := @prefix@
bindir := @bindir@
libexecdir := @libexecdir@
initdir := @initdir@
modulefilesdir := @modulefilesdir@
datarootdir := @datarootdir@
mandir := @mandir@
docdir := @docdir@
# modulepaths and modulefiles to enable in default config
modulepath := @modulepath@
loadedmodules := @loadedmodules@
# path to C version installation
cverinitdir := @cverinitdir@
cverbindir := @cverbindir@
cvermandir := @cvermandir@
# enable or not some specific definition
setmanpath := @setmanpath@
setbinpath := @setbinpath@
setswitchml := @setswitchml@
setdotmodulespath := @setdotmodulespath@
usecverdotmodulespath := @usecverdotmodulespath@
all: initdir pkgdoc ChangeLog
initdir:
make -C init all
pkgdoc:
make -C doc man txt
doc:
make -C doc all
www:
make -C www all
ChangeLog:
contrib/gitlog2changelog.py
install: ChangeLog
mkdir -p $(DESTDIR)$(libexecdir)
mkdir -p $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(docdir)
cp modulecmd.tcl $(DESTDIR)$(libexecdir)/
chmod +x $(DESTDIR)$(libexecdir)/modulecmd.tcl
cp contrib/envml $(DESTDIR)$(bindir)/
chmod +x $(DESTDIR)$(bindir)/envml
cp COPYING.GPLv2 $(DESTDIR)$(docdir)/
cp ChangeLog $(DESTDIR)$(docdir)/
cp NEWS $(DESTDIR)$(docdir)/
cp README.txt $(DESTDIR)$(docdir)/README
cp INSTALL.txt $(DESTDIR)$(docdir)/INSTALL
make -C init install DESTDIR=$(DESTDIR)
make -C doc install DESTDIR=$(DESTDIR)
uninstall:
rm -f $(DESTDIR)$(libexecdir)/modulecmd.tcl
rm -f $(DESTDIR)$(bindir)/envml
rm -f $(addprefix $(DESTDIR)$(docdir)/,ChangeLog NEWS README INSTALL COPYING.GPLv2)
make -C init uninstall DESTDIR=$(DESTDIR)
make -C doc uninstall DESTDIR=$(DESTDIR)
rmdir $(DESTDIR)$(libexecdir)
rmdir $(DESTDIR)$(bindir)
rmdir $(DESTDIR)$(datarootdir)
rmdir $(DESTDIR)$(prefix)
dist: ChangeLog
git archive --prefix=$(DIST_PREFIX)/ --worktree-attributes \
-o $(DIST_PREFIX).tar HEAD
tar -rf $(DIST_PREFIX).tar --transform 's,^,$(DIST_PREFIX)/,' ChangeLog
gzip -f -9 $(DIST_PREFIX).tar
clean:
rm -f *.log *.sum
ifeq ($(wildcard .git) $(wildcard contrib/gitlog2changelog.py),.git contrib/gitlog2changelog.py)
rm -f ChangeLog
endif
rm -f modules-tcl-*.tar.gz
make -C init clean
make -C doc clean
ifneq ($(wildcard www),)
make -C www clean
endif
distclean: clean
rm -f Makefile
make -C init distclean
make -C doc distclean
test:
MODULEVERSION=Tcl; export MODULEVERSION; \
OBJDIR=`pwd -P`; export OBJDIR; \
TESTSUITEDIR=`cd testsuite;pwd -P`; export TESTSUITEDIR; \
runtest --srcdir $$TESTSUITEDIR --objdir $$OBJDIR $(RUNTESTFLAGS) --tool modules