From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15980 invoked by alias); 4 Feb 2014 10:33:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15956 invoked by uid 89); 4 Feb 2014 10:33:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: glazunov.sibelius.xs4all.nl Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 04 Feb 2014 10:33:11 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id s14AX8mO012742 for ; Tue, 4 Feb 2014 11:33:08 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id s14AX8Ai013211; Tue, 4 Feb 2014 11:33:08 +0100 (CET) Date: Tue, 04 Feb 2014 10:33:00 -0000 Message-Id: <201402041033.s14AX8Ai013211@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: gdb-patches@sourceware.org Subject: [PATCH] Makefile fix X-SW-Source: 2014-02/txt/msg00017.txt.bz2 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: 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