This is the mail archive of the binutils@sources.redhat.com 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] Fix make -jN in bfd/doc


On Fri, May 06, 2005 at 09:15:55AM -0400, Daniel Jacobowitz wrote:
> On Fri, May 06, 2005 at 11:23:31AM +0200, Gwenole Beauchesne wrote:
> > Hi,
> > 
> > This patch fixes make -jN (tested with N = 4) in bfd/doc. Otherwise, 
> > multiple gccs were disputing chew paternity.
> > 
> > 2005-04-30  Gwenole Beauchesne  <gbeauchesne@mandriva.com>
> > 
> > 	* bfd/doc/Makefile.am: Fix dependencies on chew for parallel build.
> > 	* bfd/doc/Makefile.in: Regenerate.
> 
> This patch is incorrect, since the whole point was to not have the texi
> files depend on the built chew.  It sounds like we need to use a
> temporary file to build chew and move it into place atomically.

This patch works for me; could you give it a try?  Anyone else see a
problem with the new construct?

-- 
Daniel Jacobowitz
CodeSourcery, LLC

Index: doc/Makefile.am
===================================================================
RCS file: /home/drow/rsync/src/src/bfd/doc/Makefile.am,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile.am
--- doc/Makefile.am	5 May 2005 15:36:03 -0000	1.17
+++ doc/Makefile.am	6 May 2005 19:30:10 -0000
@@ -57,8 +57,11 @@ MKDOC = chew$(EXEEXT_FOR_BUILD)
 INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
 	-I$(srcdir)/../../intl -I../../intl
 
-$(MKDOC): chew.o
-	$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
+$(MKDOC): $(srcdir)/chew.c
+	$(CC_FOR_BUILD) -o chew.$$$$ $(srcdir)/chew.c \
+	  $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
+	  $(INCLUDES); \
+	$(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
 
 chew.o: chew.c
 	$(CC_FOR_BUILD) -c $(INCLUDES) $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
Index: doc/Makefile.in
===================================================================
RCS file: /home/drow/rsync/src/src/bfd/doc/Makefile.in,v
retrieving revision 1.63
diff -u -p -r1.63 Makefile.in
--- doc/Makefile.in	5 May 2005 15:36:03 -0000	1.63
+++ doc/Makefile.in	6 May 2005 19:30:38 -0000
@@ -586,8 +586,11 @@ uninstall-am:
 	uninstall uninstall-am uninstall-info-am
 
 
-$(MKDOC): chew.o
-	$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
+$(MKDOC): $(srcdir)/chew.c
+	$(CC_FOR_BUILD) -o chew.$$$$ $(srcdir)/chew.c \
+	  $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
+	  $(INCLUDES); \
+	$(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
 
 chew.o: chew.c
 	$(CC_FOR_BUILD) -c $(INCLUDES) $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c


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