mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
warnings: more improvements to warnings generation
Try to better sort out the necessary dependencies for warning generation. Fix regex for cleaning up nasmdoc markup: nasmdoc markup does not nest, although it may include \} sequences. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
5a03edfdd9
commit
b11cd3a426
13
Makefile.in
13
Makefile.in
@ -79,6 +79,12 @@ ifeq ($(TRACE),1)
|
||||
CFLAGS += -DNASM_TRACE
|
||||
endif
|
||||
|
||||
# Don't delete intermediate files
|
||||
.SECONDARY:
|
||||
|
||||
# Delete files on error
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: $(X) .$(O) .$(A) .xml .1 .c .i .s .txt .time
|
||||
|
||||
@ -191,7 +197,7 @@ ndisasm$(X): $(NDISASM) $(MANIFEST) $(NASMLIB)
|
||||
|
||||
# These are specific to certain Makefile syntaxes...
|
||||
WARNTIMES = $(WARNFILES:=.time)
|
||||
WARNSRCS = $(LIBOBJ_NW:.$(O)=.c)
|
||||
WARNSRCS = $(LIBOBJ_NW:.$(O)=.c) asm/nasm.c
|
||||
|
||||
#-- Begin Generated File Rules --#
|
||||
|
||||
@ -286,11 +292,12 @@ x86/regs.h: x86/regs.dat x86/regs.pl
|
||||
# reasonable, but doesn't update the time stamp if the files aren't
|
||||
# changed, to avoid rebuilding everything every time. Track the actual
|
||||
# dependency by the empty file asm/warnings.time.
|
||||
.PHONY: warnings
|
||||
warnings:
|
||||
$(RM_F) $(WARNFILES) $(WARNTIMES)
|
||||
$(RM_F) $(WARNFILES) $(WARNTIMES) asm/warnings.time
|
||||
$(MAKE) asm/warnings.time
|
||||
|
||||
asm/warnings.time: $(WARNSRCS)
|
||||
asm/warnings.time: $(WARNSRCS) asm/warnings.pl
|
||||
$(EMPTY) asm/warnings.time
|
||||
$(MAKE) $(WARNTIMES)
|
||||
|
||||
|
@ -18,10 +18,11 @@ sub quote_for_c(@) {
|
||||
return $s;
|
||||
}
|
||||
|
||||
# Remove a subset of nasmdoc markup
|
||||
sub remove_markup(@) {
|
||||
my $s = join('', @_);
|
||||
|
||||
$s =~ s/\\[\w+](\{((?:(?>[^{}]+)|(?1))*)\})?/$2/g;
|
||||
$s =~ s/\\[\w+](?:\{((?:[^\}]|\\\})*)\})/$1/g;
|
||||
$s =~ s/\\(\W)/$1/g;
|
||||
return $s;
|
||||
}
|
||||
|
@ -43,6 +43,12 @@ SRCS = nasmdoc.src inslist.src changes.src warnings.src version.src
|
||||
OUT = html nasmdoc.txt nasmdoc.pdf $(XZFILES)
|
||||
XZOUT = nasmdoc.pdf.xz
|
||||
|
||||
# Don't delete intermediate files
|
||||
.SECONDARY:
|
||||
|
||||
# Delete files on error
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .pfa .ph
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user