This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR binutils/12283: bfd/doc doesn't support parallel build


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  <sje@cup.hp.com>

	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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]