From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5973 invoked by alias); 28 Jan 2011 23:32:26 -0000 Received: (qmail 5965 invoked by uid 22791); 28 Jan 2011 23:32:25 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from g1t0028.austin.hp.com (HELO g1t0028.austin.hp.com) (15.216.28.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Jan 2011 23:32:18 +0000 Received: from g1t0038.austin.hp.com (g1t0038.austin.hp.com [16.236.32.44]) by g1t0028.austin.hp.com (Postfix) with ESMTP id 800741C0AB; Fri, 28 Jan 2011 23:32:16 +0000 (UTC) Received: from lucas.cup.hp.com (lucas.cup.hp.com [15.244.97.116]) by g1t0038.austin.hp.com (Postfix) with ESMTP id DB3883020F; Fri, 28 Jan 2011 23:32:15 +0000 (UTC) Received: (from sje@localhost) by lucas.cup.hp.com (8.11.1 (PHNE_35485)/8.11.1) id p0SNWFT04949; Fri, 28 Jan 2011 15:32:15 -0800 (PST) Date: Fri, 28 Jan 2011 23:32:00 -0000 Message-Id: <201101282332.p0SNWFT04949@lucas.cup.hp.com> From: Steve Ellcey To: Ralf Wildenhues , binutils@sourceware.org Cc: "H.J. Lu" Subject: Re: PATCH: PR binutils/12283: bfd/doc doesn't support parallel build In-Reply-To: Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-01/txt/msg00379.txt.bz2 This patch is intended to be a secondary fix/workaround for the problem that can happen when building bfd/doc using a parallel make. Ralf Wildenhues has a fix to move-if-changed that should fix the problem for any target where compiling a file multiple times will always result in exactly the same binary, but I have at least one platform where this is not the case: hppa*-*-hpux*. So I would also like to have this fix as a backup to Ralf's patch (which I think should also go in). This patch does not change the default make behaviour but allows a user to specify '--enable-parallel-doc' during the bfd configure so that a parallel build works correctly. Using this argument would make the *.texi targets dependent on chew instead of chew.c and allow parallel builds to work (because chew would only be built once). This means the user will need to have makeinfo on their system but I think that is reasonable since it only affects users of the new option. I have tested this on hppa2.0w-hp-hpux11.11 to verify that I still get the failure without using this option and that I don't get it (and that chew is only built once) when I do use the new option. OK to checkin? Steve Ellcey sje@cup.hp.com 2011-01-28 Steve Ellcey PR binutils/12283 * configure.in: Add --enable-parallel-doc flag. * configure: Regenerate. * doc/Makefile.am: Add CHEW_DEP variable. * doc/Makefile.in: Regenerate. Index: configure.in =================================================================== RCS file: /cvs/src/src/bfd/configure.in,v retrieving revision 1.290 diff -r1.290 configure.in 112a113,123 > # Check to see if we should allow parallel doc make > AC_ARG_ENABLE(parallel-doc, > [ --enable-parallel-doc Allow parallel build of doc directory], > [case "${enableval}" in > yes) want_pdoc=true ;; > no) want_pdoc=false ;; > *) AC_MSG_ERROR(bad value ${enableval} for parallel-doc option) ;; > esac],[want_pdoc=false])dnl > > AM_CONDITIONAL(PARALLEL_DOC, test "$want_pdoc" = "true") > Index: doc/Makefile.am =================================================================== RCS file: /cvs/src/src/bfd/doc/Makefile.am,v retrieving revision 1.28 diff -r1.28 Makefile.am 61a62,67 > if PARALLEL_DOC > CHEW_DEP = $(MKDOC) > else > CHEW_DEP = chew.c > endif > 77c83 < aoutx.texi: chew.c $(srcdir)/../aoutx.h $(srcdir)/doc.str --- > aoutx.texi: $(CHEW_DEP) $(srcdir)/../aoutx.h $(srcdir)/doc.str 82c88 < archive.texi: chew.c $(srcdir)/../archive.c $(srcdir)/doc.str --- > archive.texi: $(CHEW_DEP) $(srcdir)/../archive.c $(srcdir)/doc.str 87c93 < archures.texi: chew.c $(srcdir)/../archures.c $(srcdir)/doc.str --- > archures.texi: $(CHEW_DEP) $(srcdir)/../archures.c $(srcdir)/doc.str 94c100 < bfdt.texi: chew.c $(srcdir)/../bfd.c $(srcdir)/doc.str --- > bfdt.texi: $(CHEW_DEP) $(srcdir)/../bfd.c $(srcdir)/doc.str 99c105 < cache.texi: chew.c $(srcdir)/../cache.c $(srcdir)/doc.str --- > cache.texi: $(CHEW_DEP) $(srcdir)/../cache.c $(srcdir)/doc.str 104c110 < coffcode.texi: chew.c $(srcdir)/../coffcode.h $(srcdir)/doc.str --- > coffcode.texi: $(CHEW_DEP) $(srcdir)/../coffcode.h $(srcdir)/doc.str 109c115 < core.texi: chew.c $(srcdir)/../corefile.c $(srcdir)/doc.str --- > core.texi: $(CHEW_DEP) $(srcdir)/../corefile.c $(srcdir)/doc.str 114c120 < elf.texi: chew.c $(srcdir)/../elf.c $(srcdir)/doc.str --- > elf.texi: $(CHEW_DEP) $(srcdir)/../elf.c $(srcdir)/doc.str 119c125 < elfcode.texi: chew.c $(srcdir)/../elfcode.h $(srcdir)/doc.str --- > elfcode.texi: $(CHEW_DEP) $(srcdir)/../elfcode.h $(srcdir)/doc.str 124c130 < mmo.texi: chew.c $(srcdir)/../mmo.c $(srcdir)/doc.str --- > mmo.texi: $(CHEW_DEP) $(srcdir)/../mmo.c $(srcdir)/doc.str 129c135 < format.texi: chew.c $(srcdir)/../format.c $(srcdir)/doc.str --- > format.texi: $(CHEW_DEP) $(srcdir)/../format.c $(srcdir)/doc.str 134c140 < libbfd.texi: chew.c $(srcdir)/../libbfd.c $(srcdir)/doc.str --- > libbfd.texi: $(CHEW_DEP) $(srcdir)/../libbfd.c $(srcdir)/doc.str 139c145 < bfdio.texi: chew.c $(srcdir)/../bfdio.c $(srcdir)/doc.str --- > bfdio.texi: $(CHEW_DEP) $(srcdir)/../bfdio.c $(srcdir)/doc.str 144c150 < bfdwin.texi: chew.c $(srcdir)/../bfdwin.c $(srcdir)/doc.str --- > bfdwin.texi: $(CHEW_DEP) $(srcdir)/../bfdwin.c $(srcdir)/doc.str 149c155 < opncls.texi: chew.c $(srcdir)/../opncls.c $(srcdir)/doc.str --- > opncls.texi: $(CHEW_DEP) $(srcdir)/../opncls.c $(srcdir)/doc.str 154c160 < reloc.texi: chew.c $(srcdir)/../reloc.c $(srcdir)/doc.str --- > reloc.texi: $(CHEW_DEP) $(srcdir)/../reloc.c $(srcdir)/doc.str 159c165 < section.texi: chew.c $(srcdir)/../section.c $(srcdir)/doc.str --- > section.texi: $(CHEW_DEP) $(srcdir)/../section.c $(srcdir)/doc.str 164c170 < syms.texi: chew.c $(srcdir)/../syms.c $(srcdir)/doc.str --- > syms.texi: $(CHEW_DEP) $(srcdir)/../syms.c $(srcdir)/doc.str 169c175 < targets.texi: chew.c $(srcdir)/../targets.c $(srcdir)/doc.str --- > targets.texi: $(CHEW_DEP) $(srcdir)/../targets.c $(srcdir)/doc.str 174c180 < init.texi: chew.c $(srcdir)/../init.c $(srcdir)/doc.str --- > init.texi: $(CHEW_DEP) $(srcdir)/../init.c $(srcdir)/doc.str 179c185 < hash.texi: chew.c $(srcdir)/../hash.c $(srcdir)/doc.str --- > hash.texi: $(CHEW_DEP) $(srcdir)/../hash.c $(srcdir)/doc.str 184c190 < linker.texi: chew.c $(srcdir)/../linker.c $(srcdir)/doc.str --- > linker.texi: $(CHEW_DEP) $(srcdir)/../linker.c $(srcdir)/doc.str