mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-07-24 10:25:42 -04:00
Makefile.in: fix warning dependencies
Fix circular dependency on asm/warnings.c by factoring out warnings.$(O) from the dependencies, and use a separate <file>.time which "generate" the main source file as a "side effect", giving us a null target. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
1a3bf7a3d7
commit
d85890aac7
59
Makefile.in
59
Makefile.in
@ -75,7 +75,7 @@ ifeq ($(TRACE),1)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: $(X) .$(O) .$(A) .xml .1 .c .i .s .txt
|
.SUFFIXES: $(X) .$(O) .$(A) .xml .1 .c .i .s .txt .time
|
||||||
|
|
||||||
.PHONY: all doc rdf install clean distclean cleaner spotless install_rdf test
|
.PHONY: all doc rdf install clean distclean cleaner spotless install_rdf test
|
||||||
.PHONY: install_doc everything install_everything strip perlreq dist tags TAGS
|
.PHONY: install_doc everything install_everything strip perlreq dist tags TAGS
|
||||||
@ -100,7 +100,10 @@ endif
|
|||||||
NASM = asm/nasm.$(O)
|
NASM = asm/nasm.$(O)
|
||||||
NDISASM = disasm/ndisasm.$(O)
|
NDISASM = disasm/ndisasm.$(O)
|
||||||
|
|
||||||
LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \
|
PROGOBJ = $(NASM) $(NDISASM)
|
||||||
|
PROGS = nasm$(X) ndisasm$(X)
|
||||||
|
|
||||||
|
LIBOBJ_NW = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \
|
||||||
stdlib/strnlen.$(O) stdlib/strrchrnul.$(O) \
|
stdlib/strnlen.$(O) stdlib/strrchrnul.$(O) \
|
||||||
\
|
\
|
||||||
nasmlib/ver.$(O) \
|
nasmlib/ver.$(O) \
|
||||||
@ -122,7 +125,7 @@ LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \
|
|||||||
x86/regs.$(O) x86/regvals.$(O) x86/regflags.$(O) x86/regdis.$(O) \
|
x86/regs.$(O) x86/regvals.$(O) x86/regflags.$(O) x86/regdis.$(O) \
|
||||||
x86/disp8.$(O) x86/iflag.$(O) \
|
x86/disp8.$(O) x86/iflag.$(O) \
|
||||||
\
|
\
|
||||||
asm/error.$(O) asm/warnings.$(O) \
|
asm/error.$(O) \
|
||||||
asm/floats.$(O) \
|
asm/floats.$(O) \
|
||||||
asm/directiv.$(O) asm/directbl.$(O) \
|
asm/directiv.$(O) asm/directbl.$(O) \
|
||||||
asm/pragma.$(O) \
|
asm/pragma.$(O) \
|
||||||
@ -147,7 +150,12 @@ LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \
|
|||||||
\
|
\
|
||||||
disasm/disasm.$(O) disasm/sync.$(O)
|
disasm/disasm.$(O) disasm/sync.$(O)
|
||||||
|
|
||||||
ALLOBJ = $(NASM) $(NDISASM) $(LIBOBJ)
|
# Warnings depend on all source files, so handle them separately
|
||||||
|
WARNOBJ = asm/warnings.$(O)
|
||||||
|
|
||||||
|
LIBOBJ = $(LIBOBJ_NW) $(WARNOBJ)
|
||||||
|
ALLOBJ_NW = $(PROGOBJ) $(LIBOBJ_NW)
|
||||||
|
ALLOBJ = $(PROGOBJ) $(LIBOBJ)
|
||||||
|
|
||||||
SUBDIRS = stdlib nasmlib output asm disasm x86 common macros
|
SUBDIRS = stdlib nasmlib output asm disasm x86 common macros
|
||||||
XSUBDIRS = test doc nsis rdoff
|
XSUBDIRS = test doc nsis rdoff
|
||||||
@ -155,7 +163,7 @@ DEPDIRS = . include config x86 rdoff $(SUBDIRS)
|
|||||||
#-- End File Lists --#
|
#-- End File Lists --#
|
||||||
|
|
||||||
all: dirs
|
all: dirs
|
||||||
$(MAKE) nasm$(X) ndisasm$(X) rdf
|
$(MAKE) $(PROGS) rdf
|
||||||
|
|
||||||
NASMLIB = libnasm.$(A)
|
NASMLIB = libnasm.$(A)
|
||||||
|
|
||||||
@ -271,18 +279,30 @@ warnings:
|
|||||||
$(RM_F) $(WARNFILES)
|
$(RM_F) $(WARNFILES)
|
||||||
$(MAKE) asm/warnings.time
|
$(MAKE) asm/warnings.time
|
||||||
|
|
||||||
asm/warnings.time: $(ALLOBJ:.@OBJEXT@=.c)
|
asm/warnings.time: $(ALLOBJ_NW:.$(O)=.c)
|
||||||
: > asm/warnings.time
|
: > asm/warnings.time
|
||||||
$(MAKE) $(WARNFILES)
|
$(MAKE) $(WARNFILES:=.time)
|
||||||
|
|
||||||
asm/warnings.c: asm/warnings.pl asm/warnings.time
|
asm/warnings.c.time: asm/warnings.pl asm/warnings.time
|
||||||
$(RUNPERL) $(srcdir)/asm/warnings.pl c asm/warnings.c $(srcdir)
|
$(RUNPERL) $(srcdir)/asm/warnings.pl c asm/warnings.c $(srcdir)
|
||||||
|
: > asm/warnings.c.time
|
||||||
|
|
||||||
include/warnings.h: asm/warnings.pl asm/warnings.time
|
asm/warnings.c: asm/warnings.c.time
|
||||||
|
@: Side effect
|
||||||
|
|
||||||
|
include/warnings.h.time: asm/warnings.pl asm/warnings.time
|
||||||
$(RUNPERL) $(srcdir)/asm/warnings.pl h include/warnings.h $(srcdir)
|
$(RUNPERL) $(srcdir)/asm/warnings.pl h include/warnings.h $(srcdir)
|
||||||
|
: > include/warnings.h.time
|
||||||
|
|
||||||
doc/warnings.src: asm/warnings.pl asm/warnings.time
|
include/warnings.h: include/warnings.h.time
|
||||||
|
@: Side effect
|
||||||
|
|
||||||
|
doc/warnings.src.time: asm/warnings.pl asm/warnings.time
|
||||||
$(RUNPERL) $(srcdir)/asm/warnings.pl doc doc/warnings.src $(srcdir)
|
$(RUNPERL) $(srcdir)/asm/warnings.pl doc doc/warnings.src $(srcdir)
|
||||||
|
: > doc/warnings.src.time
|
||||||
|
|
||||||
|
doc/warnings.src : doc/warnings.src.time
|
||||||
|
@: Side effect
|
||||||
|
|
||||||
# Assembler token hash
|
# Assembler token hash
|
||||||
asm/tokhash.c: x86/insns.dat x86/regs.dat asm/tokens.dat asm/tokhash.pl \
|
asm/tokhash.c: x86/insns.dat x86/regs.dat asm/tokens.dat asm/tokhash.pl \
|
||||||
@ -385,10 +405,9 @@ nsis: nsis/nasm.nsi nsis/arch.nsh nsis/version.nsh
|
|||||||
# Generated manpages, also pregenerated for distribution
|
# Generated manpages, also pregenerated for distribution
|
||||||
manpages: nasm.1 ndisasm.1
|
manpages: nasm.1 ndisasm.1
|
||||||
|
|
||||||
install: nasm$(X) ndisasm$(X)
|
install: $(PROGS)
|
||||||
$(MKDIR_P) $(DESTDIR)$(bindir)
|
$(MKDIR_P) $(DESTDIR)$(bindir)
|
||||||
$(INSTALL_PROGRAM) nasm$(X) $(DESTDIR)$(bindir)/nasm$(X)
|
$(INSTALL_PROGRAM) $(PROGS) $(DESTDIR)$(bindir)/
|
||||||
$(INSTALL_PROGRAM) ndisasm$(X) $(DESTDIR)$(bindir)/ndisasm$(X)
|
|
||||||
$(MKDIR_P) $(DESTDIR)$(mandir)/man1
|
$(MKDIR_P) $(DESTDIR)$(mandir)/man1
|
||||||
$(INSTALL_DATA) $(srcdir)/nasm.1 $(DESTDIR)$(mandir)/man1/nasm.1
|
$(INSTALL_DATA) $(srcdir)/nasm.1 $(DESTDIR)$(mandir)/man1/nasm.1
|
||||||
$(INSTALL_DATA) $(srcdir)/ndisasm.1 $(DESTDIR)$(mandir)/man1/ndisasm.1
|
$(INSTALL_DATA) $(srcdir)/ndisasm.1 $(DESTDIR)$(mandir)/man1/ndisasm.1
|
||||||
@ -397,7 +416,7 @@ clean:
|
|||||||
for d in . $(SUBDIRS) $(XSUBDIRS); do \
|
for d in . $(SUBDIRS) $(XSUBDIRS); do \
|
||||||
$(RM_F) "$$d"/*.$(O) "$$d"/*.s "$$d"/*.i "$$d"/*.$(A) ; \
|
$(RM_F) "$$d"/*.$(O) "$$d"/*.s "$$d"/*.i "$$d"/*.$(A) ; \
|
||||||
done
|
done
|
||||||
$(RM_F) nasm$(X) ndisasm$(X)
|
$(RM_F) $(PROGS)
|
||||||
$(RM_F) nasm-*-installer-*.exe
|
$(RM_F) nasm-*-installer-*.exe
|
||||||
$(RM_F) tags TAGS
|
$(RM_F) tags TAGS
|
||||||
$(RM_F) nsis/arch.nsh
|
$(RM_F) nsis/arch.nsh
|
||||||
@ -412,18 +431,18 @@ distclean: clean
|
|||||||
done
|
done
|
||||||
$(RM_F) test/*.$(O)
|
$(RM_F) test/*.$(O)
|
||||||
$(RM_RF) autom4te*.cache
|
$(RM_RF) autom4te*.cache
|
||||||
$(RM_F) Makefile *.dep asm/warnings.time
|
$(RM_F) Makefile *.dep
|
||||||
|
|
||||||
cleaner: clean
|
cleaner: clean
|
||||||
$(RM_F) $(PERLREQ) *.1 nasm.spec
|
$(RM_F) $(PERLREQ) *.1 nasm.spec
|
||||||
$(MAKE) -C doc clean
|
$(MAKE) -C doc clean
|
||||||
$(RM_F) *.dep asm/warnings.time
|
$(RM_F) *.dep */*.time
|
||||||
|
|
||||||
spotless: distclean cleaner
|
spotless: distclean cleaner
|
||||||
$(RM_F) doc/Makefile
|
$(RM_F) doc/Makefile
|
||||||
|
|
||||||
strip:
|
strip:
|
||||||
$(STRIP) --strip-unneeded nasm$(X) ndisasm$(X)
|
$(STRIP) --strip-unneeded $(PROGS)
|
||||||
|
|
||||||
TAGS:
|
TAGS:
|
||||||
$(RM_F) TAGS
|
$(RM_F) TAGS
|
||||||
@ -496,13 +515,13 @@ nasm.spec: nasm.spec.in nasm.spec.sed version.sed perlbreq.si
|
|||||||
splint:
|
splint:
|
||||||
splint -weak *.c
|
splint -weak *.c
|
||||||
|
|
||||||
test: nasm$(X)
|
test: $(PROGS)
|
||||||
cd test && $(RUNPERL) performtest.pl --nasm=../nasm *.asm
|
cd test && $(RUNPERL) performtest.pl --nasm=../nasm *.asm
|
||||||
|
|
||||||
golden: nasm$(X)
|
golden: $(PROGS)
|
||||||
cd test && $(RUNPERL) performtest.pl --golden --nasm=../nasm *.asm
|
cd test && $(RUNPERL) performtest.pl --golden --nasm=../nasm *.asm
|
||||||
|
|
||||||
travis: nasm$(X)
|
travis: $(PROGS)
|
||||||
$(PYTHON3) travis/nasm-t.py run
|
$(PYTHON3) travis/nasm-t.py run
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -64,7 +64,10 @@ X = .exe
|
|||||||
NASM = asm\nasm.$(O)
|
NASM = asm\nasm.$(O)
|
||||||
NDISASM = disasm\ndisasm.$(O)
|
NDISASM = disasm\ndisasm.$(O)
|
||||||
|
|
||||||
LIBOBJ = stdlib\snprintf.$(O) stdlib\vsnprintf.$(O) stdlib\strlcpy.$(O) \
|
PROGOBJ = $(NASM) $(NDISASM)
|
||||||
|
PROGS = nasm$(X) ndisasm$(X)
|
||||||
|
|
||||||
|
LIBOBJ_NW = stdlib\snprintf.$(O) stdlib\vsnprintf.$(O) stdlib\strlcpy.$(O) \
|
||||||
stdlib\strnlen.$(O) stdlib\strrchrnul.$(O) \
|
stdlib\strnlen.$(O) stdlib\strrchrnul.$(O) \
|
||||||
\
|
\
|
||||||
nasmlib\ver.$(O) \
|
nasmlib\ver.$(O) \
|
||||||
@ -86,7 +89,7 @@ LIBOBJ = stdlib\snprintf.$(O) stdlib\vsnprintf.$(O) stdlib\strlcpy.$(O) \
|
|||||||
x86\regs.$(O) x86\regvals.$(O) x86\regflags.$(O) x86\regdis.$(O) \
|
x86\regs.$(O) x86\regvals.$(O) x86\regflags.$(O) x86\regdis.$(O) \
|
||||||
x86\disp8.$(O) x86\iflag.$(O) \
|
x86\disp8.$(O) x86\iflag.$(O) \
|
||||||
\
|
\
|
||||||
asm\error.$(O) asm\warnings.$(O) \
|
asm\error.$(O) \
|
||||||
asm\floats.$(O) \
|
asm\floats.$(O) \
|
||||||
asm\directiv.$(O) asm\directbl.$(O) \
|
asm\directiv.$(O) asm\directbl.$(O) \
|
||||||
asm\pragma.$(O) \
|
asm\pragma.$(O) \
|
||||||
@ -111,7 +114,12 @@ LIBOBJ = stdlib\snprintf.$(O) stdlib\vsnprintf.$(O) stdlib\strlcpy.$(O) \
|
|||||||
\
|
\
|
||||||
disasm\disasm.$(O) disasm\sync.$(O)
|
disasm\disasm.$(O) disasm\sync.$(O)
|
||||||
|
|
||||||
ALLOBJ = $(NASM) $(NDISASM) $(LIBOBJ)
|
# Warnings depend on all source files, so handle them separately
|
||||||
|
WARNOBJ = asm\warnings.$(O)
|
||||||
|
|
||||||
|
LIBOBJ = $(LIBOBJ_NW) $(WARNOBJ)
|
||||||
|
ALLOBJ_NW = $(PROGOBJ) $(LIBOBJ_NW)
|
||||||
|
ALLOBJ = $(PROGOBJ) $(LIBOBJ)
|
||||||
|
|
||||||
SUBDIRS = stdlib nasmlib output asm disasm x86 common macros
|
SUBDIRS = stdlib nasmlib output asm disasm x86 common macros
|
||||||
XSUBDIRS = test doc nsis rdoff
|
XSUBDIRS = test doc nsis rdoff
|
||||||
@ -230,18 +238,30 @@ warnings:
|
|||||||
$(RM_F) $(WARNFILES)
|
$(RM_F) $(WARNFILES)
|
||||||
$(MAKE) asm\warnings.time
|
$(MAKE) asm\warnings.time
|
||||||
|
|
||||||
asm\warnings.time: $(ALLOBJ:.@OBJEXT@=.c)
|
asm\warnings.time: $(ALLOBJ_NW:.$(O)=.c)
|
||||||
: > asm\warnings.time
|
: > asm\warnings.time
|
||||||
$(MAKE) $(WARNFILES)
|
$(MAKE) $(WARNFILES:=.time)
|
||||||
|
|
||||||
asm\warnings.c: asm\warnings.pl asm\warnings.time
|
asm\warnings.c.time: asm\warnings.pl asm\warnings.time
|
||||||
$(RUNPERL) $(srcdir)\asm\warnings.pl c asm\warnings.c $(srcdir)
|
$(RUNPERL) $(srcdir)\asm\warnings.pl c asm\warnings.c $(srcdir)
|
||||||
|
: > asm\warnings.c.time
|
||||||
|
|
||||||
include\warnings.h: asm\warnings.pl asm\warnings.time
|
asm\warnings.c: asm\warnings.c.time
|
||||||
|
@: Side effect
|
||||||
|
|
||||||
|
include\warnings.h.time: asm\warnings.pl asm\warnings.time
|
||||||
$(RUNPERL) $(srcdir)\asm\warnings.pl h include\warnings.h $(srcdir)
|
$(RUNPERL) $(srcdir)\asm\warnings.pl h include\warnings.h $(srcdir)
|
||||||
|
: > include\warnings.h.time
|
||||||
|
|
||||||
doc\warnings.src: asm\warnings.pl asm\warnings.time
|
include\warnings.h: include\warnings.h.time
|
||||||
|
@: Side effect
|
||||||
|
|
||||||
|
doc\warnings.src.time: asm\warnings.pl asm\warnings.time
|
||||||
$(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src $(srcdir)
|
$(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src $(srcdir)
|
||||||
|
: > doc\warnings.src.time
|
||||||
|
|
||||||
|
doc\warnings.src : doc\warnings.src.time
|
||||||
|
@: Side effect
|
||||||
|
|
||||||
# Assembler token hash
|
# Assembler token hash
|
||||||
asm\tokhash.c: x86\insns.dat x86\regs.dat asm\tokens.dat asm\tokhash.pl \
|
asm\tokhash.c: x86\insns.dat x86\regs.dat asm\tokens.dat asm\tokhash.pl \
|
||||||
|
@ -53,7 +53,10 @@ X = .exe
|
|||||||
NASM = asm\nasm.$(O)
|
NASM = asm\nasm.$(O)
|
||||||
NDISASM = disasm\ndisasm.$(O)
|
NDISASM = disasm\ndisasm.$(O)
|
||||||
|
|
||||||
LIBOBJ = stdlib\snprintf.$(O) stdlib\vsnprintf.$(O) stdlib\strlcpy.$(O) &
|
PROGOBJ = $(NASM) $(NDISASM)
|
||||||
|
PROGS = nasm$(X) ndisasm$(X)
|
||||||
|
|
||||||
|
LIBOBJ_NW = stdlib\snprintf.$(O) stdlib\vsnprintf.$(O) stdlib\strlcpy.$(O) &
|
||||||
stdlib\strnlen.$(O) stdlib\strrchrnul.$(O) &
|
stdlib\strnlen.$(O) stdlib\strrchrnul.$(O) &
|
||||||
&
|
&
|
||||||
nasmlib\ver.$(O) &
|
nasmlib\ver.$(O) &
|
||||||
@ -75,7 +78,7 @@ LIBOBJ = stdlib\snprintf.$(O) stdlib\vsnprintf.$(O) stdlib\strlcpy.$(O) &
|
|||||||
x86\regs.$(O) x86\regvals.$(O) x86\regflags.$(O) x86\regdis.$(O) &
|
x86\regs.$(O) x86\regvals.$(O) x86\regflags.$(O) x86\regdis.$(O) &
|
||||||
x86\disp8.$(O) x86\iflag.$(O) &
|
x86\disp8.$(O) x86\iflag.$(O) &
|
||||||
&
|
&
|
||||||
asm\error.$(O) asm\warnings.$(O) &
|
asm\error.$(O) &
|
||||||
asm\floats.$(O) &
|
asm\floats.$(O) &
|
||||||
asm\directiv.$(O) asm\directbl.$(O) &
|
asm\directiv.$(O) asm\directbl.$(O) &
|
||||||
asm\pragma.$(O) &
|
asm\pragma.$(O) &
|
||||||
@ -100,7 +103,12 @@ LIBOBJ = stdlib\snprintf.$(O) stdlib\vsnprintf.$(O) stdlib\strlcpy.$(O) &
|
|||||||
&
|
&
|
||||||
disasm\disasm.$(O) disasm\sync.$(O)
|
disasm\disasm.$(O) disasm\sync.$(O)
|
||||||
|
|
||||||
ALLOBJ = $(NASM) $(NDISASM) $(LIBOBJ)
|
# Warnings depend on all source files, so handle them separately
|
||||||
|
WARNOBJ = asm\warnings.$(O)
|
||||||
|
|
||||||
|
LIBOBJ = $(LIBOBJ_NW) $(WARNOBJ)
|
||||||
|
ALLOBJ_NW = $(PROGOBJ) $(LIBOBJ_NW)
|
||||||
|
ALLOBJ = $(PROGOBJ) $(LIBOBJ)
|
||||||
|
|
||||||
SUBDIRS = stdlib nasmlib output asm disasm x86 common macros
|
SUBDIRS = stdlib nasmlib output asm disasm x86 common macros
|
||||||
XSUBDIRS = test doc nsis rdoff
|
XSUBDIRS = test doc nsis rdoff
|
||||||
@ -243,18 +251,30 @@ warnings:
|
|||||||
$(RM_F) $(WARNFILES)
|
$(RM_F) $(WARNFILES)
|
||||||
$(MAKE) asm\warnings.time
|
$(MAKE) asm\warnings.time
|
||||||
|
|
||||||
asm\warnings.time: $(ALLOBJ:.@OBJEXT@=.c)
|
asm\warnings.time: $(ALLOBJ_NW:.$(O)=.c)
|
||||||
: > asm\warnings.time
|
: > asm\warnings.time
|
||||||
$(MAKE) $(WARNFILES)
|
$(MAKE) $(WARNFILES:=.time)
|
||||||
|
|
||||||
asm\warnings.c: asm\warnings.pl asm\warnings.time
|
asm\warnings.c.time: asm\warnings.pl asm\warnings.time
|
||||||
$(RUNPERL) $(srcdir)\asm\warnings.pl c asm\warnings.c $(srcdir)
|
$(RUNPERL) $(srcdir)\asm\warnings.pl c asm\warnings.c $(srcdir)
|
||||||
|
: > asm\warnings.c.time
|
||||||
|
|
||||||
include\warnings.h: asm\warnings.pl asm\warnings.time
|
asm\warnings.c: asm\warnings.c.time
|
||||||
|
@: Side effect
|
||||||
|
|
||||||
|
include\warnings.h.time: asm\warnings.pl asm\warnings.time
|
||||||
$(RUNPERL) $(srcdir)\asm\warnings.pl h include\warnings.h $(srcdir)
|
$(RUNPERL) $(srcdir)\asm\warnings.pl h include\warnings.h $(srcdir)
|
||||||
|
: > include\warnings.h.time
|
||||||
|
|
||||||
doc\warnings.src: asm\warnings.pl asm\warnings.time
|
include\warnings.h: include\warnings.h.time
|
||||||
|
@: Side effect
|
||||||
|
|
||||||
|
doc\warnings.src.time: asm\warnings.pl asm\warnings.time
|
||||||
$(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src $(srcdir)
|
$(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src $(srcdir)
|
||||||
|
: > doc\warnings.src.time
|
||||||
|
|
||||||
|
doc\warnings.src : doc\warnings.src.time
|
||||||
|
@: Side effect
|
||||||
|
|
||||||
# Assembler token hash
|
# Assembler token hash
|
||||||
asm\tokhash.c: x86\insns.dat x86\regs.dat asm\tokens.dat asm\tokhash.pl &
|
asm\tokhash.c: x86\insns.dat x86\regs.dat asm\tokens.dat asm\tokhash.pl &
|
||||||
|
Loading…
x
Reference in New Issue
Block a user