diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-13 21:53:31 -0800 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-13 21:53:31 -0800 |
commit | 723ab481a6550454a6f834bb854e751744ca340a (patch) | |
tree | cb217692a76d3dcab83c7ad922e3adca9006dccd /Makefile.in | |
parent | 6bde2ed8806b3e53657d46b61ee79d7afe5c2e13 (diff) | |
download | nasm-mkwarnings.tar.gz |
warnings: define warning classes at point of usemkwarnings
It is extremely desirable to allow the user fine-grained control of
warnings, but this has been complicated by the fact that a warning
class has had to be defined in no less than three places (error.h,
error.c, nasmdoc.src) before it can be used in source code. Instead,
use a script to define these via magic comments at the point of use.
This hopefully will encourage creating new classes as needed.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index 78eaffe2..d2f5889f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -114,7 +114,7 @@ LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \ x86/regs.$(O) x86/regvals.$(O) x86/regflags.$(O) x86/regdis.$(O) \ x86/disp8.$(O) x86/iflag.$(O) \ \ - asm/error.$(O) \ + asm/error.$(O) asm/warnings.$(O) \ asm/float.$(O) \ asm/directiv.$(O) asm/directbl.$(O) \ asm/pragma.$(O) \ @@ -240,6 +240,23 @@ x86/regs.h: x86/regs.dat x86/regs.pl $(RUNPERL) $(srcdir)/x86/regs.pl h \ $(srcdir)/x86/regs.dat > x86/regs.h +# Extract warnings from source code. Since this depends on +# ALL the source files, this is only done on demand. +WARNFILES = asm/warnings.c include/warnings.h doc/warnings.src + +warnings: + rm -f $(WARNFILES) + $(MAKE) $(WARNFILES) + +asm/warnings.c: asm/warnings.pl + $(RUNPERL) $(srcdir)/asm/warnings.pl c asm/warnings.c $(srcdir) + +include/warnings.h: asm/warnings.pl + $(RUNPERL) $(srcdir)/asm/warnings.pl h include/warnings.h $(srcdir) + +doc/warnings.src: asm/warnings.pl + $(RUNPERL) $(srcdir)/asm/warnings.pl doc doc/warnings.src $(srcdir) + # Assembler token hash asm/tokhash.c: x86/insns.dat x86/regs.dat asm/tokens.dat asm/tokhash.pl \ perllib/phash.ph |