Skip to content

Commit a88744a

Browse files
committed
fix build make files
1 parent 55ac25d commit a88744a

File tree

3 files changed

+69
-3
lines changed

3 files changed

+69
-3
lines changed

Mkfiles/msvc.mak

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,34 @@ asm\directbl.c: asm\directiv.dat nasmlib\perfhash.pl perllib\phash.ph
333333
$(RUNPERL) $(srcdir)\nasmlib\perfhash.pl c \
334334
$(srcdir)\asm\directiv.dat asm\directbl.c
335335

336+
warnings: .SYMBOLIC
337+
$(RM_F) $(WARNFILES) $(WARNTIMES) asm\warnings.time
338+
%make asm\warnings.time
339+
340+
asm\warnings.time: $(WARNTIMES) asm\warnings.pl $(WARNSRCS)
341+
$(EMPTY) asm\warnings.time
342+
343+
asm\warnings_c.h.time: asm\warnings_c.h
344+
$(EMPTY) asm\warnings_c.h.time
345+
346+
asm\warnings_c.h: asm\warnings.pl $(WARNSRCS)
347+
$(RUNPERL) $(srcdir)\asm\warnings.pl c asm\warnings_c.h &
348+
$(srcdir) $(WARNSRCS)
349+
350+
include\warnings.h.time: include\warnings.h
351+
$(EMPTY) include\warnings.h.time
352+
353+
include\warnings.h: asm\warnings.pl $(WARNSRCS)
354+
$(RUNPERL) $(srcdir)\asm\warnings.pl h include\warnings.h &
355+
$(srcdir) $(WARNSRCS)
356+
357+
doc\warnings.src.time: doc\warnings.src
358+
$(EMPTY) doc\warnings.src.time
359+
360+
doc\warnings.src : asm\warnings.pl $(WARNSRCS)
361+
$(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src &
362+
$(srcdir) $(WARNSRCS)
363+
336364
# Editor token files
337365
editors\nasmtok.el: editors\nasmtok.pl asm\tokhash.c asm\pptok.c \
338366
asm\directiv.dat macros\macros.c editors\builtin.mac \

Mkfiles/openwcom.mak

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUNPERL = $(PERL) $(PERLFLAGS)
3333

3434
RM_F = -del /f
3535
LN_S = copy
36-
EMPTY = copy nul:
36+
EMPTY = %create
3737
SIDE = %null Created by side effect
3838

3939
MAKENSIS = makensis
@@ -74,6 +74,7 @@ PROGS = nasm$(X) ndisasm$(X)
7474
# Files dependent on extracted warnings
7575
WARNOBJ = asm\warnings.obj
7676
WARNFILES = asm\warnings_c.h include\warnings.h doc\warnings.src
77+
WARNTIMES = asm\warnings_c.h.time include\warnings.h.time doc\warnings.src.time
7778

7879
OUTPUTOBJ = &
7980
output\outform.obj output\outlib.obj &
@@ -213,8 +214,7 @@ ndisasm.lib: $(LIBOBJ_DIS)
213214

214215
# These are specific to certain Makefile syntaxes (what are they
215216
# actually supposed to look like for wmake?)
216-
WARNTIMES = $(WARNFILES:=.time)
217-
WARNSRCS = $(LIBOBJ_NW:.obj=.c)
217+
WARNSRCS = $(ALLOBJ_W:.obj=.c)
218218

219219
#-- Begin Generated File Rules --#
220220
# Edit in Makefile.in, not here!
@@ -357,6 +357,34 @@ editors: $(EDITORS)
357357

358358
#-- End Generated File Rules --#
359359

360+
warnings: .SYMBOLIC
361+
$(RM_F) $(WARNFILES) $(WARNTIMES) asm\warnings.time
362+
%make asm\warnings.time
363+
364+
asm\warnings.time: $(WARNTIMES) asm\warnings.pl $(WARNSRCS)
365+
$(EMPTY) asm\warnings.time
366+
367+
asm\warnings_c.h.time: asm\warnings_c.h
368+
$(EMPTY) asm\warnings_c.h.time
369+
370+
asm\warnings_c.h: asm\warnings.pl $(WARNSRCS)
371+
$(RUNPERL) $(srcdir)\asm\warnings.pl c asm\warnings_c.h &
372+
$(srcdir) $(WARNSRCS)
373+
374+
include\warnings.h.time: include\warnings.h
375+
$(EMPTY) include\warnings.h.time
376+
377+
include\warnings.h: asm\warnings.pl $(WARNSRCS)
378+
$(RUNPERL) $(srcdir)\asm\warnings.pl h include\warnings.h &
379+
$(srcdir) $(WARNSRCS)
380+
381+
doc\warnings.src.time: doc\warnings.src
382+
$(EMPTY) doc\warnings.src.time
383+
384+
doc\warnings.src : asm\warnings.pl $(WARNSRCS)
385+
$(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src &
386+
$(srcdir) $(WARNSRCS)
387+
360388
perlreq: $(PERLREQ) .SYMBOLIC
361389

362390
#-- Begin NSIS Rules --#

asm/warnings.pl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ ($$)
5757
my $this;
5858
my @doc;
5959

60+
print STDERR "F-$infile\n";
6061
while (defined(my $l = <$in>)) {
6162
$nline++;
6263
chomp $l;
@@ -65,6 +66,7 @@ ($$)
6566
$l =~ s/^.*?\/\*.*?\*\///g; # Remove single-line comments
6667

6768
if ($l =~ /^.*?(\/\*.*)$/) {
69+
print STDERR "1-$l\n";
6870
# Begin block comment
6971
$l = $1;
7072
$in_comment = 1;
@@ -73,10 +75,12 @@ ($$)
7375

7476
if ($in_comment) {
7577
if ($l =~ /\*\//) {
78+
print STDERR "3-$l\n";
7679
# End block comment
7780
$in_comment = 0;
7881
undef $this;
7982
} elsif ($l =~ /^\s*\/?\*\!(\-|\=|\s*)(.*?)\s*$/) {
83+
print STDERR "2a-$l\n";
8084
my $opr = $1;
8185
my $str = $2;
8286

@@ -106,18 +110,22 @@ ($$)
106110
$nwarn++;
107111
}
108112
} elsif ($opr eq '=') {
113+
print STDERR "2b-$l\n";
109114
# Alias names for warnings
110115
for my $a (split(/,+/, $str)) {
111116
add_alias($a, $this);
112117
}
113118
} elsif ($opr =~ /^[\-\s]/) {
119+
print STDERR "2c-$l\n";
114120
push(@{$this->{doc}}, "$str\n");
115121
} else {
122+
print STDERR "2d-$l\n";
116123
print STDERR "$infile:$nline: malformed warning definition\n";
117124
print STDERR " $l\n";
118125
$err++;
119126
}
120127
} else {
128+
#print STDERR "2e-$l\n";
121129
undef $this;
122130
}
123131
}
@@ -146,7 +154,9 @@ sub sort_warnings {
146154

147155
@warnings = sort sort_warnings @warnings;
148156
my @warn_noall = @warnings;
157+
if (@warnings) {
149158
pop @warn_noall if ($warn_noall[$#warn_noall]->{name} eq 'all');
159+
}
150160

151161
my $outdata;
152162
open(my $out, '>', \$outdata)

0 commit comments

Comments
 (0)