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]

Fix build from readonly srcdir - makeinfo


Automake 1.9 uses new crufty rules for generating info files which create a
directory in $(srcdir), and is explicit that info files must be generated
into $(srcdir).  This makes it very obvious that they fail when the
srcdir is readonly.

This patch updates the dependencies for both bfd's and gas's info
documentation so that it does not need to be rebuilt from a distribution
tarball.  I found various ways to hack around the readonly-srcdir problem,
but this is cleaner, and avoids the problem.  Binutils and ld will have
similar issues when they are upgraded to 1.9.x; I'll come back and look at
them later.

Any objections to this patch?  The quirky bit is that we now ship
asconfig.texi.  Considering overriding it didn't handle dependencies
properly anyway, I'm not bothered by this.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

2005-04-26  Daniel Jacobowitz  <dan@codesourcery.com>

	* doc/Makefile.am: Remove stamp rules.  Depend on chew.c
	instead of $(MKDOC).
	* aclocal.m4, Makefile.in, doc/Makefile.in: Regnerated.

2005-04-26  Daniel Jacobowitz  <dan@codesourcery.com>

	* doc/Makefile.am (gasver.texi): Depend on bfd/configure instead
	of Makefile.
	(DISTCLEANFILES): Remove.
	(MAINTAINERCLEANFILES): Add asconfig.texi.
	* doc/Makefile.in: Regenerated.

--- binutils-2.15.97/bfd/doc/Makefile.am	2005-02-13 16:39:46.000000000 -0500
+++ binutils-2.15.97/bfd/doc/Makefile.am	2005-04-26 17:19:18.451886972 -0400
@@ -67,146 +67,122 @@
 # We can't replace these rules with an implicit rule, because
 # makes without VPATH support couldn't find the .h files in `..'.
 
-# We use s-XXX targets so that we can distribute the info files,
-# and permit people to rebuild them, without requiring the makeinfo
-# program.  If somebody tries to rebuild info, but none of the .texi
-# files have changed, then this Makefile will build chew, and will
-# build all of the stamp files, but will not actually have to rebuild
-# bfd.info.
+# We do not depend on chew directly so that we can distribute the info
+# files, and permit people to rebuild them, without requiring the makeinfo
+# program.  If somebody tries to rebuild info, but none of the .texi files
+# have changed, then nothing will be rebuilt.
 
-s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
+aoutx.texi: chew.c $(srcdir)/../aoutx.h $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
 	$(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
-	touch s-aoutx
-aoutx.texi: s-aoutx
 
-s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
+archive.texi: chew.c $(srcdir)/../archive.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
 	$(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi
-	touch s-archive
-archive.texi: s-archive
 
-s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
+archures.texi: chew.c $(srcdir)/../archures.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
 	$(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi
-	touch s-archures
-archures.texi: s-archures
 
 # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
 # bfd.texinfo on an 8.3 filesystem.
-s-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
+bfdt.texi: chew.c $(srcdir)/../bfd.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
 	$(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
-	touch s-bfd
-bfdt.texi: s-bfd
 
-s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
+cache.texi: chew.c $(srcdir)/../cache.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
 	$(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi
-	touch s-cache
-cache.texi: s-cache
 
-s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
+coffcode.texi: chew.c $(srcdir)/../coffcode.h $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
 	$(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
-	touch s-coffcode
-coffcode.texi: s-coffcode
 
-s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
+core.texi: chew.c $(srcdir)/../corefile.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
 	$(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi
-	touch s-core
-core.texi: s-core
 
-s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
+elf.texi: chew.c $(srcdir)/../elf.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
 	$(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi
-	touch s-elf
-elf.texi: s-elf
 
-s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
+elfcode.texi: chew.c $(srcdir)/../elfcode.h $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
 	$(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
-	touch s-elfcode
-elfcode.texi: s-elfcode
 
-s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
+mmo.texi: chew.c $(srcdir)/../mmo.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
 	$(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi
-	touch s-mmo
-mmo.texi: s-mmo
 
-s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
+format.texi: chew.c $(srcdir)/../format.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
 	$(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi
-	touch s-format
-format.texi: s-format
 
-s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
+libbfd.texi: chew.c $(srcdir)/../libbfd.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
 	$(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
-	touch s-libbfd
-libbfd.texi: s-libbfd
 
-s-bfdio: $(MKDOC) $(srcdir)/../bfdio.c $(srcdir)/doc.str
+bfdio.texi: chew.c $(srcdir)/../bfdio.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp
 	$(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
-	touch s-bfdio
-bfdio.texi: s-bfdio
 
-s-bfdwin: $(MKDOC) $(srcdir)/../bfdwin.c $(srcdir)/doc.str
+bfdwin.texi: chew.c $(srcdir)/../bfdwin.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp
 	$(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
-	touch s-bfdwin
-bfdwin.texi: s-bfdwin
 
-s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
+opncls.texi: chew.c $(srcdir)/../opncls.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str  <$(srcdir)/../opncls.c >opncls.tmp
 	$(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi
-	touch s-opncls
-opncls.texi: s-opncls
 
-s-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
+reloc.texi: chew.c $(srcdir)/../reloc.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
 	$(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi
-	touch s-reloc
-reloc.texi: s-reloc
 
-s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
+section.texi: chew.c $(srcdir)/../section.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
 	$(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi
-	touch s-section
-section.texi: s-section
 
-s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
+syms.texi: chew.c $(srcdir)/../syms.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
 	$(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi
-	touch s-syms
-syms.texi: s-syms
 
-s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
+targets.texi: chew.c $(srcdir)/../targets.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
 	$(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi
-	touch s-targets
-targets.texi: s-targets
 
-s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
+init.texi: chew.c $(srcdir)/../init.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
 	$(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi
-	touch s-init
-init.texi: s-init
 
-s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
+hash.texi: chew.c $(srcdir)/../hash.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
 	$(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi
-	touch s-hash
-hash.texi: s-hash
 
-s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
+linker.texi: chew.c $(srcdir)/../linker.c $(srcdir)/doc.str
+	$(MAKE) $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
 	$(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi
-	touch s-linker
-linker.texi: s-linker
 
 LIBBFD_H_DEP = \
 	$(srcdir)/../libbfd-in.h	\
@@ -296,7 +272,7 @@
 
 MOSTLYCLEANFILES = $(MKDOC) *.o
 
-CLEANFILES = s-* *.p *.ip
+CLEANFILES = *.p *.ip
 
 DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
 
--- ../../orig/binutils-2.15.97/gas/doc/Makefile.am	2005-03-22 10:31:51.000000000 -0500
+++ ./gas/doc/Makefile.am	2005-04-26 17:41:37.832563822 -0400
@@ -58,9 +58,9 @@
 	c-xtensa.texi \
 	c-z8k.texi
 
-gasver.texi: Makefile
+gasver.texi: $(srcdir)/../../bfd/configure
 	rm -f $@
-	echo '@set VERSION $(VERSION)' > $@
+	eval `grep '^ *VERSION=' $<`; echo '@set VERSION $$VERSION' > $@
 
 $(srcdir)/as.info: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
 as.dvi: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
@@ -73,9 +73,7 @@
 
 noinst_TEXINFOS = internals.texi
 
-DISTCLEANFILES = asconfig.texi
-
-MAINTAINERCLEANFILES = gasver.texi
+MAINTAINERCLEANFILES = asconfig.texi gasver.texi
 
 BASEDIR = $(srcdir)/../..
 BFDDIR = $(BASEDIR)/bfd


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