Skip to content

Commit 69f1aa6

Browse files
author
H. Peter Anvin
committed
Makefile.in: re-introduce rules that can be made common
Rules that are now simple again can be made common. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
1 parent a8bcdb6 commit 69f1aa6

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

Makefile.in

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,12 @@ endif
103103
.SUFFIXES:
104104
.SUFFIXES: $(X) .$(O) .$(A) .xml .1 .c .i .s .txt .time
105105

106+
# Use to mark phony targets in global lists
107+
PHONY =
108+
106109
.PHONY: all doc misc install clean distclean cleaner spotless test
107-
.PHONY: install_doc everything install_everything strip perlreq dist tags TAGS
108-
.PHONY: nothing manpages nsis editors
110+
.PHONY: install_doc everything install_everything strip perlreq warnings
111+
.PHONY: dist tags TAGS nothing manpages nsis editors
109112

110113
.c.$(O):
111114
$(CC) -c $(ALL_CFLAGS) -o $@ $<
@@ -261,7 +264,7 @@ ndisasm$(X): $(NDISASM) $(MANIFEST) $(DISLIB) $(NASMLIB)
261264
WARNSRCS = $(ALLOBJ_W:.$(O)=.c)
262265

263266
# Make sure we have subdirectories set up...
264-
$(LIBOBJ) $(LIBOBJ_DIS) $(WARNTIMES) $(WARNSRCS): $(DIRS)
267+
$(LIBOBJ) $(LIBOBJ_DIS): $(DIRS)
265268

266269
#-- Begin Generated File Rules --#
267270

@@ -399,24 +402,7 @@ editors/nasmtok.json: editors/nasmtok.pl asm/tokhash.c asm/pptok.c \
399402
version.mak
400403
$(RUNPERL) $(srcdir)/editors/nasmtok.pl -json $@ $(srcdir) $(objdir)
401404

402-
editors: $(EDITORS)
403-
404-
#-- End Generated File Rules --#
405-
406-
# Extract warnings from source code. This is done automatically if any
407-
# C files have changed; the script is fast enough that that is
408-
# reasonable, but doesn't update the time stamp if the files aren't
409-
# changed, to avoid rebuilding everything every time. Track the actual
410-
# dependency by the empty file asm/warnings.time.
411-
#
412-
# This doesn't seem to work for non-Unix Makefile variants, so don't
413-
# export those rules here (non-Unix Makefiles only guaranteed to build
414-
# a distribution ball anyway.)
415-
416-
WARNTIMES = $(WARNFILES:=.time)
417-
418-
.PHONY: warnings
419-
warnings: $(WARNFILES)
405+
editors: $(EDITORS) $(PHONY)
420406

421407
asm/warnings_c.h: asm/warnings.pl asm/warnings.dat
422408
$(RUNPERL) $(srcdir)/asm/warnings.pl c asm/warnings_c.h \
@@ -432,7 +418,11 @@ doc/warnings.src: asm/warnings.pl asm/warnings.dat
432418

433419
$(PERLREQ): $(DIRS)
434420

435-
perlreq: $(PERLREQ)
421+
perlreq: $(PERLREQ) $(PHONY)
422+
423+
warnings: $(WARNFILES) $(PHONY)
424+
425+
#-- End Generated File Rules --#
436426

437427
#-- Begin NSIS Rules --#
438428

0 commit comments

Comments
 (0)