-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
154 lines (127 loc) · 3.5 KB
/
Makefile
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#!/usr/bin/make -f
#
# This makefile needs GNU make.
#
TOPDIR=$(CURDIR)
prefix=$(CURDIR)/debian/shoop
moddir=/usr/share/shoop/modules
bindir=/usr/share/shoop
docdir=/usr/share/doc/shoop
mandir=/usr/share/man
empdir=$(docdir)/examples
MODULES_MSG=modules
BINS_MSG=binary
DOCS_MSG=documents
EXAMPLES_MSG=examples
MAN_MSG=man pages
DIRS=$(bindir) $(moddir) $(docdir) $(docdir)/examples
SUBDIRS=modules docs
BINS=\
shoop.sh\
shoop2.sh\
DOCS=\
COPYING\
TODO\
EXAMPLES=\
example.sh\
PKG=shoop
PKG_VER=0.1
TOPDIR=.
tinstall = $(CURDIR)/tmp-install
all:
echo This makefile is only here to run benchmarks or examples,
echo or install shoop, or do regression tests.
echo \ make benchmark
echo \ make example
echo \ make install
echo \ make test
test: SHELL=ash
test:
$(MAKE) installmodules installbins prefix=$(tinstall)
cd $(tinstall); SHOOPPATH=$(tinstall)$(moddir)\
SHOOPMOD=$(tinstall)$(moddir)\
SHOOPSH=$(tinstall)$(bindir)/shoop.sh\
SHOOP2SH=$(tinstall)$(bindir)/shoop2.sh\
CURDIR=$(CURDIR)\
$(SHELL) $(CURDIR)/t/regress\
$(CURDIR)/t/shoop2.sh\
$(CURDIR)/t/ifs.sh\
$(CURDIR)/t/metachars.sh\
$(CURDIR)/t/super.sh\
$(CURDIR)/t/inheritance.sh\
$(CURDIR)/t/shoop_command.sh\
$(CURDIR)/t/ref.sh\
$(CURDIR)/t/list.sh\
$(CURDIR)/t/alist.sh\
$(CURDIR)/t/stack.sh\
$(CURDIR)/t/onexit.sh\
$(CURDIR)/t/serialize.sh\
$(CURDIR)/t/stringutil.sh\
www-test1:
$(MAKE) installbins installmodules prefix=$(tinstall)
cd $(tinstall); SHOOPPATH=$(tinstall)$(moddir)\
SHOOPMOD=$(tinstall)$(moddir)\
SHOOPSH=$(tinstall)$(bindir)/shoop.sh\
SHOOP2SH=$(tinstall)$(bindir)/shoop2.sh\
CURDIR=$(CURDIR)\
$(SHELL) $(CURDIR)/t/benchmark\
$(CURDIR)/t/kbu.bm\
""
www-test2:
$(MAKE) installbins installmodules prefix=$(tinstall)
cd $(tinstall); SHOOPPATH=$(tinstall)$(moddir)\
SHOOPMOD=$(tinstall)$(moddir)\
SHOOPSH=$(tinstall)$(bindir)/shoop.sh\
SHOOP2SH=$(tinstall)$(bindir)/shoop2.sh\
CURDIR=$(CURDIR)\
$(SHELL) $(CURDIR)/t/benchmark\
$(CURDIR)/t/kbhomes.bm\
""
example:
$(MAKE) installbins installmodules prefix=$(tinstall)
cd $(tinstall); SHOOPPATH=$(tinstall)$(moddir)\
SHOOPMOD=$(tinstall)$(moddir)\
SHOOPSH=$(tinstall)$(bindir)/shoop.sh\
SHOOP2SH=$(tinstall)$(bindir)/shoop2.sh\
CURDIR=$(CURDIR)\
$(CURDIR)/example.sh
benchmark:
$(MAKE) installbins installmodules prefix=$(tinstall)
cd $(tinstall); SHOOPPATH=$(tinstall)$(moddir)\
SHOOPMOD=$(tinstall)$(moddir)\
SHOOPSH=$(tinstall)$(bindir)/shoop.sh\
SHOOP2SH=$(tinstall)$(bindir)/shoop2.sh\
CURDIR=$(CURDIR)\
$(SHELL) $(CURDIR)/t/benchmark\
$(CURDIR)/t/benchmark.bm\
"$(bscr)"
clean_dirs=$(tinstall)
clean_files=*~ .\#* ChangeLog docs/modules.pod
#
# Author only targets are below
#
cvs-build:
rm -rf cvs-build
$(MAKE) ChangeLog
tar c --exclude CVS --exclude cvs-build . |\
(mkdir -p cvs-build/$(PKG)-$(PKG_VER);cd cvs-build/$(PKG)-$(PKG_VER);tar x)
docs/modules.pod: utils/shelldoc $(MODULES)
rm -f modules_tmp
$(MAKE) modules_tmp
utils/shelldoc "SHOOP Modules" $$(cat modules_tmp) > $@
rm -f modules_tmp
docs/modules.txt: docs/modules.pod
dyndocs: www/modules.html docs/modules.txt
modules_title=SHOOP Modules
%.txt: %.pod
pod2text < $< > $@
%.html: %.pod
pod2html --title "$($(*F)_title)"< $< > $@
www/modules.html: docs/modules.html
cp -a $< $@
clean_files+=www/modules.html docs/modules.txt docs/modules.html docs/modules.pod
clean_files+=pod2html-dircache pod2html-itemcache
ChangeLog:
utils/mkChangeLog $@
include $(TOPDIR)/Makefile.rules
.PHONY: docs/modules.pod