-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile_old
215 lines (183 loc) · 6.27 KB
/
Makefile_old
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# Makefile for ReactiveML
# Taken from Lucid-synchrone
# Organization : SPI team, LIP6 laboratory, University Paris 6
include configure-tools/version
include config
all: config-stamp
(cd compiler; touch .depend; $(MAKE) depend; $(MAKE) $(TARGET))
(cd stdlib; $(MAKE) all)
(cd interpreter; touch .depend; $(MAKE) depend; $(MAKE) all)
(cd toplevel; $(MAKE) all)
(cd tools; $(MAKE) $(TARGET))
config-stamp:
./configure
touch $@
toplevel: FORCE
(cd toplevel; $(MAKE) all)
toplevel-install:
(cd toplevel; $(MAKE) install)
opt: TARGET := opt
opt: all
byte: TARGET := byte
byte: all
.PHONY: install
install:
(cd compiler; $(MAKE) install)
(cd stdlib; $(MAKE) install)
(cd interpreter; $(MAKE) install)
(cd man; $(MAKE) install)
(cd emacs; $(MAKE) install)
(cd toplevel; $(MAKE) install)
(cd tools; $(MAKE) install)
checkinstall: config
checkinstall -D --deldoc=yes --deldesc=yes --nodoc -y --install=no
uninstall:
(cd compiler; $(MAKE) uninstall)
(cd stdlib; $(MAKE) uninstall)
(cd interpreter; $(MAKE) uninstall)
(cd man; $(MAKE) uninstall)
(cd emacs; $(MAKE) uninstall)
(cd toplevel; $(MAKE) uninstall)
(cd tools; $(MAKE) uninstall)
### BEGIN Patch from Serge Leblanc
install.findlib:
@echo "Install ReactiveML interpreter in ocamlfind hierarchy."
@(echo "version = \"$(VERSION)\"" > ./META)
@(cat ./configure-tools/META.in >> ./META)
- [ ! -e ./rmllib.a ] && \
ln -s ./interpreter/rmllib.a ./rmllib.a
- [ ! -e ./rmllib.cma ] && \
ln -s ./interpreter/rmllib.cma ./rmllib.cma
- [ ! -e ./rmllib.cmxa ] && \
ln -s ./interpreter/rmllib.cmxa ./rmllib.cmxa
- [ -r ./META -a -r ./rmllib.a -a -r ./rmllib.cma -a -r ./rmllib.cmxa ] && \
ocamlfind install rmlc ./META ./rmllib.a ./rmllib.cma ./rmllib.cmxa
- rm -rf rmllib.a rmllib.cma rmllib.cmxa
uninstall.findlib:
ocamlfind remove rmlc
### END
doc: dvi
dvi:
(cd doc; $(MAKE) dvi)
html:
(cd doc; $(MAKE) html)
wc:
(cd compiler;$(MAKE) wc)
(cd interpreter; $(MAKE) wc)
(cd toplevel; $(MAKE) wc)
(cd tools; $(MAKE) wc)
clean:
(cd compiler;$(MAKE) clean)
(cd stdlib; $(MAKE) clean)
(cd interpreter; $(MAKE) clean)
(cd toplevel; $(MAKE) clean)
(cd tools; $(MAKE) clean)
(cd man; $(MAKE) clean)
(cd doc; $(MAKE) clean)
(cd patch; $(MAKE) clean)
(cd examples; $(MAKE) clean)
realclean: clean-distrib
(cd compiler;$(MAKE) realclean)
(cd stdlib; $(MAKE) realclean)
(cd interpreter; $(MAKE) realclean)
(cd toplevel; $(MAKE) realclean)
(cd tools; $(MAKE) realclean)
(cd man; $(MAKE) realclean)
(cd doc; $(MAKE) realclean)
(cd patch; $(MAKE) realclean)
(cd examples; $(MAKE) realclean)
rm -rf META
rm -rf config config-stamp Makefile.common distrib/rml/rmlc.in distrib/rml/Makefile *~
touch config
rm -rf configure-tools/rmlbuild.config
cleanall: realclean
# Making distribution
DATE=`date "+%Y-%m-%d"`
public-distrib:
touch config
$(MAKE) realclean
mkdir -p distrib/rml-$(VERSION)-$(DATE)
cp -r compiler interpreter stdlib toplevel tools emacs doc man examples \
distrib/rml-$(VERSION)-$(DATE)
cp -r configure configure-tools patch Makefile CHANGES INSTALL LICENSE \
distrib/rml-$(VERSION)-$(DATE)
mkdir -p distrib/rml-$(VERSION)-$(DATE)/distrib
cp -r distrib/rml distrib/Makefile.byte distrib/Makefile.opt \
distrib/rmlc.in.byte distrib/rmlc.in.opt \
distrib/rml-$(VERSION)-$(DATE)/distrib
(cd distrib/rml-$(VERSION)-$(DATE)/patch; \
$(MAKE) public-distrib)
(cd distrib; \
tar --exclude=CVS --exclude=.svn --exclude=.git -zcvf rml-$(VERSION)-$(DATE).tar.gz rml-$(VERSION)-$(DATE); \
rm -rf rml-$(VERSION)-$(DATE); \
mv rml-$(VERSION)-$(DATE).tar.gz ..)
source-distrib:
touch config
$(MAKE) realclean
mkdir -p distrib/rml-$(VERSION)-$(DATE)
cp -r compiler interpreter stdlib toplevel tools emacs doc man examples \
distrib/rml-$(VERSION)-$(DATE)
cp -r configure configure-tools patch Makefile CHANGES INSTALL LICENSE \
distrib/rml-$(VERSION)-$(DATE)
mkdir -p distrib/rml-$(VERSION)-$(DATE)/distrib
cp -r distrib/rml distrib/Makefile.byte distrib/Makefile.opt \
distrib/rmlc.in.byte distrib/rmlc.in.opt \
distrib/rml-$(VERSION)-$(DATE)/distrib
(cd distrib; \
tar --exclude=CVS --exclude=.svn --exclude=.git -zcvf rml-$(VERSION)-$(DATE).tar.gz rml-$(VERSION)-$(DATE); \
rm -rf rml-$(VERSION)-$(DATE); \
mv rml-$(VERSION)-$(DATE).tar.gz ..)
binary-distrib: binary-distrib.opt
binary-distrib.opt: clean-distrib
touch config
$(MAKE) realclean
./configure
(cd compiler; touch .depend; $(MAKE) depend; $(MAKE) opt)
(cd stdlib; $(MAKE) all)
(cd interpreter; $(MAKE) all)
(cd toplevel; $(MAKE) all)
(cd tools; $(MAKE) opt)
(cd distrib/rml/; \
mkdir bin lib lib/rml; \
cp ../../compiler/rmlc.opt bin/rmlc.opt ; \
cp ../../toplevel/rmltop bin/rmltop ; \
cp ../../stdlib/*.rzi ../../stdlib/*.rmli lib/rml ; \
cp ../../interpreter/*.cma ../../interpreter/*.cmxa ../../interpreter/*.a ../../interpreter/*.cmi lib/rml ; \
cp ../../toplevel/*.cmo ../../toplevel/*.cmi lib/rml ; \
cp ../../tools/rmldep/rmldep.opt bin/rmldep ; \
cp -r ../../emacs . ; \
cp ../Makefile.opt Makefile; \
cp ../rmlc.in.opt rmlc.in; \
cd ..; \
tar --exclude=CVS --exclude=.svn --exclude=.git -zcvf rml-`../compiler/rmlc -version`.opt.tar.gz rml; \
mv rml-`../compiler/rmlc -version`.opt.tar.gz ..)
binary-distrib.byte: clean-distrib
touch config
$(MAKE) realclean
./configure
(cd compiler; touch .depend; $(MAKE) depend; $(MAKE) byte)
(cd stdlib; $(MAKE) all)
(cd interpreter; $(MAKE) all)
(cd toplevel; $(MAKE) all)
(cd tools; $(MAKE) all)
(cd distrib/rml/ ; \
mkdir bin lib lib/rml ; \
cp ../../compiler/rmlc.byte bin/rmlc.byte ; \
cp ../../toplevel/rmltop bin/rmltop ; \
cp ../../stdlib/*.rzi ../../stdlib/*.rmli lib/rml ; \
cp ../../interpreter/*.cma ../../interpreter/*.cmxa ../../interpreter/*.a ../../interpreter/*.cmi lib/rml ; \
cp ../../toplevel/*.cmo ../../toplevel/*.cmi lib/rml ; \
cp ../../tools/rmldep/rmldep.byte bin/rmldep ; \
cp -r ../../emacs . ; \
cp ../Makefile.byte Makefile ; \
cp ../rmlc.in.byte rmlc.in ; \
cd ..; tar --exclude=CVS --exclude=.svn --exclude=.git -zcvf rml-`../compiler/rmlc -version`.byte.tar.gz rml ; \
mv rml-`../compiler/rmlc -version`.byte.tar.gz ..)
clean-distrib:
rm -rf distrib/rml/bin \
distrib/rml/lib \
distrib/rml/emacs \
distrib/rml/man
- rm -f rml-`./compiler/rmlc -version`.*.tar.gz
rm -f rml-$(VERSION)-????-??-??.tar.gz
FORCE: