0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

Makefile: move syncfiles into a separate target

It isn't actually required to have $(PERLREQ) to run syncfiles,
so factor it out into a separate target.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin
2025-09-25 09:26:01 -07:00
parent 512f587ed6
commit ac1a64c4d2
3 changed files with 35 additions and 23 deletions

View File

@@ -581,13 +581,12 @@ doc/Makefile: Makefile
config/config.h: config.status
#
# Dummy rules that changes make behavior
# (at end to avoid confusing non-GNU makes)
#
.SECONDARY:
.DELETE_ON_ERROR:
#
# Synchronize auxiliary Makefiles
#
syncfiles: $(tools)/syncfiles.pl
$(RUNPERL) $(tools)/syncfiles.pl Makefile.in Mkfiles/*.mak
#
# Does this version of this file have external dependencies? This definition
@@ -606,15 +605,13 @@ Makefile.dep: $(tools)/mkdep.pl config.status $(PERLREQ)
-M $(srcdir)/Makefile.in -- $(DEPDIRS)
dep: Makefile.dep
#
# This build dependencies in *ALL* makefiles, and forces all
# dependencies to be inserted inline. For that reason, it should only
# be invoked manually or via "make dist". It should be run before
# creating release archives.
#
alldeps: $(PERLREQ) $(tools)/syncfiles.pl $(tools)/mkdep.pl
$(RUNPERL) $(tools)/syncfiles.pl Makefile.in Mkfiles/*.mak
alldeps: syncfiles $(PERLREQ) $(tools)/mkdep.pl
$(RUNPERL) $(tools)/mkdep.pl -i -M Makefile.in Mkfiles/*.mak -- \
$(DEPDIRS)
$(RM_F) *.dep
@@ -624,8 +621,7 @@ alldeps: $(PERLREQ) $(tools)/syncfiles.pl $(tools)/mkdep.pl
# Strip internal dependency information from all Makefiles; this makes
# the output good for git checkin
cleandeps: $(PERLREQ) $(tools)/syncfiles.pl $(tools)/mkdep.pl
$(RUNPERL) $(tools)/syncfiles.pl Makefile.in Mkfiles/*.mak
cleandeps: syncfiles $(PERLREQ) $(tools)/mkdep.pl
$(RUNPERL) $(tools)/mkdep.pl -e -M Makefile.in Mkfiles/*.mak -- \
$(DEPDIRS)
$(RM_F) *.dep
@@ -633,6 +629,14 @@ cleandeps: $(PERLREQ) $(tools)/syncfiles.pl $(tools)/mkdep.pl
sh config.status; \
fi
#
# Dummy rules that changes make behavior
# (at end to avoid confusing non-GNU makes)
#
.SECONDARY:
.DELETE_ON_ERROR:
#-- Magic hints to mkdep.pl --#
# @object-ending: ".$(O)"
# @path-separator: "/"

View File

@@ -99,6 +99,7 @@ LIBOBJ_W = \
asm\preproc.obj asm\quote.obj \
asm\listing.obj asm\eval.obj asm\exprlib.obj asm\exprdump.obj \
asm\stdscan.obj \
asm\getbool.obj \
asm\strfunc.obj \
asm\segalloc.obj \
asm\rdstrnum.obj \
@@ -120,7 +121,7 @@ LIBOBJ_NW = \
macros\macros.obj \
\
nasmlib\ver.obj \
nasmlib\alloc.obj nasmlib\asprintf.obj nasmlib\errfile.obj \
nasmlib\alloc.obj nasmlib\asprintf.obj \
nasmlib\crc32.obj nasmlib\crc64.obj nasmlib\md5c.obj \
nasmlib\string.obj nasmlib\nctype.obj \
nasmlib\file.obj nasmlib\mmap.obj nasmlib\ilog2.obj \
@@ -164,7 +165,7 @@ LIBOBJ = $(LIBOBJ_W) $(LIBOBJ_NW) $(ZLIB)
ALLOBJ_W = $(NASM) $(LIBOBJ_W)
ALLOBJ = $(PROGOBJ) $(LIBOBJ)
SUBDIRS = stdlib nasmlib include config output asm disasm x86 \
common zlib macros
common zlib macros misc
XSUBDIRS = test doc nsis win
DEPDIRS = . $(SUBDIRS)
#-- End File Lists --#
@@ -302,7 +303,7 @@ asm\warnings.time: $(WARNSRCS) asm\warnings.pl
asm\warnings_c.h.time: asm\warnings.pl asm\warnings.time
$(RUNPERL) $(srcdir)\asm\warnings.pl c asm\warnings_c.h \
'$(srcdir)' $(WARNSRCS)
$(srcdir) $(WARNSRCS)
$(EMPTY) asm\warnings_c.h.time
asm\warnings_c.h: asm\warnings_c.h.time
@@ -310,7 +311,7 @@ asm\warnings_c.h: asm\warnings_c.h.time
include\warnings.h.time: asm\warnings.pl asm\warnings.time
$(RUNPERL) $(srcdir)\asm\warnings.pl h include\warnings.h \
'$(srcdir)' $(WARNSRCS)
$(srcdir) $(WARNSRCS)
$(EMPTY) include\warnings.h.time
include\warnings.h: include\warnings.h.time
@@ -318,7 +319,7 @@ include\warnings.h: include\warnings.h.time
doc\warnings.src.time: asm\warnings.pl asm\warnings.time
$(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src \
'$(srcdir)' $(WARNSRCS)
$(srcdir) $(WARNSRCS)
$(EMPTY) doc\warnings.src.time
doc\warnings.src : doc\warnings.src.time
@@ -348,6 +349,9 @@ asm\pptok.c: asm\pptok.dat asm\pptok.pl perllib\phash.ph
asm\pptok.ph: asm\pptok.dat asm\pptok.pl perllib\phash.ph
$(RUNPERL) $(srcdir)\asm\pptok.pl ph \
$(srcdir)\asm\pptok.dat asm\pptok.ph
doc\pptok.src: asm\pptok.dat asm\pptok.pl perllib\phash.ph
$(RUNPERL) $(srcdir)\asm\pptok.pl src \
$(srcdir)\asm\pptok.dat doc\pptok.src
# Directives hash
asm\directiv.h: asm\directiv.dat nasmlib\perfhash.pl perllib\phash.ph
@@ -376,7 +380,7 @@ nsis\arch.nsh: nsis\getpearch.pl nasm$(X)
# The use of redirection here keeps makensis from moving the cwd to the
# source directory.
nsis: nsis\nasm.nsi nsis\arch.nsh nsis\version.nsh
$(MAKENSIS) -Dsrcdir="$(srcdir)" -Dobjdir="$(objdir)" - < nsis\nasm.nsi
$(MAKENSIS) -Dsrcdir=$(srcdir) -Dobjdir=$(objdir) - < nsis\nasm.nsi
#-- End NSIS Rules --#

View File

@@ -87,6 +87,7 @@ LIBOBJ_W = &
asm\preproc.obj asm\quote.obj &
asm\listing.obj asm\eval.obj asm\exprlib.obj asm\exprdump.obj &
asm\stdscan.obj &
asm\getbool.obj &
asm\strfunc.obj &
asm\segalloc.obj &
asm\rdstrnum.obj &
@@ -108,7 +109,7 @@ LIBOBJ_NW = &
macros\macros.obj &
&
nasmlib\ver.obj &
nasmlib\alloc.obj nasmlib\asprintf.obj nasmlib\errfile.obj &
nasmlib\alloc.obj nasmlib\asprintf.obj &
nasmlib\crc32.obj nasmlib\crc64.obj nasmlib\md5c.obj &
nasmlib\string.obj nasmlib\nctype.obj &
nasmlib\file.obj nasmlib\mmap.obj nasmlib\ilog2.obj &
@@ -152,7 +153,7 @@ LIBOBJ = $(LIBOBJ_W) $(LIBOBJ_NW) $(ZLIB)
ALLOBJ_W = $(NASM) $(LIBOBJ_W)
ALLOBJ = $(PROGOBJ) $(LIBOBJ)
SUBDIRS = stdlib nasmlib include config output asm disasm x86 &
common zlib macros
common zlib macros misc
XSUBDIRS = test doc nsis win
DEPDIRS = . $(SUBDIRS)
#-- End File Lists --#
@@ -315,7 +316,7 @@ asm\warnings.time: $(WARNSRCS) asm\warnings.pl
asm\warnings_c.h.time: asm\warnings.pl asm\warnings.time
$(RUNPERL) $(srcdir)\asm\warnings.pl c asm\warnings_c.h &
'$(srcdir)' $(WARNSRCS)
$(srcdir) $(WARNSRCS)
$(EMPTY) asm\warnings_c.h.time
asm\warnings_c.h: asm\warnings_c.h.time
@@ -323,7 +324,7 @@ asm\warnings_c.h: asm\warnings_c.h.time
include\warnings.h.time: asm\warnings.pl asm\warnings.time
$(RUNPERL) $(srcdir)\asm\warnings.pl h include\warnings.h &
'$(srcdir)' $(WARNSRCS)
$(srcdir) $(WARNSRCS)
$(EMPTY) include\warnings.h.time
include\warnings.h: include\warnings.h.time
@@ -331,7 +332,7 @@ include\warnings.h: include\warnings.h.time
doc\warnings.src.time: asm\warnings.pl asm\warnings.time
$(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src &
'$(srcdir)' $(WARNSRCS)
$(srcdir) $(WARNSRCS)
$(EMPTY) doc\warnings.src.time
doc\warnings.src : doc\warnings.src.time
@@ -361,6 +362,9 @@ asm\pptok.c: asm\pptok.dat asm\pptok.pl perllib\phash.ph
asm\pptok.ph: asm\pptok.dat asm\pptok.pl perllib\phash.ph
$(RUNPERL) $(srcdir)\asm\pptok.pl ph &
$(srcdir)\asm\pptok.dat asm\pptok.ph
doc\pptok.src: asm\pptok.dat asm\pptok.pl perllib\phash.ph
$(RUNPERL) $(srcdir)\asm\pptok.pl src &
$(srcdir)\asm\pptok.dat doc\pptok.src
# Directives hash
asm\directiv.h: asm\directiv.dat nasmlib\perfhash.pl perllib\phash.ph
@@ -389,7 +393,7 @@ nsis\arch.nsh: nsis\getpearch.pl nasm$(X)
# The use of redirection here keeps makensis from moving the cwd to the
# source directory.
nsis: nsis\nasm.nsi nsis\arch.nsh nsis\version.nsh
$(MAKENSIS) -Dsrcdir="$(srcdir)" -Dobjdir="$(objdir)" - < nsis\nasm.nsi
$(MAKENSIS) -Dsrcdir=$(srcdir) -Dobjdir=$(objdir) - < nsis\nasm.nsi
#-- End NSIS Rules --#