@@ -121,11 +121,8 @@ PROGOBJ = $(NASM) $(NDISASM)
121
121
PROGS = nasm$(X ) ndisasm$(X )
122
122
123
123
# Files dependent on extracted warnings
124
- # WARNTIMES is explicit to avoid breaking some apparently problematic make
125
- # versions, e.g. Microsoft NMAKE
126
124
WARNOBJ = asm/warnings.$(O )
127
125
WARNFILES = asm/warnings_c.h include/warnings.h doc/warnings.src
128
- WARNTIMES = asm/warnings_c.h.time include/warnings.h.time doc/warnings.src.time
129
126
130
127
OUTPUTOBJ = \
131
128
output/outform.$(O ) output/outlib.$(O ) \
@@ -341,43 +338,6 @@ x86/regs.h: x86/regs.dat x86/regs.pl
341
338
$(RUNPERL ) $(srcdir ) /x86/regs.pl h \
342
339
$(srcdir ) /x86/regs.dat > x86/regs.h
343
340
344
- # Extract warnings from source code. This is done automatically if any
345
- # C files have changed; the script is fast enough that that is
346
- # reasonable, but doesn't update the time stamp if the files aren't
347
- # changed, to avoid rebuilding everything every time. Track the actual
348
- # dependency by the empty file asm/warnings.time.
349
- .PHONY : warnings
350
- warnings :
351
- $(RM_F ) $(WARNFILES ) $(WARNTIMES ) asm/warnings.time
352
- $(MAKE ) asm/warnings.time
353
-
354
- asm/warnings.time : $(WARNSRCS ) asm/warnings.pl
355
- $(EMPTY ) asm/warnings.time
356
- $(MAKE ) $(WARNTIMES )
357
-
358
- asm/warnings_c.h.time : asm/warnings.pl asm/warnings.time
359
- $(RUNPERL ) $(srcdir ) /asm/warnings.pl c asm/warnings_c.h \
360
- $(srcdir ) $(WARNSRCS )
361
- $(EMPTY ) asm/warnings_c.h.time
362
-
363
- asm/warnings_c.h : asm/warnings_c.h.time
364
- $(SIDE )
365
-
366
- include/warnings.h.time : asm/warnings.pl asm/warnings.time
367
- $(RUNPERL ) $(srcdir ) /asm/warnings.pl h include/warnings.h \
368
- $(srcdir ) $(WARNSRCS )
369
- $(EMPTY ) include/warnings.h.time
370
-
371
- include/warnings.h : include/warnings.h.time
372
- $(SIDE )
373
-
374
- doc/warnings.src.time : asm/warnings.pl asm/warnings.time
375
- $(RUNPERL ) $(srcdir ) /asm/warnings.pl doc doc/warnings.src \
376
- $(srcdir ) $(WARNSRCS )
377
- $(EMPTY ) doc/warnings.src.time
378
-
379
- doc/warnings.src : doc/warnings.src.time
380
- $(SIDE )
381
341
382
342
# Assembler token hash
383
343
asm/tokhash.c : x86/insns.xda x86/insnsn.c asm/tokens.dat asm/tokhash.pl \
@@ -422,6 +382,51 @@ misc/nasmtok.el: misc/emacstbl.pl asm/tokhash.c asm/pptok.c \
422
382
423
383
# -- End Generated File Rules --#
424
384
385
+ # Extract warnings from source code. This is done automatically if any
386
+ # C files have changed; the script is fast enough that that is
387
+ # reasonable, but doesn't update the time stamp if the files aren't
388
+ # changed, to avoid rebuilding everything every time. Track the actual
389
+ # dependency by the empty file asm/warnings.time.
390
+ #
391
+ # This doesn't seem to work for non-Unix Makefile variants, so don't
392
+ # export those rules here (non-Unix Makefiles only guaranteed to build
393
+ # a distribution ball anyway.)
394
+
395
+ WARNTIMES = $(WARNFILES:=.time )
396
+
397
+ .PHONY : warnings
398
+ warnings :
399
+ $(RM_F ) $(WARNFILES ) $(WARNTIMES ) asm/warnings.time
400
+ $(MAKE ) asm/warnings.time
401
+
402
+ asm/warnings.time : $(WARNSRCS ) asm/warnings.pl
403
+ $(EMPTY ) asm/warnings.time
404
+ $(MAKE ) $(WARNTIMES )
405
+
406
+ asm/warnings_c.h.time : asm/warnings.pl asm/warnings.time
407
+ $(RUNPERL ) $(srcdir ) /asm/warnings.pl c asm/warnings_c.h \
408
+ $(srcdir ) $(WARNSRCS )
409
+ $(EMPTY ) asm/warnings_c.h.time
410
+
411
+ asm/warnings_c.h : asm/warnings_c.h.time
412
+ $(SIDE )
413
+
414
+ include/warnings.h.time : asm/warnings.pl asm/warnings.time
415
+ $(RUNPERL ) $(srcdir ) /asm/warnings.pl h include/warnings.h \
416
+ $(srcdir ) $(WARNSRCS )
417
+ $(EMPTY ) include/warnings.h.time
418
+
419
+ include/warnings.h : include/warnings.h.time
420
+ $(SIDE )
421
+
422
+ doc/warnings.src.time : asm/warnings.pl asm/warnings.time
423
+ $(RUNPERL ) $(srcdir ) /asm/warnings.pl doc doc/warnings.src \
424
+ $(srcdir ) $(WARNSRCS )
425
+ $(EMPTY ) doc/warnings.src.time
426
+
427
+ doc/warnings.src : doc/warnings.src.time
428
+ $(SIDE )
429
+
425
430
$(PERLREQ ) : $(DIRS )
426
431
427
432
perlreq : $(PERLREQ )
0 commit comments