@@ -37,8 +37,10 @@ AR = @AR@
3737RANLIB = @RANLIB@
3838STRIP = @STRIP@
3939
40+ tools = $(top_srcdir ) /tools
41+
4042PERL = perl
41- PERLFLAGS = -I$(srcdir ) /perllib -I$(srcdir )
43+ PERLFLAGS = -I$(top_srcdir ) /perllib -I$(srcdir )
4244RUNPERL = $(PERL ) $(PERLFLAGS )
4345
4446PYTHON3 = python3
@@ -65,8 +67,8 @@ LN_S = @LN_S@
6567FIND = find
6668
6769# Binary suffixes
68- O = @OBJEXT@
69- X = @EXEEXT@
70+ O = @OBJEXT@
71+ X = @EXEEXT@
7072A = @LIBEXT@
7173
7274# Debug stuff
@@ -194,14 +196,14 @@ PERLREQ = config/unconfig.h \
194196 x86/iflag.c x86/iflaggen.h \
195197 macros/macros.c \
196198 asm/pptok.ph asm/directbl.c asm/directiv.h \
197- asm/warnings.c include/warnings.h doc/warnings.src \
199+ $( WARNFILES ) \
198200 misc/nasmtok.el \
199201 version.h version.mac version.mak nsis/version.nsh
200202
201203INSDEP = x86/insns.dat x86/insns.pl x86/insns-iflags.ph x86/iflags.ph
202204
203205config/unconfig.h : config/config.h.in
204- $(RUNPERL ) $(srcdir ) / tools/unconfig.pl \
206+ $(RUNPERL ) $(tools ) /unconfig.pl \
205207 ' $(srcdir)' config/config.h.in config/unconfig.h
206208
207209x86/iflag.c : $(INSDEP )
@@ -273,7 +275,7 @@ x86/regs.h: x86/regs.dat x86/regs.pl
273275# reasonable, but doesn't update the time stamp if the files aren't
274276# changed, to avoid rebuilding everything every time. Track the actual
275277# dependency by the empty file asm/warnings.time.
276- WARNFILES = asm/warnings.c include/warnings.h doc/warnings.src
278+ WARNFILES = asm/warnings_c.h include/warnings.h doc/warnings.src
277279
278280warnings :
279281 $(RM_F ) $(WARNFILES ) $(WARNFILES:=.time )
@@ -283,11 +285,11 @@ asm/warnings.time: $(ALLOBJ_NW:.$(O)=.c)
283285 : > asm/warnings.time
284286 $(MAKE ) $(WARNFILES:=.time )
285287
286- asm/warnings.c .time : asm/warnings.pl asm/warnings.time
287- $(RUNPERL ) $(srcdir ) /asm/warnings.pl c asm/warnings.c $(srcdir )
288- : > asm/warnings.c .time
288+ asm/warnings_c.h .time : asm/warnings.pl asm/warnings.time
289+ $(RUNPERL ) $(srcdir ) /asm/warnings.pl c asm/warnings_c.h $(srcdir )
290+ : > asm/warnings_c.h .time
289291
290- asm/warnings.c : asm/warnings.c .time
292+ asm/warnings_c.h : asm/warnings_c.h .time
291293 @: Side effect
292294
293295include/warnings.h.time : asm/warnings.pl asm/warnings.time
@@ -380,22 +382,22 @@ clean:
380382 $(RM_F ) perlbreq.si
381383
382384distclean : clean
383- $(RM_F ) config.log config.status config/config.h
384385 for d in . $( SUBDIRS) $( XSUBDIRS) ; do \
385386 $(RM_F ) " $$ d" /.\# " $$ d" /\# " $$ d" /* ~ " $$ d" /* .bak \
386387 " $$ d" /* .lst " $$ d" /* .bin ; \
387388 done
388389 $(RM_F ) test/* .$(O )
389- $(RM_RF ) autom4te* .cache
390- $(RM_F ) Makefile * .dep
390+ $(RM_F ) * .dep
391391
392392cleaner : clean
393393 $(RM_F ) $(PERLREQ ) * .1 nasm.spec
394394 $(MAKE ) -C doc clean
395395 $(RM_F ) * .dep * /* .time
396396
397- spotless : distclean cleaner
398- $(RM_F ) doc/Makefile
397+ makefile-clean :
398+ ./autogen.sh
399+
400+ spotless : distclean cleaner makefile-clean
399401
400402strip :
401403 $(STRIP ) --strip-unneeded $(PROGS )
@@ -431,11 +433,10 @@ everything: always_everything
431433install_everything : everything install install_doc
432434
433435dist :
436+ $(MAKE ) distclean
434437 $(MAKE ) alldeps
435- $(MAKE ) spotless perlreq manpages spec $(MANPAGES )
436- autoheader
437- autoconf
438- $(RM_RF ) ./autom4te* .cache
438+ $(MAKE ) perlreq manpages spec $(MANPAGES )
439+ ./autogen.sh
439440
440441tar : dist
441442 tar -cv --exclude CVS -C .. -f - | \
@@ -507,8 +508,8 @@ EXTERNAL_DEPENDENCIES = 1
507508# the dependency information will remain external, so it doesn't
508509# pollute the git logs.
509510#
510- Makefile.dep : $(PERLREQ ) tools/mkdep.pl config.status
511- $(RUNPERL ) tools/mkdep.pl -M Makefile.in -- $(DEPDIRS )
511+ Makefile.dep : $(PERLREQ ) $( tools ) /mkdep.pl config.status
512+ $(RUNPERL ) $( tools ) /mkdep.pl -M Makefile.in -- $(DEPDIRS )
512513
513514dep : Makefile.dep
514515
@@ -518,9 +519,9 @@ dep: Makefile.dep
518519# be invoked manually or via "make dist". It should be run before
519520# creating release archives.
520521#
521- alldeps : $(PERLREQ ) tools/syncfiles.pl tools/mkdep.pl
522- $(RUNPERL ) tools/syncfiles.pl Makefile.in Mkfiles/* .mak
523- $(RUNPERL ) tools/mkdep.pl -i -M Makefile.in Mkfiles/* .mak -- \
522+ alldeps : $(PERLREQ ) $( tools ) /syncfiles.pl $( tools ) /mkdep.pl
523+ $(RUNPERL ) $( tools ) /syncfiles.pl Makefile.in Mkfiles/* .mak
524+ $(RUNPERL ) $( tools ) /mkdep.pl -i -M Makefile.in Mkfiles/* .mak -- \
524525 $(DEPDIRS )
525526 $(RM_F ) * .dep
526527 if [ -f config.status ]; then \
@@ -529,9 +530,9 @@ alldeps: $(PERLREQ) tools/syncfiles.pl tools/mkdep.pl
529530
530531# Strip internal dependency information from all Makefiles; this makes
531532# the output good for git checkin
532- cleandeps : $(PERLREQ ) tools/syncfiles.pl tools/mkdep.pl
533- $(RUNPERL ) tools/syncfiles.pl Makefile.in Mkfiles/* .mak
534- $(RUNPERL ) tools/mkdep.pl -e -M Makefile.in Mkfiles/* .mak -- \
533+ cleandeps : $(PERLREQ ) $( tools ) /syncfiles.pl $( tools ) /mkdep.pl
534+ $(RUNPERL ) $( tools ) /syncfiles.pl Makefile.in Mkfiles/* .mak
535+ $(RUNPERL ) $( tools ) /mkdep.pl -e -M Makefile.in Mkfiles/* .mak -- \
535536 $(DEPDIRS )
536537 $(RM_F ) * .dep
537538 if [ -f config.status ]; then \
0 commit comments