@@ -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
@@ -506,8 +508,8 @@ EXTERNAL_DEPENDENCIES = 1
506508# the dependency information will remain external, so it doesn't
507509# pollute the git logs.
508510#
509- Makefile.dep : $(PERLREQ ) tools/mkdep.pl config.status
510- $(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 )
511513
512514dep : Makefile.dep
513515
@@ -517,9 +519,9 @@ dep: Makefile.dep
517519# be invoked manually or via "make dist". It should be run before
518520# creating release archives.
519521#
520- alldeps : $(PERLREQ ) tools/syncfiles.pl tools/mkdep.pl
521- $(RUNPERL ) tools/syncfiles.pl Makefile.in Mkfiles/* .mak
522- $(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 -- \
523525 $(DEPDIRS )
524526 $(RM_F ) * .dep
525527 if [ -f config.status ]; then \
@@ -528,9 +530,9 @@ alldeps: $(PERLREQ) tools/syncfiles.pl tools/mkdep.pl
528530
529531# Strip internal dependency information from all Makefiles; this makes
530532# the output good for git checkin
531- cleandeps : $(PERLREQ ) tools/syncfiles.pl tools/mkdep.pl
532- $(RUNPERL ) tools/syncfiles.pl Makefile.in Mkfiles/* .mak
533- $(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 -- \
534536 $(DEPDIRS )
535537 $(RM_F ) * .dep
536538 if [ -f config.status ]; then \
0 commit comments