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
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
|
## file melt-make.mk
## a -*- Makefile -*- fragment for GNU make.
# Copyright (C) 2009 Free Software Foundation, Inc.
# Contributed by Basile Starynkevitch <basile@starynkevitch.net>
# This file is part of GCC.
# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# GCC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
## this file is *not* preprocessed by any autoconf trickery.
## it is just included by GNU make
## the following Makefile variables are expected to be set
### melt_private_include_dir - header files for MELT generated C code
### melt_source_dir - directory containing *.melt (& corresponding *.c) file
### melt_module_dir - directory containing *.so MELT module files
### melt_compile_script - script file to compile MELT generated *.c files
### melt_make_compile_script - likewise when making MELT
### melt_make_source_dir - directory containing the *.melt files when making MELT
### melt_make_module_dir - directory containing the *.so files when making MELT
### melt_default_modules_list - basename of the default module list
### melt_cc1 - cc1 program with MELT (or loading MELT plugin)
### melt_is_plugin - should be non empty in plugin mode
### melt_make_move - a copy or move command for files
## the various arguments to MELT - avoid spaces in them!
meltarg_mode=$(if $(melt_is_plugin),-fplugin-arg-melt-mode,-fmelt)
meltarg_init=$(if $(melt_is_plugin),-fplugin-arg-melt-init,-fmelt-init)
meltarg_module_path=$(if $(melt_is_plugin),-fplugin-arg-melt-module-path,-fmelt-module-path)
meltarg_source_path=$(if $(melt_is_plugin),-fplugin-arg-melt-source-path,-fmelt-source-path)
meltarg_tempdir=$(if $(melt_is_plugin),-fplugin-arg-melt-tempdir,-fmelt-tempdir)
meltarg_compile_script=$(if $(melt_is_plugin),-fplugin-arg-melt-compile-script,-fmelt-compile-script)
meltarg_arg=$(if $(melt_is_plugin),-fplugin-arg-melt-arg,-fmelt-arg)
meltarg_arglist=$(if $(melt_is_plugin),-fplugin-arg-melt-arglist,-fmelt-arglist)
meltarg_output=$(if $(melt_is_plugin),-fplugin-arg-melt-output,-fmelt-output)
## MELT_DEBUG could be set to -fmelt-debug or -fplugin-arg-melt-debug
## the invocation to translate the very first initial MELT file
MELTCCINIT1=$(melt_cc1) $(melt_cc1flags) -Wno-shadow $(meltarg_mode)=translateinit \
$(meltarg_module_path)=.:$(melt_make_module_dir) \
$(meltarg_source_path)=.:$(melt_make_source_dir):$(melt_source_dir) \
$(meltarg_compile_script)=$(melt_make_compile_script) \
$(meltarg_tempdir)=. $(MELT_DEBUG)
## the invocation to translate the other files
MELTCCFILE1=$(melt_cc1) $(melt_cc1flags) -Wno-shadow $(meltarg_mode)=translatefile \
$(meltarg_module_path)=.:$(melt_make_module_dir) \
$(meltarg_source_path)=.:$(melt_make_source_dir):$(melt_source_dir) \
$(meltarg_compile_script)=$(melt_make_compile_script) \
$(meltarg_tempdir)=. $(MELT_DEBUG)
vpath %.so $(melt_make_module_dir) .
vpath %.c $(melt_make_source_dir) . $(melt_source_dir)
vpath %.melt $(melt_make_source_dir) . $(melt_source_dir)
## all the warm*.so need ./built-melt-cc-script to be built, but we
## don't add a dependency to avoid them being rebuilt at install time.
##
warmelt-%-0.d.so: warmelt-%-0.c $(melt_make_compile_script)
$(melt_make_compile_script) -d $< $@
warmelt-%-h.d.so: warmelt-%-h.c $(melt_make_compile_script)
$(melt_make_compile_script) -d $< $@
warmelt-%-h2.d.so: warmelt-%-h2.c $(melt_make_compile_script)
$(melt_make_compile_script) -d $< $@
warm%.n.so: warm%.c $(melt_make_compile_script)
$(melt_make_compile_script) -n $< $@
## warmeltbig*.c is so big that it can only be compiled with -O0
warmeltbig-%.so: warmeltbig-%.c $(melt_make_compile_script)
$(melt_make_compile_script) -O0 $< $@
warm%.so: warm%.c $(melt_make_compile_script)
$(melt_make_compile_script) $< $@
###
ana%.n.so: ana%.c $(melt_make_compile_script)
$(melt_make_compile_script) -n $< $@
ana%.d.so: ana%.c $(melt_make_compile_script)
$(melt_make_compile_script) -d $< $@
ana%.so: ana%.c $(melt_make_compile_script)
$(melt_make_compile_script) $< $@
## the warmelt files - order is important!
WARMELT_RESTFILES= \
warmelt-macro.melt \
warmelt-normal.melt \
warmelt-normatch.melt \
warmelt-genobj.melt \
warmelt-outobj.melt
WARMELT_FILES= warmelt-first.melt $(WARMELT_RESTFILES)
WARMELT_SRCFILES= $(patsubst %.melt, $(melt_make_source_dir)/%.melt, $(WARMELT_FILES))
WARMELT_SRCRESTFILES= $(patsubst %.melt, $(melt_make_source_dir)/%.melt, $(WARMELT_RESTFILES))
WARMELT_SRCARGLIST:=$(shell echo $(realpath $(WARMELT_SRCFILES))|sed 's: :,:g')
WARMELT_BASE= $(basename $(WARMELT_FILES))
WARMELT_REST= $(basename $(WARMELT_RESTFILES))
WARMELT_BASELIST:=$(shell echo $(WARMELT_BASE)|sed 's: :,:g')
WARMELT_BASE0= $(patsubst %, %-0, $(WARMELT_BASE))
WARMELT_BASE0C= $(patsubst %, %-0.c, $(WARMELT_BASE))
WARMELT_BASE0SO= $(patsubst %, %-0.so, $(WARMELT_BASE))
## the file warmelt-first should never be C compiled in "dynamic"
## mode, otherwise it cannot have private [non-exported] classes like
## class_delayed_queue
WARMELT_BASE0DSO= warmelt-first-0.so $(patsubst %, %-0.d.so, $(WARMELT_REST))
WARMELT_BASE0ROW:=$(shell echo $(WARMELT_BASE0)|sed 's/ /:/g')
WARMELT_BASE0DROW:=$(shell echo $(patsubst %, %-0.d, $(WARMELT_BASE))|sed 's/ /:/g')
##
WARMELT_BASEH= $(patsubst %, %-h, $(WARMELT_BASE))
WARMELT_BASEHSO= $(patsubst %, %-h.so, $(WARMELT_BASE))
WARMELT_BASEHDSO= warmelt-first-h.so $(patsubst %, %-h.d.so, $(WARMELT_REST))
WARMELT_BASEHC= $(patsubst %, %-h.c, $(WARMELT_BASE))
WARMELT_BASEHROW:=$(shell echo $(WARMELT_BASEH)|sed 's/ /:/g')
WARMELT_BASEHDROW:=$(shell echo $(patsubst %, %-h.d, $(WARMELT_BASE))|sed 's/ /:/g')
##
##
WARMELT_BASEH2= $(patsubst %, %-h2, $(WARMELT_BASE))
WARMELT_BASEH2SO= $(patsubst %, %-h2.so, $(WARMELT_REST))
WARMELT_BASEH2DSO= warmelt-first-h2.so $(patsubst %, %-h2.d.so, $(WARMELT_BASE))
WARMELT_BASEH2C= $(patsubst %, %-h2.c, $(WARMELT_BASE))
WARMELT_BASEH2ROW:=$(shell echo $(WARMELT_BASEH2)|sed 's/ /:/g')
##
WARMELT_BASE1= $(patsubst %, %-1, $(WARMELT_BASE))
WARMELT_BASE1SO= $(patsubst %, %-1.so, $(WARMELT_BASE))
WARMELT_BASE1NSO= $(patsubst %, %-1.n.so, $(WARMELT_BASE))
WARMELT_BASE1C= $(patsubst %, %-1.c, $(WARMELT_BASE))
WARMELT_BASE1ROW:=$(shell echo $(WARMELT_BASE1)|sed 's/ /:/g')
##
WARMELT_BASE2= $(patsubst %, %-2, $(WARMELT_BASE))
WARMELT_BASE2SO= $(patsubst %, %-2.so, $(WARMELT_BASE))
WARMELT_BASE2NSO= $(patsubst %, %-2.n.so, $(WARMELT_BASE))
WARMELT_BASE2C= $(patsubst %, %-2.c, $(WARMELT_BASE))
WARMELT_BASE2ROW:=$(shell echo $(WARMELT_BASE2)|sed 's/ /:/g')
##
WARMELT_BASE3= $(patsubst %, %-3, $(WARMELT_BASE))
WARMELT_BASE3SO= $(patsubst %, %-3.so, $(WARMELT_BASE))
WARMELT_BASE3C= $(patsubst %, %-3.c, $(WARMELT_BASE))
WARMELT_BASE3ROW:=$(shell echo $(WARMELT_BASE3)|sed 's/ /:/g')
## force a dependency
$(WARMELT_BASE0SO): empty-file-for-melt.c run-melt.h melt-runtime.h
################
## the analysis MELT files. They are not needed to bootstrap the MELT
## translation, but they are needed to make any MELT analysis of a GCC
## compiled source
## order is important
ANAMELT_FILES= ana-base.melt ana-simple.melt
ANAMELT_SRCFILES= $(patsubst %.melt, $(melt_make_source_dir)/%.melt, $(ANAMELT_FILES))
ANAMELT_SRCARGLIST:=$(shell echo $(realpath $(ANAMELT_SRCFILES))|sed 's: :,:g')
ANAMELT_BASE= $(basename $(ANAMELT_FILES))
ANAMELT_BASELIST:=$(shell echo $(ANAMELT_BASE)|sed 's: :,:g')
ANAMELT_BASESO= $(patsubst %, %.so, $(ANAMELT_BASE))
ANAMELT_BASEC= $(patsubst %, %.c, $(ANAMELT_BASE))
ANAMELT_BASEROW:=$(shell echo $(ANAMELT_BASE)|sed 's/ /:/g')
## keep the generated warm*.c files!
.SECONDARY:$(WARMELT_BASE1C) $(WARMELT_BASE2C) $(WARMELT_BASE3C) $(ANAMELT_BASEC) $(WARMELT_BASEHC) $(WARMELT_BASEH2C)
warmelt0.modlis: $(WARMELT_BASE0DSO)
date +"#$@ generated %F" > $@-tmp
for f in $(WARMELT_BASE0); do echo $$f >> $@-tmp; done
$(melt_make_move) $@-tmp $@
##
warmelt1.modlis: $(WARMELT_BASE1SO)
date +"#$@ generated %F" > $@-tmp
for f in $(WARMELT_BASE1); do echo $$f >> $@-tmp; done
$(melt_make_move) $@-tmp $@
warmelt1n.modlis: $(WARMELT_BASE1NSO)
date +"#$@ generated %F" > $@-tmp
for f in $(WARMELT_BASE1); do echo $$f.n >> $@-tmp; done
$(melt_make_move) $@-tmp $@
### we need ad hoc rules, since warmelt-first-1 is build using the
### warmelt*0.c files from SVN repository but warmelt-macro-1 is build
### using wamelt-first-1.so
empty-file-for-melt.c:
date +"/* empty-file-for-melt.c %c */" > $@-tmp
$(melt_make_move) $@-tmp $@
warmelt-first-1.c: $(melt_make_source_dir)/warmelt-first.melt warmelt0.modlis $(melt_cc1) $(WARMELT_BASE0DSO) empty-file-for-melt.c
$(MELTCCINIT1) $(meltarg_init)=$(WARMELT_BASE0DROW) \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
warmelt-first-h.c: $(melt_make_source_dir)/warmelt-first.melt warmelt0.modlis $(melt_cc1) $(WARMELT_BASE0DSO) empty-file-for-melt.c
$(MELTCCINIT1) $(meltarg_init)=$(WARMELT_BASE0DROW) \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
warmelt-%-h.c: $(melt_make_source_dir)/warmelt-%.melt $(melt_cc1) \
$(WARMELT_BASE0DSO) warmelt-first-h.d.so empty-file-for-melt.c
$(MELTCCFILE1) \
$(meltarg_init)=$(subst warmelt-first-0.d,warmelt-first-h.d,$(WARMELT_BASE0DROW)) \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
warmelth.modlis: $(WARMELT_BASE0DSO) $(WARMELT_BASEHDSO)
date +"#$@ generated %c" > $@-tmp
for f in $(WARMELT_BASEH); do echo $$f.d >> $@-tmp; done
$(melt_make_move) $@-tmp $@
warmelt-first-h2.c: $(melt_make_source_dir)/warmelt-first.melt warmelth.modlis $(melt_cc1) $(WARMELT_BASEHSO) empty-file-for-melt.c
$(MELTCCINIT1) $(meltarg_init)=$(WARMELT_BASEHROW) \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
warmelt-%-h2.c: $(melt_make_source_dir)/warmelt-%.melt $(melt_cc1) \
$(WARMELT_BASEHDSO) empty-file-for-melt.c
$(MELTCCFILE1) \
$(meltarg_init)=$(WARMELT_BASEHDROW) \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
## we add the ability to translate all the warmelt* files at once.
## this could help some delicate changes, like removing a field from
## an inner class of the translator. The generated file is huge, so we
## don't want to do that often, and the generated C file should be
## compiled without any optimisation, otherwise the C compiler suffers
## too much..
warmeltbig-1.c: $(WARMELT_SRCFILES) warmelt0.modlis $(melt_cc1) $(WARMELT_BASE0DSO) empty-file-for-melt.c warmelt-predef.melt $(WARMELT_SRCFILES)
$(MELTCCINIT1) $(meltarg_init)=$(WARMELT_BASE0DROW) \
$(meltarg_arglist)=$(WARMELT_SRCARGLIST) \
$(meltarg_output)=$@ empty-file-for-melt.c
warmeltbig-2.c: $(WARMELT_SRCFILES) warmeltbig-1.so $(melt_cc1) empty-file-for-melt.c warmelt-predef.melt $(WARMELT_SRCFILES)
$(MELTCCINIT1) $(meltarg_init)=warmeltbig-1 \
$(meltarg_arglist)=$(WARMELT_SRCARGLIST) \
$(meltarg_output)=$@ empty-file-for-melt.c
warmeltbig-3.c: $(WARMELT_SRCFILES) warmeltbig-2.so $(melt_cc1) empty-file-for-melt.c warmelt-predef.melt $(WARMELT_SRCFILES)
$(MELTCCINIT1) $(meltarg_init)=warmeltbig-2 \
$(meltarg_arglist)=$(WARMELT_SRCARGLIST) \
$(meltarg_output)=$@ empty-file-for-melt.c
.PHONY: warmeltallbig
### this is only useful rarely ... it regenerated the warmelt*0.c
### files using the big monolithic version of the translator... to be
### used carefully when desperate!
warmeltallbig: $(melt_cc1) $(melt_compile_script) warmeltbig-1.c warmeltbig-3.so
wc warmeltbig*.c
$(MELTCCINIT1) $(meltarg_init)=warmeltbig-3 \
$(meltarg_arg)=$(melt_make_source_dir)/warmelt-first.melt \
$(meltarg_output)=warmelt-first-0.c empty-file-for-melt.c
for f in $(WARMELT_SRCRESTFILES); do \
$(MELTCCFILE1) \
$(meltarg_init)=warmeltbig-3 \
$(meltarg_arg)=$$f \
$(meltarg_output)=`basename $$f .melt`-0.c empty-file-for-melt.c ; \
done
warmelth2.modlis: $(WARMELT_BASEH2SO)
date +"#$@ generated %c" > $@-tmp
for f in $(WARMELT_BASEH2); do echo $$f.d >> $@-tmp; done
$(melt_make_move) $@-tmp $@
warmelt-macro-1.c: $(melt_make_source_dir)/warmelt-macro.melt $(melt_cc1) \
warmelt-first-1.so \
warmelt-macro-0.d.so \
warmelt-normal-0.d.so \
warmelt-normatch-0.d.so \
warmelt-genobj-0.d.so \
warmelt-outobj-0.d.so empty-file-for-melt.c
$(MELTCCFILE1) \
$(meltarg_init)=warmelt-first-1:warmelt-macro-0.d:warmelt-normal-0.d:warmelt-normatch-0.d:warmelt-genobj-0.d:warmelt-outobj-0.d \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
warmelt-normal-1.c: $(melt_make_source_dir)/warmelt-normal.melt $(melt_cc1) \
warmelt-first-1.so \
warmelt-macro-1.so \
warmelt-normal-0.d.so \
warmelt-normatch-0.d.so \
warmelt-genobj-0.d.so \
warmelt-outobj-0.d.so \
warmelt-predef.melt empty-file-for-melt.c
$(MELTCCFILE1) \
$(meltarg_init)=warmelt-first-1:warmelt-macro-1:warmelt-normal-0.d:warmelt-normatch-0.d:warmelt-genobj-0.d:warmelt-outobj-0.d \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
warmelt-normatch-1.c: $(melt_make_source_dir)/warmelt-normatch.melt $(melt_cc1) \
warmelt-first-1.so \
warmelt-macro-1.so \
warmelt-normal-1.so \
warmelt-normatch-0.d.so \
warmelt-genobj-0.d.so \
warmelt-outobj-0.d.so empty-file-for-melt.c
$(MELTCCFILE1) \
$(meltarg_init)=warmelt-first-1:warmelt-macro-1:warmelt-normal-1:warmelt-normatch-0.d:warmelt-genobj-0.d:warmelt-outobj-0.d \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
warmelt-genobj-1.c: $(melt_make_source_dir)/warmelt-genobj.melt $(melt_cc1) \
warmelt-first-1.so \
warmelt-macro-1.so \
warmelt-normal-1.so \
warmelt-normatch-1.so \
warmelt-genobj-0.d.so \
warmelt-outobj-0.d.so empty-file-for-melt.c
$(MELTCCFILE1) \
$(meltarg_init)=warmelt-first-1:warmelt-macro-1:warmelt-normal-1:warmelt-normatch-1:warmelt-genobj-0.d:warmelt-outobj-0.d \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
warmelt-outobj-1.c: $(melt_make_source_dir)/warmelt-outobj.melt $(melt_cc1) \
warmelt-first-1.so \
warmelt-macro-1.so \
warmelt-normal-1.so \
warmelt-normatch-1.so \
warmelt-genobj-1.so \
warmelt-outobj-0.d.so warmelt-predef.melt empty-file-for-melt.c
$(MELTCCFILE1) \
$(meltarg_init)=warmelt-first-1:warmelt-macro-1:warmelt-normal-1:warmelt-normatch-1:warmelt-genobj-1:warmelt-outobj-0.d \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
####
warmelt2.modlis: $(WARMELT_BASE2SO)
date +"#$@ generated %F" > $@-tmp
for f in $(WARMELT_BASE2); do echo $$f >> $@-tmp; done
$(melt_make_move) $@-tmp $@
warmelt-first-2.c: $(melt_make_source_dir)/warmelt-first.melt warmelt1.modlis $(WARMELT_BASE1SO) $(melt_cc1)
$(MELTCCINIT1) $(meltarg_init)="@warmelt1" \
$(meltarg_arg)=$< \
$(meltarg_output)=$@
warmelt-%-2.c: $(melt_make_source_dir)/warmelt-%.melt warmelt1.modlis $(WARMELT_BASE1SO) $(melt_cc1) $(WARMELT_BASE1NSO) empty-file-for-melt.c
$(MELTCCFILE1) $(meltarg_init)="@warmelt1" \
-frandom-seed=$(shell md5sum $< | cut -b-24) \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
warmelt-normal-2.c: warmelt-predef.melt
warmelt-normal-3.c: warmelt-predef.melt
## apparently, these dependencies are explicitly needed... because
## melt.encap target is making explicitly these
warmelt-normatch-2.so: warmelt-normatch-2.c
warmelt-outobj-3.so: warmelt-outobj-3.c
warmelt2n.modlis: $(WARMELT_BASE2NSO)
date +"#$@ generated %c" > $@-tmp
for f in $(WARMELT_BASE2); do echo $$f.n >> $@-tmp; done
$(melt_make_move) $@-tmp $@
####
warmelt-%-3.c: $(melt_make_source_dir)/warmelt-%.melt warmelt2.modlis $(WARMELT_BASE2SO) $(melt_cc1) empty-file-for-melt.c
@echo generating $@ using $(WARMELT_BASE2SO)
-rm -f $@
$(MELTCCFILE1) $(meltarg_init)="@warmelt2" \
$(meltarg_arg)=$< -frandom-seed=$(shell md5sum $< | cut -b-24) \
$(meltarg_output)=$@ empty-file-for-melt.c
ls -l $@
warmelt3.modlis: $(WARMELT_BASE2SO)
date +"#$@ generated %c" > $@-tmp
for f in $(WARMELT_BASE3); do echo $$f >> $@-tmp; done
$(SHELL) $(srcdir)/../move-if-change $@-tmp $@
warmelt-first-3.c: $(melt_make_source_dir)/warmelt-first.melt warmelt2.modlis $(WARMELT_BASE2SO) $(melt_cc1)
-rm -f $@
@echo generating $@ using $(WARMELT_BASE2SO)
$(MELTCCINIT1) $(meltarg_init)="@warmelt2" \
$(meltarg_arg)=$< \
$(meltarg_output)=$@ empty-file-for-melt.c
ls -l $@
####
diff-warmelt-2-3: $(WARMELT_BASE3SO)
echo WARMELT_BASE3ROW= $(WARMELT_BASE3ROW)
for f in $(WARMELT_BASE); do; \
diff $$f-2.c $$f-3.c || true; \
done
####
ana-base.c: $(melt_make_source_dir)/ana-base.melt warmelt2.modlis $(WARMELT_BASE2SO) $(melt_cc1) empty-file-for-melt.c
@echo generating $@ using $(WARMELT_BASE2SO)
-rm -f $@
$(MELTCCFILE1) $(meltarg_init)="@warmelt2" \
$(meltarg_arg)=$< -frandom-seed=$(shell md5sum $< | cut -b-24) \
$(meltarg_output)=$@ empty-file-for-melt.c
ls -l $@
ana-simple.c: $(melt_make_source_dir)/ana-simple.melt warmelt2.modlis $(WARMELT_BASE2SO) ana-base.so $(melt_cc1)
@echo generating $@ using $(WARMELT_BASE2SO)
-rm -f $@
$(MELTCCFILE1) $(meltarg_init)="@warmelt2:ana-base" \
$(meltarg_arg)=$< -frandom-seed=$(shell md5sum $< | cut -b-24) \
$(meltarg_output)=$@ empty-file-for-melt.c
ls -l $@
####
#### the default list of modules
$(melt_default_modules_list).modlis: $(WARMELT_BASE3SO) $(ANAMELT_BASESO)
date +"#$@ generated %F" > $@-tmp
for f in $(WARMELT_BASE3); do echo $$f >> $@-tmp; done
for f in $(ANAMELT_BASE); do echo $$f >> $@-tmp; done
$(melt_make_move) $@-tmp $@
### generated melt documentation
meltgendoc.texi: $(melt_default_modules_list).modlis $(WARMELT_SRCFILES) $(ANAMELT_SRCFILES) empty-file-for-melt.c
$(melt_cc1) $(melt_cc1flags) -Wno-shadow $(meltarg_mode)=makedoc \
$(meltarg_module_path)=.:$(melt_make_module_dir) \
$(meltarg_source_path)=.:$(melt_make_source_dir):$(melt_source_dir) \
$(meltarg_compile_script)=$(melt_make_compile_script) \
$(meltarg_tempdir)=. $(MELT_DEBUG) \
$(meltarg_init)="@$(melt_default_modules_list)" \
$(meltarg_arglist)=$(WARMELT_SRCARGLIST),$(ANAMELT_SRCARGLIST) \
$(meltarg_output)=$@ empty-file-for-melt.c
#eof melt-make.mk
|