@@ -206,7 +206,7 @@ WARNSRCS = $(LIBOBJ_NW:.$(O)=.c) asm/nasm.c
206
206
# have Perl just to recompile NASM from the distribution.
207
207
208
208
# Perl-generated source files
209
- PERLREQ = config/unconfig.h \
209
+ PERLREQ_CLEANABLE = \
210
210
x86/insnsb.c x86/insnsa.c x86/insnsd.c x86/insnsi.h x86/insnsn.c \
211
211
x86/regs.c x86/regs.h x86/regflags.c x86/regdis.c x86/regdis.h \
212
212
x86/regvals.c asm/tokhash.c asm/tokens.h asm/pptok.h asm/pptok.c \
@@ -217,10 +217,14 @@ PERLREQ = config/unconfig.h \
217
217
misc/nasmtok.el \
218
218
version.h version.mac version.mak nsis/version.nsh
219
219
220
+ # Special hack to keep config/unconfig.h from getting deleted
221
+ # by "make spotless"...
222
+ PERLREQ = config/unconfig.h $(PERLREQ_CLEANABLE )
223
+
220
224
INSDEP = x86/insns.dat x86/insns.pl x86/insns-iflags.ph x86/iflags.ph
221
225
222
- config/unconfig.h : config/config.h.in
223
- $(RUNPERL ) $( tools ) /unconfig.pl \
226
+ config/unconfig.h : config/config.h.in autoconf/unconfig.pl
227
+ $(RUNPERL ) ' $(srcdir) ' /autoconf /unconfig.pl \
224
228
' $(srcdir)' config/config.h.in config/unconfig.h
225
229
226
230
x86/iflag.c : $(INSDEP )
@@ -293,7 +297,7 @@ x86/regs.h: x86/regs.dat x86/regs.pl
293
297
# changed, to avoid rebuilding everything every time. Track the actual
294
298
# dependency by the empty file asm/warnings.time.
295
299
.PHONY : warnings
296
- warnings :
300
+ warnings : dirs
297
301
$(RM_F ) $(WARNFILES ) $(WARNTIMES ) asm/warnings.time
298
302
$(MAKE ) asm/warnings.time
299
303
@@ -362,7 +366,8 @@ misc/nasmtok.el: misc/emacstbl.pl asm/tokhash.c asm/pptok.c \
362
366
363
367
# -- End Generated File Rules --#
364
368
365
- perlreq : $(PERLREQ )
369
+ perlreq : dirs
370
+ $(MAKE ) $(PERLREQ )
366
371
367
372
# -- Begin NSIS Rules --#
368
373
@@ -402,24 +407,26 @@ clean:
402
407
$(RM_F ) nsis/arch.nsh
403
408
$(RM_F ) perlbreq.si
404
409
405
- distclean : clean
410
+
411
+ cleaner : clean
412
+ $(RM_F ) $(PERLREQ_CL ) * .1 nasm.spec
413
+ $(MAKE ) -C doc clean
414
+ $(RM_F ) * .dep * /* .time
415
+
416
+ distclean : clean | cleaner
406
417
for d in . $( SUBDIRS) $( XSUBDIRS) ; do \
407
418
$(RM_F ) " $$ d" /.\# " $$ d" /\# " $$ d" /* ~ " $$ d" /* .bak \
408
419
" $$ d" /* .lst " $$ d" /* .bin ; \
409
420
done
410
421
$(RM_F ) test/* .$(O )
411
422
$(RM_F ) * .dep
412
- $( RM_F ) Makefile doc/Makefile config/config.h config.log config.status
423
+ -sh autoconf/clean.sh || sh ' $(srcdir) ' /autoconf/clean.sh
413
424
414
- cleaner : clean
415
- $(RM_F ) $(PERLREQ ) * .1 nasm.spec
416
- $(MAKE ) -C doc clean
417
- $(RM_F ) * .dep * /* .time
418
-
419
- makefile-clean :
420
- ./autogen.sh
425
+ # This cleans up files generated by autogen.sh
426
+ autoconf-clean : | distclean
427
+ $(RM_F ) configure autoconf/aclocal.m4 autoconf/clean.sh
421
428
422
- spotless : distclean cleaner makefile -clean
429
+ spotless : cleaner distclean autoconf -clean
423
430
424
431
strip :
425
432
$(STRIP ) --strip-unneeded $(PROGS )
0 commit comments