File tree Expand file tree Collapse file tree 4 files changed +40
-20
lines changed Expand file tree Collapse file tree 4 files changed +40
-20
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ NDISASM = disasm/ndisasm.$(O)
134134PROGOBJ = $(NASM ) $(NDISASM )
135135PROGS = nasm$(X ) ndisasm$(X )
136136
137- # Files dependent on extracted warnings
137+ # Files dependent on warnings.dat
138138WARNOBJ = asm/warnings.$(O )
139139WARNFILES = asm/warnings_c.h include/warnings.h doc/warnings.src
140140
@@ -260,9 +260,6 @@ ndisasm$(X): $(NDISASM) $(MANIFEST) $(DISLIB) $(NASMLIB)
260260 $(CC ) $(ALL_LDFLAGS ) -o $@ $(NDISASM ) $(MANIFEST ) \
261261 $(DISLIB ) $(NASMLIB ) $(LIBS )
262262
263- # These are specific to certain Makefile syntaxes...
264- WARNSRCS = $(ALLOBJ_W:.$(O ) =.c )
265-
266263# Make sure we have subdirectories set up...
267264$(LIBOBJ ) $(LIBOBJ_DIS ) : $(DIRS )
268265
@@ -532,7 +529,7 @@ editor_builtin: nasm$(X)
532529
533530dist :
534531 $(MAKE ) alldeps
535- $(MAKE ) perlreq warnings spec
532+ $(MAKE ) perlreq spec
536533 $(MAKE ) editor_builtin
537534 $(MAKE ) editors $(MANPAGES )
538535 $(MAKE ) distclean
Original file line number Diff line number Diff line change @@ -344,7 +344,25 @@ editors\nasmtok.json: editors\nasmtok.pl asm\tokhash.c asm\pptok.c \
344344 version.mak
345345 $(RUNPERL ) $(srcdir ) \e ditors\n asmtok.pl -json $@ $(srcdir ) $(objdir )
346346
347- editors : $(EDITORS )
347+ editors : $(EDITORS ) $(PHONY )
348+
349+ asm\warnings_c.h : asm\warnings.pl asm\warnings.dat
350+ $(RUNPERL ) $(srcdir ) \a sm\w arnings.pl c asm\w arnings_c.h \
351+ $(srcdir ) \a sm\w arnings.dat
352+
353+ include\warnings.h : asm\warnings.pl asm\warnings.dat
354+ $(RUNPERL ) $(srcdir ) \a sm\w arnings.pl h include\w arnings.h \
355+ $(srcdir ) \a sm\w arnings.dat
356+
357+ doc\warnings.src : asm\warnings.pl asm\warnings.dat
358+ $(RUNPERL ) $(srcdir ) \a sm\w arnings.pl doc doc\w arnings.src \
359+ $(srcdir ) \a sm\w arnings.dat
360+
361+ $(PERLREQ ) : $(DIRS )
362+
363+ perlreq : $(PERLREQ ) $(PHONY )
364+
365+ warnings : $(WARNFILES ) $(PHONY )
348366
349367# -- End Generated File Rules --#
350368
Original file line number Diff line number Diff line change @@ -353,7 +353,25 @@ editors\nasmtok.json: editors\nasmtok.pl asm\tokhash.c asm\pptok.c &
353353 version.mak
354354 $(RUNPERL ) $(srcdir ) \e ditors\n asmtok.pl -json $@ $(srcdir ) $(objdir )
355355
356- editors : $(EDITORS )
356+ editors : $(EDITORS ) $(PHONY )
357+
358+ asm\warnings_c.h : asm\warnings.pl asm\warnings.dat
359+ $(RUNPERL ) $(srcdir ) \a sm\w arnings.pl c asm\w arnings_c.h &
360+ $(srcdir ) \a sm\w arnings.dat
361+
362+ include\warnings.h : asm\warnings.pl asm\warnings.dat
363+ $(RUNPERL ) $(srcdir ) \a sm\w arnings.pl h include\w arnings.h &
364+ $(srcdir ) \a sm\w arnings.dat
365+
366+ doc\warnings.src : asm\warnings.pl asm\warnings.dat
367+ $(RUNPERL ) $(srcdir ) \a sm\w arnings.pl doc doc\w arnings.src &
368+ $(srcdir ) \a sm\w arnings.dat
369+
370+ $(PERLREQ ) : $(DIRS )
371+
372+ perlreq : $(PERLREQ ) $(PHONY )
373+
374+ warnings : $(WARNFILES ) $(PHONY )
357375
358376# -- End Generated File Rules --#
359377
Original file line number Diff line number Diff line change @@ -288,19 +288,6 @@ sub sort_warnings {
288288
289289close ($out );
290290
291- # Write data to file if and only if it has changed
292- # For some systems, even if we don't write, opening for append
293- # apparently touches the timestamp, so we need to read and write
294- # as separate operations.
295- if (open (my $out , ' <' , $outfile )) {
296- my $datalen = length ($outdata );
297- my $oldlen = read ($out , my $oldoutdata , $datalen +1);
298- close ($out );
299- exit 0 if (defined ($oldlen ) && $oldlen == $datalen &&
300- ($oldoutdata eq $outdata ));
301- }
302-
303- # Data changed, must rewrite
304291open (my $out , ' >' , $outfile )
305292 or die " $0 : cannot open output file $outfile : $! \n " ;
306293
You can’t perform that action at this time.
0 commit comments