summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--ChangeLog9
-rw-r--r--Makefile.in62
-rw-r--r--Mkfiles/Makefile.b3258
-rw-r--r--Mkfiles/Makefile.bc248
-rw-r--r--Mkfiles/Makefile.bor46
-rw-r--r--Mkfiles/Makefile.dj68
-rw-r--r--Mkfiles/Makefile.djo154
-rw-r--r--Mkfiles/Makefile.dos46
-rw-r--r--Mkfiles/Makefile.emx58
-rw-r--r--Mkfiles/Makefile.lcc58
-rw-r--r--Mkfiles/Makefile.os244
-rw-r--r--Mkfiles/Makefile.sc46
-rw-r--r--Mkfiles/Makefile.scw46
-rw-r--r--Mkfiles/Makefile.unx70
-rw-r--r--Mkfiles/Makefile.vc46
-rw-r--r--Mkfiles/Makefile.wc44
-rw-r--r--Mkfiles/Makefile.wcw44
-rw-r--r--macros.pl53
-rwxr-xr-xnasm-version5
-rw-r--r--nasm.h4
-rw-r--r--standard.mac8
-rw-r--r--version1
-rwxr-xr-xversion.pl67
24 files changed, 609 insertions, 477 deletions
diff --git a/CHANGES b/CHANGES
index fc33f8a..ff97c75 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
-------
* Correctly build in a separate object directory again.
+* Derive all references to the version number from the version file.
0.98.30
diff --git a/ChangeLog b/ChangeLog
index 4c66f53..511b14e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,13 @@
2002-05-03 H. Peter Anvin <hpa@zytor.com>
+ * (Makefile.in Mkfiles/*): use new version -> version.{h,mac}.
+ * (macros.pl): support multiple input files (standard.mac, version.mac).
+ * (standard.mac): use an explicit delimiter to end the TASM macros.
+ * (nasm-version): remove, no longer needed.
+ * (version.pl): script to produce version.h and version.mac from version.
+ * (version): contains the official NASM version.
+ * (nasm.h): include version.h.
+
+2002-05-03 H. Peter Anvin <hpa@zytor.com>
* (configure.in): create output directory.
* (Makefile.in): change cd ; to cd &&.
diff --git a/Makefile.in b/Makefile.in
index b9eedf9..e21b392 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -57,30 +57,30 @@ nasm: $(NASM)
ndisasm: $(NDISASM)
$(CC) $(LDFLAGS) -o ndisasm $(NDISASM)
-assemble.o: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.o: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.o: eval.c eval.h nasm.h insnsi.h nasmlib.h
-float.o: float.c nasm.h insnsi.h
-insnsa.o: insnsa.c nasm.h insnsi.h insns.h
-insnsd.o: insnsd.c nasm.h insnsi.h insns.h
-labels.o: labels.c nasm.h insnsi.h nasmlib.h
-listing.o: listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
+assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
+disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
+float.o: float.c nasm.h version.h insnsi.h
+insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
+labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
outform.h listing.h insns.h
-nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.o: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
-output/outas86.o: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
-output/outbin.o: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
-output/outcoff.o: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-output/outdbg.o: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-output/outelf.o: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
-outform.o: outform.c outform.h nasm.h insnsi.h
-output/outobj.o: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
-output/outrdf2.o: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-output/outieee.o: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
-parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
+nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
+output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
+outform.o: outform.c outform.h nasm.h version.h insnsi.h
+output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
+parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
sync.o: sync.c sync.h
# These source files are automagically generated from a single
@@ -97,16 +97,24 @@ insnsi.h: insns.dat insns.pl
insnsn.c: insns.dat insns.pl
perl $(srcdir)/insns.pl -n $(srcdir)/insns.dat
+# These files contains all the standard macros that are derived from
+# the version number.
+version.h: version version.pl
+ perl $(srcdir)/version.pl h < $(srcdir)/version > version.h
+
+version.mac: version version.pl
+ perl $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
+
# This source file is generated from the standard macros file
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
-macros.c: standard.mac macros.pl
- perl $(srcdir)/macros.pl $(srcdir)/standard.mac
+macros.c: macros.pl standard.mac version.mac
+ perl $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
# This target generates all files that require perl.
# This allows easier generation of distribution (see dist target).
-perlreq: macros.c insnsa.c insnsd.c insnsi.h insnsn.c
+perlreq: macros.c insnsa.c insnsd.c insnsi.h insnsn.c version.h version.mac
install: nasm ndisasm
$(INSTALL_PROGRAM) nasm $(INSTALLROOT)$(bindir)/nasm
@@ -150,4 +158,4 @@ install_everything: everything install install_doc install_rdf
dist: spotless perlreq
autoconf
rm -rf ./autom4te.cache
- tar cvjf ../nasm-`./nasm-version`-`date +%Y%m%d`.tar.bz2 ../`./nasm-dir`
+ tar cvjf ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 ../`./nasm-dir`
diff --git a/Mkfiles/Makefile.b32 b/Mkfiles/Makefile.b32
index 98dc6f8..908f48e 100644
--- a/Mkfiles/Makefile.b32
+++ b/Mkfiles/Makefile.b32
@@ -114,30 +114,30 @@ ndisasm$(SUFFIX)$(EXE): $(NDISASMOBJS)
# OBJs with dependencies
-assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h insnsi.h
-insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
-labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
+assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
+disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
+float.$(OBJ): float.c nasm.h version.h insnsi.h
+insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
+labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
-parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
+nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
+output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
+outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
+parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
sync.$(OBJ): sync.c sync.h
# These source files are automagically generated from a single
@@ -157,8 +157,16 @@ InstructionData: insns.dat insns.pl
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
-macros.c: standard.mac macros.pl
- perl $(srcdir)/macros.pl $(srcdir)/standard.mac
+macros.c: macros.pl standard.mac version.mac
+ perl $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
+
+# These files contains all the standard macros that are derived from
+# the version number.
+version.h: version version.pl
+ perl $(srcdir)/version.pl h < $(srcdir)/version > version.h
+
+version.mac: version version.pl
+ perl $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
clean:
@-del /S *.obj 2> NUL 1>&2
diff --git a/Mkfiles/Makefile.bc2 b/Mkfiles/Makefile.bc2
index 49f10d3..f45457e 100644
--- a/Mkfiles/Makefile.bc2
+++ b/Mkfiles/Makefile.bc2
@@ -139,50 +139,50 @@ ndisasm$(EXE): $(NDISASMOBJS)
################################################################
# Dependencies for all of NASM's obj files
-$(OBJD)assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
+$(OBJD)assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
$(NASM_ASM)
-$(OBJD)float.$(OBJ): float.c nasm.h insnsi.h
+$(OBJD)float.$(OBJ): float.c nasm.h version.h insnsi.h
$(NASM_ASM)
-$(OBJD)labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
+$(OBJD)labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
+$(OBJD)listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
$(NASM_ASM)
-$(OBJD)eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
+$(OBJD)eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
$(NASM_ASM)
-$(OBJD)nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
+$(OBJD)nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
$(NASM_ASM)
-$(OBJD)nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
+$(OBJD)nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
$(NASM_ASM)
-$(OBJD)parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+$(OBJD)parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
$(NASM_ASM)
-$(OBJD)preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
+$(OBJD)preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
+$(OBJD)insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
$(NASM_ASM)
################################################################
# Dependencies for all of NDISASM's obj files
-$(OBJD)disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+$(OBJD)disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
$(DASM_ASM)
-$(OBJD)ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
+$(OBJD)ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
$(DASM_ASM)
$(OBJD)sync.$(OBJ): sync.c sync.h
$(DASM_ASM)
-$(OBJD)insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
+$(OBJD)insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
$(DASM_ASM)
# This is a kludge from the word go, as we can't use the nasmlib.obj compiled
@@ -195,40 +195,40 @@ $(OBJD)insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
# the -o... switch tells it the name to compile the obj file to, right here
# $(OBJD)nasmlibd.obj
-$(OBJD)nasmlibd.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h
+$(OBJD)nasmlibd.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h
$(CC) $(DCCFLAGS) -o$(OBJD)nasmlibd.obj nasmlib.c
################################################################
# Dependencies for all of the output format's OBJ files
-$(OBJD)outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
+$(OBJD)outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
+$(OBJD)outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
$(NASM_ASM)
################################################################
diff --git a/Mkfiles/Makefile.bor b/Mkfiles/Makefile.bor
index 49d3355..afd1f9b 100644
--- a/Mkfiles/Makefile.bor
+++ b/Mkfiles/Makefile.bor
@@ -53,30 +53,30 @@ ndisasm$(EXE): $(NDISASMOBJS)
# $(LINK) /Fendisasm.exe $(NDISASMOBJS)
$(LINK) /Tde $(NDISASMOBJS),ndisasm.exe,,cl.lib,
-assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h insnsi.h
-insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
-labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
+assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
+disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
+float.$(OBJ): float.c nasm.h version.h insnsi.h
+insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
+labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
-parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
+nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
+output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
+outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
+parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
sync.$(OBJ): sync.c sync.h
clean :
diff --git a/Mkfiles/Makefile.dj b/Mkfiles/Makefile.dj
index afa3d03..40a5bc8 100644
--- a/Mkfiles/Makefile.dj
+++ b/Mkfiles/Makefile.dj
@@ -36,30 +36,30 @@ nasm.exe: $(NASM)
ndisasm.exe: $(NDISASM)
$(CC) -o $@ $(NDISASM)
-assemble.o: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.o: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.o: eval.c eval.h nasm.h insnsi.h nasmlib.h
-float.o: float.c nasm.h insnsi.h
-insnsa.o: insnsa.c nasm.h insnsi.h insns.h
-insnsd.o: insnsd.c nasm.h insnsi.h insns.h
-labels.o: labels.c nasm.h insnsi.h nasmlib.h
-listing.o: listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
+assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
+disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
+float.o: float.c nasm.h version.h insnsi.h
+insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
+labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
outform.h listing.h
-nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.o: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
-output/outas86.o: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
-output/outbin.o: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
-output/outcoff.o: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-output/outdbg.o: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-output/outelf.o: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
-outform.o: outform.c outform.h nasm.h insnsi.h
-output/outobj.o: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
-output/outrdf2.o: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-output/outieee.o: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
-parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
+nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
+output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
+outform.o: outform.c outform.h nasm.h version.h insnsi.h
+output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
+parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
sync.o: sync.c sync.h
# These source files are automagically generated from a single
@@ -67,15 +67,29 @@ sync.o: sync.c sync.h
# though, so it isn't necessary to have Perl just to recompile NASM
# from the distribution.
-insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
- perl insns.pl insns.dat
+insnsa.c: insns.dat insns.pl
+ perl insns.pl -a insns.dat
+insnsd.c: insns.dat insns.pl
+ perl insns.pl -d insns.dat
+insnsi.h: insns.dat insns.pl
+ perl insns.pl -i insns.dat
+insnsn.c: insns.dat insns.pl
+ perl insns.pl -n insns.dat
+
+# These files contains all the standard macros that are derived from
+# the version number.
+version.h: version version.pl
+ perl version.pl h < version > version.h
+
+version.mac: version version.pl
+ perl version.pl mac < version > version.mac
# This source file is generated from the standard macros file
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
-macros.c: standard.mac macros.pl
- perl macros.pl standard.mac
+macros.c: macros.pl standard.mac version.mac
+ perl macros.pl standard.mac version.mac
clean:
rm -f *.o nasm ndisasm
diff --git a/Mkfiles/Makefile.djo b/Mkfiles/Makefile.djo
index 5206f1a..e33e01c 100644
--- a/Mkfiles/Makefile.djo
+++ b/Mkfiles/Makefile.djo
@@ -87,83 +87,83 @@ nasmd.exe: $(NASM)
-g -o $@ $(NASM)
<<
-assemble.o: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.o: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.o: eval.c eval.h nasm.h insnsi.h nasmlib.h
-float.o: float.c nasm.h insnsi.h
-insnsa.o: insnsa.c nasm.h insnsi.h insns.h
-insnsd.o: insnsd.c nasm.h insnsi.h insns.h
-labels.o: labels.c nasm.h insnsi.h nasmlib.h
-listing.o: listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
+assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
+disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
+float.o: float.c nasm.h version.h insnsi.h
+insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
+labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
outform.h listing.h
-nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.o: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
-output/outas86.o: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
-output/outbin.o: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
-output/outcoff.o: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-output/outdbg.o: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-output/outelf.o: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
-outform.o: outform.c outform.h nasm.h insnsi.h
-output/outobj.o: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
-output/outrdf2.o: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
+nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
+output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
+outform.o: outform.c outform.h nasm.h version.h insnsi.h
+output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
+parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
sync.o: sync.c sync.h
-output/outieee.o: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
-
-assemble.ol: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.ol: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.ol: eval.c eval.h nasm.h insnsi.h nasmlib.h
-float.ol: float.c nasm.h insnsi.h
-insnsa.ol: insnsa.c nasm.h insnsi.h insns.h
-insnsd.ol: insnsd.c nasm.h insnsi.h insns.h
-labels.ol: labels.c nasm.h insnsi.h nasmlib.h
-listing.ol: listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.ol: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
+output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
+
+assemble.ol: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
+disasm.ol: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.ol: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
+float.ol: float.c nasm.h version.h insnsi.h
+insnsa.ol: insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.ol: insnsd.c nasm.h version.h insnsi.h insns.h
+labels.ol: labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.ol: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.ol: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
outform.h listing.h
-nasmlib.ol: nasmlib.c nasm.h insnsi.h nasmlib.h
-ndisasm.ol: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.ol: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
-output/outas86.ol: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
-output/outbin.ol: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
-output/outcoff.ol: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-output/outdbg.ol: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-output/outelf.ol: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
-outform.ol: outform.c outform.h nasm.h insnsi.h
-output/outobj.ol: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
-output/outrdf2.ol: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-parser.ol: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.ol: preproc.c nasm.h insnsi.h nasmlib.h macros.c
+nasmlib.ol: nasmlib.c nasm.h version.h insnsi.h nasmlib.h
+ndisasm.ol: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
+output/outaout.ol: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outas86.ol: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outbin.ol: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outcoff.ol: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outdbg.ol: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outelf.ol: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
+outform.ol: outform.c outform.h nasm.h version.h insnsi.h
+output/outobj.ol: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outrdf2.ol: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
+parser.ol: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.ol: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
sync.ol: sync.c sync.h
-output/outieee.ol: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
-
-assemble.obj: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.obj: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.obj: eval.c eval.h nasm.h insnsi.h nasmlib.h
-float.obj: float.c nasm.h insnsi.h
-insnsa.obj: insnsa.c nasm.h insnsi.h insns.h
-insnsd.obj: insnsd.c nasm.h insnsi.h insns.h
-labels.obj: labels.c nasm.h insnsi.h nasmlib.h
-listing.obj: listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.obj: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
+output/outieee.ol: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
+
+assemble.obj: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
+disasm.obj: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.obj: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
+float.obj: float.c nasm.h version.h insnsi.h
+insnsa.obj: insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.obj: insnsd.c nasm.h version.h insnsi.h insns.h
+labels.obj: labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.obj: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.obj: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
outform.h listing.h
-nasmlib.obj: nasmlib.c nasm.h insnsi.h nasmlib.h
-ndisasm.obj: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.obj: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
-output/outas86.obj: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
-output/outbin.obj: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
-output/outcoff.obj: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-output/outdbg.obj: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-output/outelf.obj: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
-outform.obj: outform.c outform.h nasm.h insnsi.h
-output/outobj.obj: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
-output/outrdf2.obj: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-parser.obj: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.obj: preproc.c nasm.h insnsi.h nasmlib.h macros.c
+nasmlib.obj: nasmlib.c nasm.h version.h insnsi.h nasmlib.h
+ndisasm.obj: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
+output/outaout.obj: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outas86.obj: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outbin.obj: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outcoff.obj: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outdbg.obj: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outelf.obj: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
+outform.obj: outform.c outform.h nasm.h version.h insnsi.h
+output/outobj.obj: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outrdf2.obj: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
+parser.obj: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.obj: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
sync.obj: sync.c sync.h
-output/outieee.obj: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
+output/outieee.obj: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
# These four source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
@@ -173,12 +173,20 @@ output/outieee.obj: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
perl insns.pl insns.dat
+# These files contains all the standard macros that are derived from
+# the version number.
+version.h: version version.pl
+ perl $(srcdir)/version.pl h < $(srcdir)/version > version.h
+
+version.mac: version version.pl
+ perl $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
+
# This source file is generated from the standard macros file
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
-macros.c: standard.mac macros.pl
- perl macros.pl standard.mac
+macros.c: standard.mac macros.pl version.mac
+ perl macros.pl standard.mac version.mac
clean:
rm -f *.o nasm ndisasm
diff --git a/Mkfiles/Makefile.dos b/Mkfiles/Makefile.dos
index b6574f8..02e2180 100644
--- a/Mkfiles/Makefile.dos
+++ b/Mkfiles/Makefile.dos
@@ -42,36 +42,36 @@ nasm$(EXE): $(NASMOBJS)
ndisasm$(EXE): $(NDISASMOBJS)
cl /Fendisasm.exe $(NDISASMOBJS)
-assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c eval.h nasm.h insnsi.h nasmlib.h
-float.$(OBJ): float.c nasm.h insnsi.h
-labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
+assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
+disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.$(OBJ): eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
+float.$(OBJ): float.c nasm.h version.h insnsi.h
+labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
-parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
+nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
+output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
+outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
+parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
sync.$(OBJ): sync.c sync.h
# Another grotty hack: QC is less likely to run out of memory than
# CL proper; and we don't need any optimisation in these modules
# since they're just data.
-insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
+insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
$(QCL) insnsa.c
-insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
+insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
$(QCL) insnsd.c
clean :
diff --git a/Mkfiles/Makefile.emx b/Mkfiles/Makefile.emx
index 26264a9..89e9f76 100644
--- a/Mkfiles/Makefile.emx
+++ b/Mkfiles/Makefile.emx
@@ -59,31 +59,31 @@ nasm: $(NASM)
ndisasm: $(NDISASM)
$(CC) $(LDFLAGS) -o ndisasm $(NDISASM) $(LIBS)
-assemble.o: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.o: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.o: eval.c eval.h nasm.h insnsi.h nasmlib.h
-float.o: float.c nasm.h insnsi.h
-insnsa.o: insnsa.c nasm.h insnsi.h insns.h
-insnsd.o: insnsd.c nasm.h insnsi.h insns.h
-labels.o: labels.c nasm.h insnsi.h nasmlib.h
-listing.o: listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
+assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
+disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
+float.o: float.c nasm.h version.h insnsi.h
+insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
+labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
outform.h listing.h
-nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.o: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
-output/outas86.o: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
-output/outbin.o: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
-output/outcoff.o: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-output/outdbg.o: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-output/outelf.o: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
-outform.o: outform.c outform.h nasm.h insnsi.h
-output/outobj.o: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
-output/outrdf2.o: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
+nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
+output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
+outform.o: outform.c outform.h nasm.h version.h insnsi.h
+output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
+parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
sync.o: sync.c sync.h
-output/outieee.o: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
+output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
# These source files are automagically generated from a single
# instruction-table file by a Perl script. They're distributed,
@@ -99,12 +99,20 @@ insnsi.h: insns.dat insns.pl
insnsn.c: insns.dat insns.pl
perl $(srcdir)/insns.pl -n $(srcdir)/insns.dat
+# These files contains all the standard macros that are derived from
+# the version number.
+version.h: version version.pl
+ perl $(srcdir)/version.pl h < $(srcdir)/version > version.h
+
+version.mac: version version.pl
+ perl $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
+
# This source file is generated from the standard macros file
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
-macros.c: standard.mac macros.pl
- perl $(srcdir)/macros.pl $(srcdir)/standard.mac
+macros.c: standard.mac macros.pl version.mac
+ perl $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
install: nasm ndisasm
$(INSTALL_PROGRAM) nasm $(INSTALLROOT)$(bindir)/nasm
diff --git a/Mkfiles/Makefile.lcc b/Mkfiles/Makefile.lcc
index 9c6a937..460bf86 100644
--- a/Mkfiles/Makefile.lcc
+++ b/Mkfiles/Makefile.lcc
@@ -68,30 +68,30 @@ nasm: $(NASM) nasm.lnk
ndisasm: $(NDISASM) ndisasm.lnk
$(LD) -o ndisasm.exe @ndisasm.lnk
-assemble.${OBJ}: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insns.h
-disasm.${OBJ}: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.${OBJ}: eval.c eval.h nasm.h insnsi.h nasmlib.h
-float.${OBJ}: float.c nasm.h insnsi.h
-insnsa.${OBJ}: insnsa.c nasm.h insnsi.h insns.h
-insnsd.${OBJ}: insnsd.c nasm.h insnsi.h insns.h
-labels.${OBJ}: labels.c nasm.h insnsi.h nasmlib.h
-listing.${OBJ}: listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.${OBJ}: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
+assemble.${OBJ}: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insns.h
+disasm.${OBJ}: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.${OBJ}: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
+float.${OBJ}: float.c nasm.h version.h insnsi.h
+insnsa.${OBJ}: insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.${OBJ}: insnsd.c nasm.h version.h insnsi.h insns.h
+labels.${OBJ}: labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.${OBJ}: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.${OBJ}: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
outform.h listing.h
-nasmlib.${OBJ}: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.${OBJ}: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.${OBJ}: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
-output/outas86.${OBJ}: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
-output/outbin.${OBJ}: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
-output/outcoff.${OBJ}: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-output/outdbg.${OBJ}: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-output/outelf.${OBJ}: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
-outform.${OBJ}: outform.c outform.h nasm.h insnsi.h
-output/outobj.${OBJ}: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
-output/outrdf2.${OBJ}: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-output/outieee.${OBJ}: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
-parser.${OBJ}: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.${OBJ}: preproc.c nasm.h insnsi.h nasmlib.h macros.c
+nasmlib.${OBJ}: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.${OBJ}: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
+output/outaout.${OBJ}: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outas86.${OBJ}: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outbin.${OBJ}: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outcoff.${OBJ}: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outdbg.${OBJ}: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outelf.${OBJ}: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
+outform.${OBJ}: outform.c outform.h nasm.h version.h insnsi.h
+output/outobj.${OBJ}: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outrdf2.${OBJ}: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outieee.${OBJ}: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
+parser.${OBJ}: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.${OBJ}: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
sync.${OBJ}: sync.c sync.h
# These source files are automagically generated from a single
@@ -102,12 +102,20 @@ sync.${OBJ}: sync.c sync.h
insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
perl insns.pl insns.dat
+# These files contains all the standard macros that are derived from
+# the version number.
+version.h: version version.pl
+ perl version.pl h < version > version.h
+
+version.mac: version version.pl
+ perl version.pl mac < version > version.mac
+
# This source file is generated from the standard macros file
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
-macros.c: standard.mac macros.pl
- perl macros.pl standard.mac
+macros.c: standard.mac macros.pl version.mac
+ perl macros.pl standard.mac version.mac
clean:
rm -f *.${OBJ} nasm.exe ndisasm.exe
diff --git a/Mkfiles/Makefile.os2 b/Mkfiles/Makefile.os2
index de4bad3..4c9dc07 100644
--- a/Mkfiles/Makefile.os2
+++ b/Mkfiles/Makefile.os2
@@ -106,50 +106,50 @@ ndisasm2$(EXE): $(NDISASMOBJS)
################################################################
# Dependencies for all of NASM's obj files
-$(OBJD)assemble.$(OBJ): assemble.c nasm.h assemble.h insns.h
+$(OBJD)assemble.$(OBJ): assemble.c nasm.h version.h assemble.h insns.h
$(NASM_ASM)
-$(OBJD)float.$(OBJ): float.c nasm.h
+$(OBJD)float.$(OBJ): float.c nasm.h version.h
$(NASM_ASM)
-$(OBJD)labels.$(OBJ): labels.c nasm.h nasmlib.h
+$(OBJD)labels.$(OBJ): labels.c nasm.h version.h nasmlib.h
$(NASM_ASM)
-$(OBJD)listing.$(OBJ): listing.c nasm.h nasmlib.h listing.h
+$(OBJD)listing.$(OBJ): listing.c nasm.h version.h nasmlib.h listing.h
$(NASM_ASM)
-$(OBJD)eval.$(OBJ): eval.c nasm.h nasmlib.h eval.h
+$(OBJD)eval.$(OBJ): eval.c nasm.h version.h nasmlib.h eval.h
$(NASM_ASM)
-$(OBJD)nasm.$(OBJ): nasm.c nasm.h nasmlib.h parser.h assemble.h labels.h \
+$(OBJD)nasm.$(OBJ): nasm.c nasm.h version.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
$(NASM_ASM)
-$(OBJD)nasmlib.$(OBJ): nasmlib.c nasm.h nasmlib.h names.c insnsn.c
+$(OBJD)nasmlib.$(OBJ): nasmlib.c nasm.h version.h nasmlib.h names.c insnsn.c
$(NASM_ASM)
-$(OBJD)parser.$(OBJ): parser.c nasm.h nasmlib.h parser.h float.h names.c
+$(OBJD)parser.$(OBJ): parser.c nasm.h version.h nasmlib.h parser.h float.h names.c
$(NASM_ASM)
-$(OBJD)preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h nasmlib.h
+$(OBJD)preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h nasmlib.h
$(NASM_ASM)
-$(OBJD)insnsa.$(OBJ): insnsa.c nasm.h insns.h
+$(OBJD)insnsa.$(OBJ): insnsa.c nasm.h version.h insns.h
$(NASM_ASM)
################################################################
# Dependencies for all of NDISASM's obj files
-$(OBJD)disasm.$(OBJ): disasm.c nasm.h disasm.h sync.h insns.h names.c
+$(OBJD)disasm.$(OBJ): disasm.c nasm.h version.h disasm.h sync.h insns.h names.c
$(DASM_ASM)
-$(OBJD)ndisasm.$(OBJ): ndisasm.c nasm.h sync.h disasm.h
+$(OBJD)ndisasm.$(OBJ): ndisasm.c nasm.h version.h sync.h disasm.h
$(DASM_ASM)
$(OBJD)sync.$(OBJ): sync.c sync.h
$(DASM_ASM)
-$(OBJD)insnsd.$(OBJ): insnsd.c nasm.h insns.h
+$(OBJD)insnsd.$(OBJ): insnsd.c nasm.h version.h insns.h
$(DASM_ASM)
# This is a kludge from the word go, as we can't use the nasmlib.obj compiled
@@ -162,34 +162,34 @@ $(OBJD)insnsd.$(OBJ): insnsd.c nasm.h insns.h
# the -o... switch tells it the name to compile the obj file to, right here
# $(OBJD)nasmlibd.obj
-$(OBJD)nasmlibd.$(OBJ): nasmlib.c nasm.h nasmlib.h
+$(OBJD)nasmlibd.$(OBJ): nasmlib.c nasm.h version.h nasmlib.h
$(CC) $(DCCFLAGS) -o$(OBJD)nasmlibd.obj nasmlib.c
################################################################
# Dependencies for all of the output format's OBJ files
-$(OBJD)outas86.$(OBJ): output/outas86.c nasm.h nasmlib.h
+$(OBJD)outas86.$(OBJ): output/outas86.c nasm.h version.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outaout.$(OBJ): output/outaout.c nasm.h nasmlib.h
+$(OBJD)outaout.$(OBJ): output/outaout.c nasm.h version.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outbin.$(OBJ): output/outbin.c nasm.h nasmlib.h
+$(OBJD)outbin.$(OBJ): output/outbin.c nasm.h version.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outcoff.$(OBJ): output/outcoff.c nasm.h nasmlib.h
+$(OBJD)outcoff.$(OBJ): output/outcoff.c nasm.h version.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outdbg.$(OBJ): output/outdbg.c nasm.h nasmlib.h
+$(OBJD)outdbg.$(OBJ): output/outdbg.c nasm.h version.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outelf.$(OBJ): output/outelf.c nasm.h nasmlib.h
+$(OBJD)outelf.$(OBJ): output/outelf.c nasm.h version.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outobj.$(OBJ): output/outobj.c nasm.h nasmlib.h
+$(OBJD)outobj.$(OBJ): output/outobj.c nasm.h version.h nasmlib.h
$(NASM_ASM)
-$(OBJD)outform.$(OBJ): outform.c outform.h nasm.h
+$(OBJD)outform.$(OBJ): outform.c outform.h nasm.h version.h
$(NASM_ASM)
################################################################
diff --git a/Mkfiles/Makefile.sc b/Mkfiles/Makefile.sc
index aa932b1..429d7a6 100644
--- a/Mkfiles/Makefile.sc
+++ b/Mkfiles/Makefile.sc
@@ -82,31 +82,31 @@ ndisasm.exe
# modules for programs
#
-disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
-eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h insnsi.h
-labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
+disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
+eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
+float.$(OBJ): float.c nasm.h version.h insnsi.h
+labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
-parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
+nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
+output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
+outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
+parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
sync.$(OBJ): sync.c sync.h
-insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
+insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
diff --git a/Mkfiles/Makefile.scw b/Mkfiles/Makefile.scw
index 5cd0674..8922df3 100644
--- a/Mkfiles/Makefile.scw
+++ b/Mkfiles/Makefile.scw
@@ -82,31 +82,31 @@ ndisasmw.exe;
# modules for programs
#
-disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
-eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h insnsi.h
-labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
+disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
+eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
+float.$(OBJ): float.c nasm.h version.h insnsi.h
+labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
-parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
+nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
+output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
+outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
+parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
sync.$(OBJ): sync.c sync.h
-insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
+insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
diff --git a/Mkfiles/Makefile.unx b/Mkfiles/Makefile.unx
index b568849..859cae9 100644
--- a/Mkfiles/Makefile.unx
+++ b/Mkfiles/Makefile.unx
@@ -1,8 +1,8 @@
# Unix fall-back makefile for the Netwide Assembler. For use if
# `configure' fails to generate a workable Makefile.
#
-# If `configure' doesn't work for you, *please* inform <hpa@zytor.com>
-# and <nasm-bugs@lists.sourceforge.net>
+# If `configure' doesn't work for you, *please* inform
+# <nasm-bugs@lists.sourceforge.net>
#
# The Netwide Assembler is copyright (C) 1996 Simon Tatham and
# Julian Hall. All rights reserved. The software is
@@ -42,46 +42,50 @@ nasm: $(NASM)
ndisasm: $(NDISASM)
$(CC) -o ndisasm $(NDISASM)
-assemble.o: assemble.c nasm.h insnsi.h nasmlib.h assemble.h insnsn.c
-disasm.o: disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.o: eval.c eval.h nasm.h insnsi.h nasmlib.h
-float.o: float.c nasm.h insnsi.h
-insnsa.o: insnsa.c nasm.h insnsi.h insns.h
-insnsd.o: insnsd.c nasm.h insnsi.h insns.h
-labels.o: labels.c nasm.h insnsi.h nasmlib.h
-listing.o: listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.o: nasm.c nasm.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
+assemble.o: assemble.c nasm.h version.h insnsi.h nasmlib.h assemble.h insnsn.c
+disasm.o: disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.o: eval.c eval.h nasm.h version.h insnsi.h nasmlib.h
+float.o: float.c nasm.h version.h insnsi.h
+insnsa.o: insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.o: insnsd.c nasm.h version.h insnsi.h insns.h
+labels.o: labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.o: listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.o: nasm.c nasm.h version.h insnsi.h nasmlib.h preproc.h parser.h assemble.h labels.h \
outform.h listing.h
-nasmlib.o: nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.o: ndisasm.c nasm.h insnsi.h nasmlib.h sync.h disasm.h
-output/outaout.o: output/outaout.c nasm.h insnsi.h nasmlib.h outform.h
-output/outas86.o: output/outas86.c nasm.h insnsi.h nasmlib.h outform.h
-output/outbin.o: output/outbin.c nasm.h insnsi.h nasmlib.h outform.h
-output/outcoff.o: output/outcoff.c nasm.h insnsi.h nasmlib.h outform.h
-output/outdbg.o: output/outdbg.c nasm.h insnsi.h nasmlib.h outform.h
-output/outelf.o: output/outelf.c nasm.h insnsi.h nasmlib.h outform.h
-outform.o: outform.c outform.h nasm.h insnsi.h
-output/outobj.o: output/outobj.c nasm.h insnsi.h nasmlib.h outform.h
-output/outrdf2.o: output/outrdf2.c nasm.h insnsi.h nasmlib.h outform.h
-output/outieee.o: output/outieee.c nasm.h insnsi.h nasmlib.h outform.h
-parser.o: parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.o: preproc.c nasm.h insnsi.h nasmlib.h macros.c
+nasmlib.o: nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.o: ndisasm.c nasm.h version.h insnsi.h nasmlib.h sync.h disasm.h
+output/outaout.o: output/outaout.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outas86.o: output/outas86.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outbin.o: output/outbin.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outcoff.o: output/outcoff.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outdbg.o: output/outdbg.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outelf.o: output/outelf.c nasm.h version.h insnsi.h nasmlib.h outform.h
+outform.o: outform.c outform.h nasm.h version.h insnsi.h
+output/outobj.o: output/outobj.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outrdf2.o: output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h outform.h
+output/outieee.o: output/outieee.c nasm.h version.h insnsi.h nasmlib.h outform.h
+parser.o: parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.o: preproc.c nasm.h version.h insnsi.h nasmlib.h macros.c
sync.o: sync.c sync.h
-# These source files are automagically generated from a single
-# instruction-table file by a Perl script. They're distributed,
-# though, so it isn't necessary to have Perl just to recompile NASM
-# from the distribution.
+# These files contains all the standard macros that are derived from
+# the version number.
+version.h: version version.pl
+ perl version.pl h < version > version.h
-insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
- perl insns.pl insns.dat
+version.mac: version version.pl
+ perl version.pl mac < version > version.mac
# This source file is generated from the standard macros file
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
-macros.c: standard.mac macros.pl
- perl macros.pl standard.mac
+macros.c: macros.pl standard.mac version.mac
+ perl macros.pl standard.mac version.mac
+
+# This target generates all files that require perl.
+# This allows easier generation of distribution (see dist target).
+perlreq: macros.c insnsa.c insnsd.c insnsi.h insnsn.c version.h version.mac
install: nasm ndisasm
$(INSTALL_PROGRAM) nasm $(bindir)/nasm
diff --git a/Mkfiles/Makefile.vc b/Mkfiles/Makefile.vc
index da6ecfc..6669abf 100644
--- a/Mkfiles/Makefile.vc
+++ b/Mkfiles/Makefile.vc
@@ -41,36 +41,36 @@ nasm$(SUFFIX)$(EXE): $(NASMOBJS)
ndisasm$(SUFFIX)$(EXE): $(NDISASMOBJS)
cl /Fendisasm$(SUFFIX).exe $(NDISASMOBJS)
-assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h insnsi.h
-labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
+assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
+disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
+float.$(OBJ): float.c nasm.h version.h insnsi.h
+labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
-output/outdbg.$(OBJ): output/outdbg.c nasm.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
-parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
+nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
+output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
+output/outdbg.$(OBJ): output/outdbg.c nasm.h version.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
+outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
+parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
sync.$(OBJ): sync.c sync.h
# Another grotty hack: QC is less likely to run out of memory than
# CL proper; and we don't need any optimisation in these modules
# since they're just data.
-insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
+insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
$(QCL) insnsa.c
-insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
+insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
$(QCL) insnsd.c
clean :
diff --git a/Mkfiles/Makefile.wc b/Mkfiles/Makefile.wc
index 6dbbd53..4820f31 100644
--- a/Mkfiles/Makefile.wc
+++ b/Mkfiles/Makefile.wc
@@ -91,29 +91,29 @@ NDISASM.LNK: makefile.wc
echo F nasmlib.$(OBJ) >> NDISASM.LNK
echo F insnsd.$(OBJ) >> NDISASM.LNK
-assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h insnsi.h
-insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
-labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
+assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
+disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
+float.$(OBJ): float.c nasm.h version.h insnsi.h
+insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
+labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h
-ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
-parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
+nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h
+ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
+output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
+outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
+parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
sync.$(OBJ): sync.c sync.h
clean :
diff --git a/Mkfiles/Makefile.wcw b/Mkfiles/Makefile.wcw
index 256096c..9e92311 100644
--- a/Mkfiles/Makefile.wcw
+++ b/Mkfiles/Makefile.wcw
@@ -91,29 +91,29 @@ NDISASM.LNK: makefile.wcw
echo F nasmlib.$(OBJ) >> NDISASM.LNK
echo F insnsd.$(OBJ) >> NDISASM.LNK
-assemble.$(OBJ): assemble.c nasm.h insnsi.h assemble.h insns.h
-disasm.$(OBJ): disasm.c nasm.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
-eval.$(OBJ): eval.c nasm.h insnsi.h nasmlib.h eval.h
-float.$(OBJ): float.c nasm.h insnsi.h
-insnsa.$(OBJ): insnsa.c nasm.h insnsi.h insns.h
-insnsd.$(OBJ): insnsd.c nasm.h insnsi.h insns.h
-labels.$(OBJ): labels.c nasm.h insnsi.h nasmlib.h
-listing.$(OBJ): listing.c nasm.h insnsi.h nasmlib.h listing.h
-nasm.$(OBJ): nasm.c nasm.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
+assemble.$(OBJ): assemble.c nasm.h version.h insnsi.h assemble.h insns.h
+disasm.$(OBJ): disasm.c nasm.h version.h insnsi.h disasm.h sync.h insns.h names.c insnsn.c
+eval.$(OBJ): eval.c nasm.h version.h insnsi.h nasmlib.h eval.h
+float.$(OBJ): float.c nasm.h version.h insnsi.h
+insnsa.$(OBJ): insnsa.c nasm.h version.h insnsi.h insns.h
+insnsd.$(OBJ): insnsd.c nasm.h version.h insnsi.h insns.h
+labels.$(OBJ): labels.c nasm.h version.h insnsi.h nasmlib.h
+listing.$(OBJ): listing.c nasm.h version.h insnsi.h nasmlib.h listing.h
+nasm.$(OBJ): nasm.c nasm.h version.h insnsi.h nasmlib.h parser.h assemble.h labels.h \
listing.h outform.h
-nasmlib.$(OBJ): nasmlib.c nasm.h insnsi.h nasmlib.h names.c insnsn.c
-ndisasm.$(OBJ): ndisasm.c nasm.h insnsi.h sync.h disasm.h
-output/outas86.$(OBJ): output/outas86.c nasm.h insnsi.h nasmlib.h
-output/outaout.$(OBJ): output/outaout.c nasm.h insnsi.h nasmlib.h
-output/outbin.$(OBJ): output/outbin.c nasm.h insnsi.h nasmlib.h
-output/outcoff.$(OBJ): output/outcoff.c nasm.h insnsi.h nasmlib.h
-output/outelf.$(OBJ): output/outelf.c nasm.h insnsi.h nasmlib.h
-output/outobj.$(OBJ): output/outobj.c nasm.h insnsi.h nasmlib.h
-output/outrdf2.$(OBJ): output/outrdf2.c nasm.h insnsi.h nasmlib.h
-output/outieee.$(OBJ): output/outieee.c nasm.h insnsi.h nasmlib.h
-outform.$(OBJ): outform.c outform.h nasm.h insnsi.h
-parser.$(OBJ): parser.c nasm.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
-preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h insnsi.h nasmlib.h
+nasmlib.$(OBJ): nasmlib.c nasm.h version.h insnsi.h nasmlib.h names.c insnsn.c
+ndisasm.$(OBJ): ndisasm.c nasm.h version.h insnsi.h sync.h disasm.h
+output/outas86.$(OBJ): output/outas86.c nasm.h version.h insnsi.h nasmlib.h
+output/outaout.$(OBJ): output/outaout.c nasm.h version.h insnsi.h nasmlib.h
+output/outbin.$(OBJ): output/outbin.c nasm.h version.h insnsi.h nasmlib.h
+output/outcoff.$(OBJ): output/outcoff.c nasm.h version.h insnsi.h nasmlib.h
+output/outelf.$(OBJ): output/outelf.c nasm.h version.h insnsi.h nasmlib.h
+output/outobj.$(OBJ): output/outobj.c nasm.h version.h insnsi.h nasmlib.h
+output/outrdf2.$(OBJ): output/outrdf2.c nasm.h version.h insnsi.h nasmlib.h
+output/outieee.$(OBJ): output/outieee.c nasm.h version.h insnsi.h nasmlib.h
+outform.$(OBJ): outform.c outform.h nasm.h version.h insnsi.h
+parser.$(OBJ): parser.c nasm.h version.h insnsi.h nasmlib.h parser.h float.h names.c insnsn.c
+preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h version.h insnsi.h nasmlib.h
sync.$(OBJ): sync.c sync.h
clean :
diff --git a/macros.pl b/macros.pl
index 15739f5..6d69a17 100644
--- a/macros.pl
+++ b/macros.pl
@@ -11,35 +11,38 @@
my $fname;
my $line = 0;
-my $index = 0;
+my $index = 0;
+my $tasm_count;
-$fname = "standard.mac" unless $fname = $ARGV[0];
-open INPUT,$fname || die "unable to open $fname\n";
-open OUTPUT,">macros.c" || die "unable to open macros.c\n";
+undef $tasm_count;
+open OUTPUT,">macros.c" || die "unable to open macros.c\n";
+
print OUTPUT "/* This file auto-generated from standard.mac by macros.pl" .
- " - don't edit it */\n\n#include <stddef.h>\n\nstatic char *stdmac[] = {\n";
-
-while (<INPUT>) {
+" - don't edit it */\n\n#include <stddef.h>\n\nstatic char *stdmac[] = {\n";
+
+foreach $fname ( @ARGV ) {
+ open INPUT,$fname || die "unable to open $fname\n";
+ while (<INPUT>) {
$line++;
chomp;
- if (m/^\s*((\s*([^"';\s]+|"[^"]*"|'[^']*'))*)\s*(;.*)?$/) {
- $_ = $1;
- s/\\/\\\\/g;
- s/"/\\"/g;
- if (length > 0) {
- print OUTPUT " \"$_\",\n";
- if ($index >= 0) {
- if (m/__NASM_MAJOR__/) {
- $index = -$index;
- } else {
- $index++;
- }
- }
- }
- } else {
- die "$fname:$line: error unterminated quote";
+ if (m/^\s*\*END\*TASM\*MACROS\*\s*$/) {
+ $tasm_count = $index;
+ } elsif (m/^\s*((\s*([^\"\';\s]+|\"[^\"]*\"|\'[^\']*\'))*)\s*(;.*)?$/) {
+ $_ = $1;
+ s/\\/\\\\/g;
+ s/"/\\"/g;
+ if (length > 0) {
+ print OUTPUT " \"$_\",\n";
+ $index++;
+ }
+ } else {
+ die "$fname:$line: error unterminated quote";
}
+ }
+ close(INPUT);
}
-$index = -$index;
-print OUTPUT " NULL\n};\n#define TASM_MACRO_COUNT $index\n"
+print OUTPUT " NULL\n};\n";
+$tasm_count = $index unless ( defined($tasm_count) );
+print OUTPUT "#define TASM_MACRO_COUNT $tasm_count\n";
+close(OUTPUT);
diff --git a/nasm-version b/nasm-version
deleted file mode 100755
index e6de6b9..0000000
--- a/nasm-version
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# returns nasm version from nasm.h
-# used for dist building
-
-grep NASM_VER nasm.h | awk -F " " -F "\"" '{print $2}'
diff --git a/nasm.h b/nasm.h
index ca2c6aa..66c9e96 100644
--- a/nasm.h
+++ b/nasm.h
@@ -11,9 +11,7 @@
#ifndef NASM_NASM_H
#define NASM_NASM_H
-#define NASM_MAJOR_VER 0
-#define NASM_MINOR_VER 98
-#define NASM_VER "0.98.30"
+#include "version.h" /* generated NASM version macros */
#ifndef NULL
#define NULL 0
diff --git a/standard.mac b/standard.mac
index 333cedd..bbbf90d 100644
--- a/standard.mac
+++ b/standard.mac
@@ -1,4 +1,4 @@
-; Standard macro set for NASM 0.98 -*- nasm -*-
+; Standard macro set for NASM -*- nasm -*-
; Macros to make NASM ignore some TASM directives before the first include
; directive.
@@ -10,13 +10,13 @@
%idefine P586
%idefine END
+; This is a magic token which indicates the end of the TASM macros
+*END*TASM*MACROS*
+
; Note that although some user-level forms of directives are defined
; here, not all of them are: the user-level form of a format-specific
; directive should be defined in the module for that directive.
-%define __NASM_MAJOR__ 0
-%define __NASM_MINOR__ 98
-
; These two need to be defined, though the actual definitions will
; be constantly updated during preprocessing.
%define __FILE__
diff --git a/version b/version
new file mode 100644
index 0000000..b78437d
--- /dev/null
+++ b/version
@@ -0,0 +1 @@
+0.98.31
diff --git a/version.pl b/version.pl
new file mode 100755
index 0000000..6af5425
--- /dev/null
+++ b/version.pl
@@ -0,0 +1,67 @@
+#!/usr/bin/perl
+#
+# version.pl
+# $Id$
+#
+# Parse the NASM version file and produce appropriate macros
+#
+# The NASM version number is assumed to consist of:
+#
+# <major>.<minor>[.<subminor>]<tail>
+#
+# ... where <tail> is not necessarily numeric.
+#
+# This defines the following macros:
+#
+# version.h:
+# NASM_MAJOR_VER
+# NASM_MINOR_VER
+# NASM_SUBMINOR_VER -- this is zero if no subminor
+# NASM_VER -- whole version number as a string
+#
+# version.mac:
+# __NASM_MAJOR__
+# __NASM_MINOR__
+# __NASM_SUBMINOR__
+# __NASM_VER__
+#
+
+($what) = @ARGV;
+
+$line = <STDIN>;
+chomp $line;
+
+if ( $line =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)/ ) {
+ $maj = $1; $nmaj = $maj+0;
+ $min = $2; $nmin = $min+0;
+ $smin = $3; $nsmin = $smin+0;
+ $tail = $';
+} elsif ( $line =~ /^([0-9]+)\.([0-9]+)/ ) {
+ $maj = $1; $nmaj = $maj+0;
+ $min = $2; $nmin = $min+0;
+ $smin = ''; $nsmin = 0;
+ $tail = $';
+} else {
+ die "$0: Invalid input format\n";
+}
+
+if ( $what eq 'h' ) {
+ print "#ifndef NASM_VERSION_H\n";
+ print "#define NASM_VERSION_H\n";
+ printf "#define NASM_MAJOR_VER %d\n", $nmaj;
+ printf "#define NASM_MINOR_VER %d\n", $nmin;
+ printf "#define NASM_SUBMINOR_VER %d\n", $nsmin;
+ printf "#define NASM_VER \"%s\"\n", $line;
+ print "#endif /* NASM_VERSION_H */\n";
+} elsif ( $what eq 'mac' ) {
+ printf "%%define __NASM_MAJOR__ %d\n", $nmaj;
+ printf "%%define __NASM_MINOR__ %d\n", $nmin;
+ printf "%%define __NASM_SUBMINOR__ %d\n", $nsmin;
+ printf "%%define __NASM_VER__ \"%s\"\n", $line;
+} else {
+ die "$0: Unknown output: $what\n";
+}
+
+exit 0;
+
+