Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Makefile fix
@ 2014-02-04 10:33 Mark Kettenis
  2014-02-08  5:00 ` Doug Evans
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Kettenis @ 2014-02-04 10:33 UTC (permalink / raw)
  To: gdb-patches

The diff below fixes an issue that has been bothering me for quite a
while.  When using OpenBSD make, almost everything in gdb/ gets
rebuilt.  The problem is the use of the all-lib phony target, which is
always considered to be out-of-date, and used as a prerequisite of
libgnu.a and the gnulib string.h, which are therefore also considered
to be out-of-date.  I have no idea why this problem doesn't show up
with GNU make.  But the GNU make manual clearly states that phony
targets should not be prerequisites of real target files:

  <http://www.gnu.org/software/make/manual/make.html#Phony-Targets>

It seems to me that the phony target can be easily avoided; see the
diff below.  But perhaps I'm missing something?



diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ed84e35..937478b 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1263,10 +1263,8 @@ gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
 		$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
 
 # Convenience rule to handle recursion.
-$(LIBGNU) $(GNULIB_H): all-lib
-all-lib: $(GNULIB_BUILDDIR)/Makefile
+$(LIBGNU) $(GNULIB_H): $(GNULIB_BUILDDIR)/Makefile
 	@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=$(GNULIB_BUILDDIR) subdir_do
-.PHONY: all-lib
 
 # Convenience rule to handle recursion.
 .PHONY: all-data-directory


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-02-10 14:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-04 10:33 [PATCH] Makefile fix Mark Kettenis
2014-02-08  5:00 ` Doug Evans
2014-02-08 11:41   ` Mark Kettenis
2014-02-10  0:58     ` Doug Evans
2014-02-10  1:41       ` Doug Evans
2014-02-10 13:15         ` Mark Kettenis
2014-02-10 14:23           ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox