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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
|
--- mercury-compiler-0.12.2.orig/Mmakefile 2005-01-28 20:11:29.000000000 +1300
+++ mercury-compiler-0.12.2/Mmakefile 2006-08-12 09:45:55.000000000 +1200
@@ -233,6 +233,54 @@
mdbcomp browser trace
+cd deep_profiler && $(SUBDIR_MMAKE)
+libgrades:
+ +for grade in x $(LIBGRADES); do \
+ if [ "$$grade" != "x" -a "$$grade" != "$(GRADE)" ]; then \
+ gc_grade=`scripts/ml --grade $$grade --print-gc-grade`; \
+ TWS=`/bin/pwd`/libgrades/$$grade; \
+ /bin/rm -fr libgrades/$$grade; \
+ mkdir -p libgrades/$$grade; \
+ ( scripts/prepare_tmp_dir_fixed_part $$grade && \
+ scripts/prepare_tmp_dir_grade_part $$grade ) && \
+ ( cd libgrades/$$grade/boehm_gc && \
+ $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade \
+ WORKSPACE=$$TWS GC_GRADE=$$gc_grade \
+ MERCURY_COMPILER=$$TWS/compiler/mercury_compile \
+ libgrade ) && \
+ ( cd libgrades/$$grade/runtime && \
+ $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
+ MERCURY_COMPILER=$$TWS/compiler/mercury_compile \
+ libgrade ) && \
+ ( cd libgrades/$$grade/library && \
+ $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
+ MERCURY_COMPILER=$$TWS/compiler/mercury_compile \
+ depend && \
+ $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
+ MERCURY_COMPILER=$$TWS/compiler/mercury_compile \
+ libgrade ) && \
+ ( cd libgrades/$$grade/mdbcomp && \
+ $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
+ MERCURY_COMPILER=$$TWS/compiler/mercury_compile \
+ depend && \
+ $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
+ MERCURY_COMPILER=$$TWS/compiler/mercury_compile \
+ libgrade ) && \
+ ( cd libgrades/$$grade/browser && \
+ $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
+ MERCURY_COMPILER=$$TWS/compiler/mercury_compile \
+ depend && \
+ $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
+ MERCURY_COMPILER=$$TWS/compiler/mercury_compile \
+ libgrade ) && \
+ ( cd libgrades/$$grade/trace && \
+ $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
+ MERCURY_COMPILER=$$TWS/compiler/mercury_compile \
+ libgrade ) && \
+ true || \
+ exit 1; \
+ fi; \
+ done
+
#-----------------------------------------------------------------------------#
.PHONY: tags
@@ -429,28 +477,13 @@
@echo
@echo "-- Installation complete."
@echo
- @echo "-- Don't forget to add $(INSTALL_BINDIR) to your PATH,"
- @echo "-- $(INSTALL_MAN_DIR) to your MANPATH,"
- @echo "-- and $(INSTALL_INFO_DIR) to your INFOPATH,"
- @if test $(ENABLE_DEEP_PROFILER) != yes || \
- cmp -s deep_profiler/mdprof_cgi \
- $(INSTALL_CGI_DIR)/mdprof_cgi; \
- then true ; else \
- echo "-- to copy deep_profiler/mdprof_cgi" \
- "to $(INSTALL_CGI_DIR),"; \
- fi
- @echo "-- and to add the following lines to the \`.emacs' file"
- @echo "-- in your home directory:"
- @echo " (setq load-path (cons (expand-file-name "
- @echo " \"$(INSTALL_ELISP_DIR)\") load-path))"
- @echo " (autoload 'mdb \"gud\" \"Invoke the Mercury debugger\" t)"
.PHONY: install_main
install_main: all \
install_scripts install_util install_runtime install_boehm_gc \
install_library install_mdbcomp install_browser install_trace \
install_compiler install_profiler install_deep_profiler \
- install_doc install_config
+ install_doc
.PHONY: install_scripts
install_scripts: scripts
@@ -511,7 +544,7 @@
# .trans_opt .trans_opt_date .d .mh .mih .c_date .c .o .pic_o
.PHONY: install_grades
-install_grades: all
+install_grades: all libgrades
#
# Use the newly installed compiler to build the libraries
# in various different grades. We need to override MC=mmc
@@ -519,44 +552,33 @@
# runs the newly installed compiler, rather than using the
# bootstrap compiler.
#
- /bin/rm -fr tmp_dir
- scripts/prepare_tmp_dir_fixed_part
+for grade in x $(LIBGRADES); do \
if [ "$$grade" != "x" -a "$$grade" != "$(GRADE)" ]; then \
gc_grade=`scripts/ml --grade $$grade --print-gc-grade`; \
- TWS=`/bin/pwd`/tmp_dir; \
- scripts/prepare_tmp_dir_grade_part; \
- ( cd tmp_dir/boehm_gc && \
+ TWS=`/bin/pwd`/libgrades/$$grade; \
+ ( cd libgrades/$$grade/boehm_gc && \
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade \
WORKSPACE=$$TWS GC_GRADE=$$gc_grade \
install_lib ) && \
- ( cd tmp_dir/runtime && \
+ ( cd libgrades/$$grade/runtime && \
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
install_lib ) && \
- ( cd tmp_dir/library && \
- $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
- depend && \
+ ( cd libgrades/$$grade/library && \
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
install_library ) && \
- ( cd tmp_dir/mdbcomp && \
- $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
- depend && \
+ ( cd libgrades/$$grade/mdbcomp && \
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
install_library ) && \
- ( cd tmp_dir/browser && \
- $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
- depend && \
+ ( cd libgrades/$$grade/browser && \
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
install_library ) && \
- ( cd tmp_dir/trace && \
+ ( cd libgrades/$$grade/trace && \
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade WORKSPACE=$$TWS \
install_lib ) && \
true || \
- { echo "To clean up from failed install, remove tmp_dir"; \
- exit 1; }; \
+ exit 1; \
fi; \
done
- if test ! -f .leave_tmp_dir; then rm -fr tmp_dir; fi
.PHONY: install_split_library
install_split_library: scripts dep_library
--- mercury-compiler-0.12.2.orig/boehm_gc/Mmakefile 2004-10-19 19:01:36.000000000 +1300
+++ mercury-compiler-0.12.2/boehm_gc/Mmakefile 2006-07-29 09:07:33.000000000 +1200
@@ -90,6 +90,9 @@
.PHONY: force
force:
+.PHONY: libgrade
+libgrade: lib$(GC_GRADE).$A lib$(GC_GRADE).$(EXT_FOR_SHARED_LIB)
+
#-----------------------------------------------------------------------------#
# installation rules
--- mercury-compiler-0.12.2.orig/browser/Mmakefile 2005-01-28 20:11:37.000000000 +1300
+++ mercury-compiler-0.12.2/browser/Mmakefile 2006-07-29 09:19:39.000000000 +1200
@@ -180,6 +180,11 @@
.PHONY: int3s
int3s: $(INT3S_TARGETS)
+.PHONY: libgrade
+libgrade: \
+ lib$(BROWSER_LIB_NAME).$A \
+ lib$(BROWSER_LIB_NAME).$(EXT_FOR_SHARED_LIB)
+
#-----------------------------------------------------------------------------#
tags: $(MTAGS) $($(BROWSER_LIB_NAME).ms)
--- mercury-compiler-0.12.2.orig/library/Mmakefile 2005-05-06 20:01:58.000000000 +1200
+++ mercury-compiler-0.12.2/library/Mmakefile 2006-07-29 10:31:06.000000000 +1200
@@ -194,6 +194,9 @@
trans_opts: $(STD_LIB_NAME).trans_opts
$(STD_LIB_NAME).trans_opts: $($(STD_LIB_NAME).trans_opts)
+.PHONY: libgrade
+libgrade: lib$(STD_LIB_NAME)
+
#-----------------------------------------------------------------------------#
tags: $(MTAGS) $($(STD_LIB_NAME).ms)
--- mercury-compiler-0.12.2.orig/mdbcomp/Mmakefile 2005-02-17 19:39:24.000000000 +1300
+++ mercury-compiler-0.12.2/mdbcomp/Mmakefile 2006-07-29 09:18:15.000000000 +1200
@@ -147,6 +147,13 @@
.PHONY: int3s
int3s: $(INT3S_TARGETS)
+.PHONY: libgrade
+libgrade: \
+ $(mer_mdbcomp.int3s) $(mer_mdbcomp.ints) \
+ lib$(MDBCOMP_LIB_NAME).$A \
+ lib$(MDBCOMP_LIB_NAME).$(EXT_FOR_SHARED_LIB) \
+ all-ints
+
#-----------------------------------------------------------------------------#
tags: $(MTAGS) $($(MDBCOMP_LIB_NAME).ms)
--- mercury-compiler-0.12.2.orig/runtime/Mmakefile 2005-12-05 16:34:46.000000000 +1300
+++ mercury-compiler-0.12.2/runtime/Mmakefile 2006-07-29 09:11:09.000000000 +1200
@@ -376,6 +376,9 @@
@if test ! -f tags; then echo making tags; \
ctags $(CFILES) $(HDRS) $(BODY_HDRS) $(LIB_DLL_H); fi
+.PHONY: libgrade
+libgrade: lib$(RT_LIB_NAME).$A lib$(RT_LIB_NAME).$(EXT_FOR_SHARED_LIB)
+
#-----------------------------------------------------------------------------#
# installation rules
--- mercury-compiler-0.12.2.orig/scripts/prepare_tmp_dir_fixed_part.in 2005-01-28 20:11:59.000000000 +1300
+++ mercury-compiler-0.12.2/scripts/prepare_tmp_dir_fixed_part.in 2006-08-11 21:20:06.000000000 +1200
@@ -12,18 +12,20 @@
fi
wd=`/bin/pwd`
-mkdir tmp_dir
-cp Mmake* tmp_dir
-cp Mercury.* tmp_dir
-cp VERSION tmp_dir
-cp config* tmp_dir
-cp aclocal.m4 tmp_dir
-mkdir tmp_dir/scripts
-cp scripts/* tmp_dir/scripts
-mkdir tmp_dir/tools
-cp tools/* tmp_dir/tools
-$ln_s $wd/compiler tmp_dir
-$ln_s $wd/analysis tmp_dir
-$ln_s $wd/robdd tmp_dir
-$ln_s $wd/util tmp_dir
+libgrade_dir=libgrades/$1
+
+mkdir -p $libgrade_dir
+cp Mmake* $libgrade_dir
+cp Mercury.* $libgrade_dir
+cp VERSION $libgrade_dir
+cp config* $libgrade_dir
+cp aclocal.m4 $libgrade_dir
+mkdir $libgrade_dir/scripts
+cp scripts/* $libgrade_dir/scripts
+mkdir $libgrade_dir/tools
+cp tools/* $libgrade_dir/tools
+$ln_s $wd/compiler $libgrade_dir
+$ln_s $wd/analysis $libgrade_dir
+$ln_s $wd/robdd $libgrade_dir
+$ln_s $wd/util $libgrade_dir
exit 0
--- mercury-compiler-0.12.2.orig/scripts/prepare_tmp_dir_grade_part 2005-01-28 20:11:59.000000000 +1300
+++ mercury-compiler-0.12.2/scripts/prepare_tmp_dir_grade_part 2006-07-29 09:01:18.000000000 +1200
@@ -5,47 +5,49 @@
# Public License - see the file COPYING in the Mercury distribution.
#---------------------------------------------------------------------------#
-rm -fr tmp_dir/boehm_gc
-rm -fr tmp_dir/runtime
-rm -fr tmp_dir/trace
-rm -fr tmp_dir/library
-rm -fr tmp_dir/mdbcomp
-rm -fr tmp_dir/browser
-mkdir tmp_dir/boehm_gc
-mkdir tmp_dir/boehm_gc/Mac_files
-mkdir tmp_dir/boehm_gc/cord
-mkdir tmp_dir/boehm_gc/include
-mkdir tmp_dir/boehm_gc/include/private
-cp boehm_gc/Makefile* tmp_dir/boehm_gc
-cp boehm_gc/Mmake* tmp_dir/boehm_gc
-cp boehm_gc/ac* tmp_dir/boehm_gc
-cp boehm_gc/*.[chsS] tmp_dir/boehm_gc
-cp boehm_gc/Mac_files/*.[ch] tmp_dir/boehm_gc/Mac_files
-cp boehm_gc/cord/*.[ch] tmp_dir/boehm_gc/cord
-cp boehm_gc/include/*.[ch] tmp_dir/boehm_gc/include
-cp boehm_gc/include/private/*.[ch] tmp_dir/boehm_gc/include/private
-mkdir tmp_dir/runtime
-mkdir tmp_dir/runtime/machdeps
-cp runtime/Mmake* tmp_dir/runtime
-cp runtime/*.in tmp_dir/runtime
-cp runtime/*.[ch] tmp_dir/runtime
-cp runtime/*.il tmp_dir/runtime
-cp runtime/machdeps/*.h tmp_dir/runtime/machdeps
-mkdir tmp_dir/trace
-cp trace/Mmake* tmp_dir/trace
-cp trace/*.[ch] tmp_dir/trace
-mkdir tmp_dir/library
-cp library/Mmake* tmp_dir/library
-cp library/Mercury.* tmp_dir/library
-cp library/print_extra_inits tmp_dir/library
-cp library/library_strong_name.sn tmp_dir/library
-cp library/*.m tmp_dir/library
-mkdir tmp_dir/mdbcomp
-cp mdbcomp/Mmake* tmp_dir/mdbcomp
-cp mdbcomp/Mercury.* tmp_dir/mdbcomp
-cp mdbcomp/*.m tmp_dir/mdbcomp
-mkdir tmp_dir/browser
-cp browser/Mmake* tmp_dir/browser
-cp browser/Mercury.* tmp_dir/browser
-cp browser/*.m tmp_dir/browser
+libgrade_dir=libgrades/$1
+
+rm -fr $libgrade_dir/boehm_gc
+rm -fr $libgrade_dir/runtime
+rm -fr $libgrade_dir/trace
+rm -fr $libgrade_dir/library
+rm -fr $libgrade_dir/mdbcomp
+rm -fr $libgrade_dir/browser
+mkdir $libgrade_dir/boehm_gc
+mkdir $libgrade_dir/boehm_gc/Mac_files
+mkdir $libgrade_dir/boehm_gc/cord
+mkdir $libgrade_dir/boehm_gc/include
+mkdir $libgrade_dir/boehm_gc/include/private
+cp boehm_gc/Makefile* $libgrade_dir/boehm_gc
+cp boehm_gc/Mmake* $libgrade_dir/boehm_gc
+cp boehm_gc/ac* $libgrade_dir/boehm_gc
+cp boehm_gc/*.[chsS] $libgrade_dir/boehm_gc
+cp boehm_gc/Mac_files/*.[ch] $libgrade_dir/boehm_gc/Mac_files
+cp boehm_gc/cord/*.[ch] $libgrade_dir/boehm_gc/cord
+cp boehm_gc/include/*.[ch] $libgrade_dir/boehm_gc/include
+cp boehm_gc/include/private/*.[ch] $libgrade_dir/boehm_gc/include/private
+mkdir $libgrade_dir/runtime
+mkdir $libgrade_dir/runtime/machdeps
+cp runtime/Mmake* $libgrade_dir/runtime
+cp runtime/*.in $libgrade_dir/runtime
+cp runtime/*.[ch] $libgrade_dir/runtime
+cp runtime/*.il $libgrade_dir/runtime
+cp runtime/machdeps/*.h $libgrade_dir/runtime/machdeps
+mkdir $libgrade_dir/trace
+cp trace/Mmake* $libgrade_dir/trace
+cp trace/*.[ch] $libgrade_dir/trace
+mkdir $libgrade_dir/library
+cp library/Mmake* $libgrade_dir/library
+cp library/Mercury.* $libgrade_dir/library
+cp library/print_extra_inits $libgrade_dir/library
+cp library/library_strong_name.sn $libgrade_dir/library
+cp library/*.m $libgrade_dir/library
+mkdir $libgrade_dir/mdbcomp
+cp mdbcomp/Mmake* $libgrade_dir/mdbcomp
+cp mdbcomp/Mercury.* $libgrade_dir/mdbcomp
+cp mdbcomp/*.m $libgrade_dir/mdbcomp
+mkdir $libgrade_dir/browser
+cp browser/Mmake* $libgrade_dir/browser
+cp browser/Mercury.* $libgrade_dir/browser
+cp browser/*.m $libgrade_dir/browser
exit 0
--- mercury-compiler-0.12.2.orig/trace/Mmakefile 2005-01-28 20:12:05.000000000 +1300
+++ mercury-compiler-0.12.2/trace/Mmakefile 2006-07-29 09:22:09.000000000 +1200
@@ -179,6 +179,9 @@
@if test ! -f tags; then echo making tags; \
ctags $(CFILES) $(HDRS) $(RUNTIME_DIR)/*.c $(RUNTIME_DIR)/*.h ; fi
+.PHONY: libgrade
+libgrade: lib$(TRACE_LIB_NAME).$A lib$(TRACE_LIB_NAME).$(EXT_FOR_SHARED_LIB)
+
#-----------------------------------------------------------------------------#
# installation rules
|