From patchwork Sat Apr 23 11:34:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Pero X-Patchwork-Id: 92613 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2CFD5B6F64 for ; Sat, 23 Apr 2011 21:34:53 +1000 (EST) Received: (qmail 19052 invoked by alias); 23 Apr 2011 11:34:50 -0000 Received: (qmail 18989 invoked by uid 22791); 23 Apr 2011 11:34:49 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL, BAYES_00, SARE_SUB_ENC_UTF8, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 Apr 2011 11:34:32 +0000 Received: from eggs.gnu.org ([140.186.70.92]:40332) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QDb6d-000618-Dn for gcc-patches@gnu.org; Sat, 23 Apr 2011 07:34:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QDb6c-0001c4-26 for gcc-patches@gnu.org; Sat, 23 Apr 2011 07:34:31 -0400 Received: from smtp171.iad.emailsrvr.com ([207.97.245.171]:46329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDb6b-0001bo-Sk for gcc-patches@gnu.org; Sat, 23 Apr 2011 07:34:30 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp57.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id EA472F8303; Sat, 23 Apr 2011 07:34:28 -0400 (EDT) Received: from dynamic1.wm-web.iad.mlsrvr.com (dynamic1.wm-web.iad1a.rsapps.net [192.168.2.150]) by smtp57.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id C2F1FF8271; Sat, 23 Apr 2011 07:34:28 -0400 (EDT) Received: from meta-innovation.com (localhost [127.0.0.1]) by dynamic1.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id AB609C98070; Sat, 23 Apr 2011 07:34:28 -0400 (EDT) Received: by www2.webmail.us (Authenticated sender: nicola.pero@meta-innovation.com, from: nicola.pero@meta-innovation.com) with HTTP; Sat, 23 Apr 2011 13:34:28 +0200 (CEST) Date: Sat, 23 Apr 2011 13:34:28 +0200 (CEST) Subject: =?UTF-8?Q?Re:=20(build)=20Patch=20to=20fix=20cp/cfns.gperf=20building=20?= =?UTF-8?Q?issues?= From: "Nicola Pero" To: "Mike Stump" Cc: "gcc-patches@gnu.org" MIME-Version: 1.0 X-Type: plain In-Reply-To: <514AA7B6-0B41-42BD-B39B-71E9434E152D@comcast.net> References: <1303485121.088925951@www2.webmail.us> <514AA7B6-0B41-42BD-B39B-71E9434E152D@comcast.net> Message-ID: <1303558468.699813970@www2.webmail.us> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 207.97.245.171 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org > Additionally, > > contrib/gcc_update --touch > > can be used to to fix the time stamps until such time as someone changes the gperf rule to be under maintainer mode. Thanks Mike, good to know. :-) > So, only the dependency should go away under a maintainer rules, as in the below, not the entire rule. What is the reason to keep the rule without the dependency ? Is it so that even with --disable-maintainer-mode you can force the file to be recreated by manually deleting it ? That would make sense ... it sounds like a good idea, so here is yet another refinement of the patch with that refinement added too :-) Ok to commit ? Thanks Index: ChangeLog =================================================================== --- ChangeLog (revision 172860) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2011-04-22 Nicola Pero + + * Makefile.in (ENABLE_MAINTAINER_RULES): New. + 2011-04-22 Jakub Jelinek PR c/48716 Index: cp/Make-lang.in =================================================================== --- cp/Make-lang.in (revision 172860) +++ cp/Make-lang.in (working copy) @@ -104,10 +104,20 @@ cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $ +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -# Special build rules. +ifeq ($(ENABLE_MAINTAINER_RULES), true) +# Special build rule. This is a maintainer rule, that is only +# available when GCC is configured with --enable-maintainer-mode. In +# other cases, it is not available to avoid triggering rebuilds if a +# user has the source checked out with unusual timestamps. $(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.gperf +else +# We keep the rule so that you can still force a rebuild, even if you +# didn't configure GCC with --enable-maintainer-mode, by manually +# deleting the $(srcdir)/cp/cfns.h file. +$(srcdir)/cp/cfns.h: +endif gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \ - $(srcdir)/cp/cfns.gperf > $(srcdir)/cp/cfns.h + $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h #^L # Build hooks: Index: cp/ChangeLog =================================================================== --- cp/ChangeLog (revision 172860) +++ cp/ChangeLog (working copy) @@ -1,3 +1,11 @@ +2011-04-23 Nicola Pero , + Mike Stump + + * Make-lang.in ($(srcdir)/cp/cfns.h): Enable the dependency only + in maintainer mode. Use the --output-file option of gperf instead + of > to prevent creating an empty cp/cfns.h when gperf is not + available. + 2011-04-20 Jason Merrill * semantics.c (finish_compound_literal): Don't put an array Index: Makefile.in =================================================================== --- Makefile.in (revision 172860) +++ Makefile.in (working copy) @@ -165,8 +165,19 @@ C_STRICT_WARN = @c_strict_warn@ NOCOMMON_FLAG = @nocommon_flag@ # This is set by --disable-maintainer-mode (default) to "#" +# FIXME: 'MAINT' will always be set to an empty string, no matter if +# --disable-maintainer-mode is used or not. This is because the +# following will expand to "MAINT := " in maintainer mode, and to +# "MAINT := #" in non-maintainer mode, but because '#' starts a comment, +# they mean exactly the same thing for make. MAINT := @MAINT@ +# The following provides the variable ENABLE_MAINTAINER_RULES that can +# be used in language Make-lang.in makefile fragments to enable +# maintainer rules. So, ENABLE_MAINTAINER_RULES is 'true' in +# maintainer mode, and '' otherwise. +@MAINT@ ENABLE_MAINTAINER_RULES = true + # These are set by --enable-checking=valgrind. RUN_GEN = @valgrind_command@ VALGRIND_DRIVER_DEFINES = @valgrind_path_defines@