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]

Move info and gmo files to objdir


I was talking to Joseph about building from a read only binutils source
tree again today, and he pointed me at the former fastjar directory
from GCC, which coaxed automake into putting info files in the objdir.
It wasn't quite what we needed - since they didn't care about
distributing the files, and since that was automake 1.7 which handled
this differently.  But a fresh look at the problem found a solution,
though I can't say I'm especially proud of it:

+MAINTAINERCLEANFILES += bfd.info
 
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES += bfd.info
+endif

if FALSE doesn't work, by the way; automake strips it out too early
and doesn't do what we want it to!

Does anyone see any problems with this patch?  I verified that binutils
builds, that it does not write to the srcdir, and that distribution
tarballs still include info and gmo files.  We don't need the extra
configure switch used by GCC; src-release's current trick of
configuring in srcdir and making distclean but not maintainer-clean
handles this correctly.

-- 
Daniel Jacobowitz
CodeSourcery

2006-12-06  Daniel Jacobowitz  <dan@codesourcery.com>

	* configure.in: Define GENINSRC_NEVER.
	* doc/Makefile.am (bfd.info): Remove srcdir prefix.
	(MAINTAINERCLEANFILES): Add info file.
	(DISTCLEANFILES): Pretend to add info file.
	* po/Make-in (.po.gmo): Put gmo files in objdir.
	* configure, Makefile.in, doc/Makefile.in: Regenerated.

2006-12-06  Daniel Jacobowitz  <dan@codesourcery.com>

	* configure.in: Define GENINSRC_NEVER.
	* doc/Makefile.am (MAINTAINERCLEANFILES): Add info file.
	(DISTCLEANFILES): Pretend to add info file.
	* po/Make-in (.po.gmo): Put gmo files in objdir.
	* configure, Makefile.in, doc/Makefile.in: Regenerated.

2006-12-06  Daniel Jacobowitz  <dan@codesourcery.com>

	* configure.in: Define GENINSRC_NEVER.
	* doc/Makefile.am (as.info): Remove srcdir prefix.
	(MAINTAINERCLEANFILES): Add info file.
	(DISTCLEANFILES): Pretend to add info file.
	* po/Make-in (.po.gmo): Put gmo files in objdir.
	* configure, Makefile.in, doc/Makefile.in: Regenerated.

2006-12-06  Daniel Jacobowitz  <dan@codesourcery.com>

	* configure.in: Define GENINSRC_NEVER.
	* doc/Makefile.am (gprof.info): Remove srcdir prefix.
	(MAINTAINERCLEANFILES): Add info file.
	(DISTCLEANFILES): Pretend to add info file.
	* po/Make-in (.po.gmo): Put gmo files in objdir.
	* configure, Makefile.in: Regenerated.

2006-12-06  Daniel Jacobowitz  <dan@codesourcery.com>

	* configure.in: Define GENINSRC_NEVER.
	* doc/Makefile.am (ld.info): Remove srcdir prefix.
	(MAINTAINERCLEANFILES): Add info file.
	(DISTCLEANFILES): Pretend to add info file.
	* po/Make-in (.po.gmo): Put gmo files in objdir.
	* configure, Makefile.in: Regenerated.

2006-12-06  Daniel Jacobowitz  <dan@codesourcery.com>

	* po/Make-in (.po.gmo): Put gmo files in objdir.

Index: bfd/configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.216
diff -u -p -r1.216 configure.in
--- bfd/configure.in	25 Oct 2006 06:49:20 -0000	1.216
+++ bfd/configure.in	7 Dec 2006 02:18:08 -0000
@@ -72,6 +72,7 @@ if test -z "$target" ; then
 fi
 
 AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
 AM_INSTALL_LIBBFD
 AC_EXEEXT
 
Index: bfd/doc/Makefile.am
===================================================================
RCS file: /cvs/src/src/bfd/doc/Makefile.am,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile.am
--- bfd/doc/Makefile.am	6 Apr 2006 21:49:26 -0000	1.20
+++ bfd/doc/Makefile.am	7 Dec 2006 02:18:08 -0000
@@ -68,7 +68,7 @@ chew.o: chew.c
 
 protos: libbfd.h libcoff.h bfd.h
 
-$(srcdir)/bfd.info bfd.dvi bfd.html: $(DOCFILES) bfdsumm.texi bfd.texinfo
+bfd.info bfd.dvi bfd.html: $(DOCFILES) bfdsumm.texi bfd.texinfo
 
 # We can't replace these rules with an implicit rule, because
 # makes without VPATH support couldn't find the .h files in `..'.
@@ -309,6 +309,11 @@ install-html-am: $(HTMLS)
 	  fi; \
 	done
 
+MAINTAINERCLEANFILES += bfd.info
 
-
-
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES += bfd.info
+endif
Index: bfd/po/Make-in
===================================================================
RCS file: /cvs/src/src/bfd/po/Make-in,v
retrieving revision 1.10
diff -u -p -r1.10 Make-in
--- bfd/po/Make-in	7 Jun 2006 15:38:00 -0000	1.10
+++ bfd/po/Make-in	7 Dec 2006 02:18:08 -0000
@@ -79,7 +79,7 @@ INSTOBJEXT = @INSTOBJEXT@
 	$(MSGFMT) -o $@ $<
 
 .po.gmo:
-	file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+	file=`echo $* | sed 's,.*/,,'`.gmo \
 	  && rm -f $$file && $(GMSGFMT) -o $$file $<
 
 .po.cat:
Index: binutils/configure.in
===================================================================
RCS file: /cvs/src/src/binutils/configure.in,v
retrieving revision 1.67
diff -u -p -r1.67 configure.in
--- binutils/configure.in	29 Oct 2006 19:07:54 -0000	1.67
+++ binutils/configure.in	7 Dec 2006 02:18:09 -0000
@@ -51,6 +51,7 @@ ZW_GNU_GETTEXT_SISTER_DIR
 AM_PO_SUBDIRS
 
 AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
 AC_EXEEXT
 if test -n "$EXEEXT"; then
   AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1,
Index: binutils/doc/Makefile.am
===================================================================
RCS file: /cvs/src/src/binutils/doc/Makefile.am,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile.am
--- binutils/doc/Makefile.am	10 Aug 2006 13:23:15 -0000	1.15
+++ binutils/doc/Makefile.am	7 Dec 2006 02:18:09 -0000
@@ -180,6 +180,15 @@ install-html-am: $(HTMLS)
 	  fi; \
 	done
 
+MAINTAINERCLEANFILES += binutils.info
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES = binutils.info
+endif
+
 # Maintenance
 
 # We need it for the taz target in ../../Makefile.in.
Index: binutils/po/Make-in
===================================================================
RCS file: /cvs/src/src/binutils/po/Make-in,v
retrieving revision 1.7
diff -u -p -r1.7 Make-in
--- binutils/po/Make-in	7 Jun 2006 15:38:00 -0000	1.7
+++ binutils/po/Make-in	7 Dec 2006 02:18:09 -0000
@@ -73,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
 	$(MSGFMT) -o $@ $<
 
 .po.gmo:
-	file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+	file=`echo $* | sed 's,.*/,,'`.gmo \
 	  && rm -f $$file && $(GMSGFMT) -o $$file $<
 
 .po.cat:
Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.194
diff -u -p -r1.194 configure.in
--- gas/configure.in	20 Sep 2006 11:35:11 -0000	1.194
+++ gas/configure.in	7 Dec 2006 02:18:10 -0000
@@ -586,6 +586,7 @@ ZW_GNU_GETTEXT_SISTER_DIR
 AM_PO_SUBDIRS
 
 AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
 AC_EXEEXT
 
 AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
Index: gas/doc/Makefile.am
===================================================================
RCS file: /cvs/src/src/gas/doc/Makefile.am,v
retrieving revision 1.46
diff -u -p -r1.46 Makefile.am
--- gas/doc/Makefile.am	2 Jun 2006 23:08:11 -0000	1.46
+++ gas/doc/Makefile.am	7 Dec 2006 02:18:10 -0000
@@ -67,7 +67,7 @@ gasver.texi: $(srcdir)/../../bfd/configu
 	eval `grep '^ *VERSION=' $(srcdir)/../../bfd/configure`; \
 	  echo "@set VERSION $$VERSION" > $@
 
-$(srcdir)/as.info as.dvi as.html: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
+as.info as.dvi as.html: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
 
 # We want install to imply install-info as per GNU standards, despite the
 # cygnus option.
@@ -121,3 +121,12 @@ as.1: $(srcdir)/as.texinfo asconfig.texi
 	        mv -f $@.T$$$$ $@) || \
 	        (rm -f $@.T$$$$ && exit 1)
 	rm -f as.pod
+
+MAINTAINERCLEANFILES += as.info
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES = as.info
+endif
Index: gas/po/Make-in
===================================================================
RCS file: /cvs/src/src/gas/po/Make-in,v
retrieving revision 1.7
diff -u -p -r1.7 Make-in
--- gas/po/Make-in	7 Jun 2006 15:38:00 -0000	1.7
+++ gas/po/Make-in	7 Dec 2006 02:18:10 -0000
@@ -73,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
 	$(MSGFMT) -o $@ $<
 
 .po.gmo:
-	file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+	file=`echo $* | sed 's,.*/,,'`.gmo \
 	  && rm -f $$file && $(GMSGFMT) -o $$file $<
 
 .po.cat:
Index: gprof/Makefile.am
===================================================================
RCS file: /cvs/src/src/gprof/Makefile.am,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile.am
--- gprof/Makefile.am	31 May 2006 15:14:37 -0000	1.28
+++ gprof/Makefile.am	7 Dec 2006 02:18:11 -0000
@@ -61,7 +61,7 @@ POD2MAN = pod2man --center="GNU" --relea
 info_TEXINFOS = gprof.texi
 man_MANS = gprof.1
 
-$(srcdir)/gprof.info: gprof.texi config.texi
+gprof.info: gprof.texi config.texi
 
 config.texi:
 	echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
@@ -177,6 +177,15 @@ dep-am: DEP
 
 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
 
+MAINTAINERCLEANFILES = gprof.info
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES = gprof.info
+endif
+
 # DO NOT DELETE THIS LINE -- mkdep uses it.
 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
 basic_blocks.o: basic_blocks.c $(INCDIR)/libiberty.h \
Index: gprof/configure.in
===================================================================
RCS file: /cvs/src/src/gprof/configure.in,v
retrieving revision 1.30
diff -u -p -r1.30 configure.in
--- gprof/configure.in	22 Nov 2006 09:45:11 -0000	1.30
+++ gprof/configure.in	7 Dec 2006 02:18:12 -0000
@@ -29,6 +29,7 @@ ZW_GNU_GETTEXT_SISTER_DIR
 AM_PO_SUBDIRS
 
 AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
 AC_EXEEXT
 
 AC_CHECK_HEADERS(sys/gmon_out.h)
Index: gprof/po/Make-in
===================================================================
RCS file: /cvs/src/src/gprof/po/Make-in,v
retrieving revision 1.9
diff -u -p -r1.9 Make-in
--- gprof/po/Make-in	7 Jun 2006 15:38:00 -0000	1.9
+++ gprof/po/Make-in	7 Dec 2006 02:18:12 -0000
@@ -73,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
 	$(MSGFMT) -o $@ $<
 
 .po.gmo:
-	file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+	file=`echo $* | sed 's,.*/,,'`.gmo \
 	  && rm -f $$file && $(GMSGFMT) -o $$file $<
 
 .po.cat:
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.225
diff -u -p -r1.225 Makefile.am
--- ld/Makefile.am	28 Nov 2006 04:54:06 -0000	1.225
+++ ld/Makefile.am	7 Dec 2006 02:18:12 -0000
@@ -1760,7 +1760,7 @@ ldver.texi: $(srcdir)/../bfd/configure
 	eval `grep '^ *VERSION=' $(srcdir)/../bfd/configure`; \
 	  echo "@set VERSION $$VERSION" > $@
 
-$(srcdir)/ld.info ld.dvi ld.html: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
+ld.info ld.dvi ld.html: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
 
 # Build the man page from the texinfo file
 # The sed command removes the no-adjust Nroff command so that
@@ -1877,6 +1877,15 @@ DISTCLEANFILES = tdirs site.exp site.bak
 distclean-local:
 	rm -rf ldscripts
 
+MAINTAINERCLEANFILES += ld.info
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES += ld.info
+endif
+
 # Targets to rebuild dependencies in this Makefile.
 # Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
 DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
Index: ld/configure.in
===================================================================
RCS file: /cvs/src/src/ld/configure.in,v
retrieving revision 1.41
diff -u -p -r1.41 configure.in
--- ld/configure.in	22 Nov 2006 09:45:09 -0000	1.41
+++ ld/configure.in	7 Dec 2006 02:18:13 -0000
@@ -92,6 +92,7 @@ AC_PROG_YACC
 AM_PROG_LEX
 
 AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
 
 . ${srcdir}/configure.host
 
Index: ld/po/Make-in
===================================================================
RCS file: /cvs/src/src/ld/po/Make-in,v
retrieving revision 1.7
diff -u -p -r1.7 Make-in
--- ld/po/Make-in	7 Jun 2006 15:38:01 -0000	1.7
+++ ld/po/Make-in	7 Dec 2006 02:18:13 -0000
@@ -73,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
 	$(MSGFMT) -o $@ $<
 
 .po.gmo:
-	file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+	file=`echo $* | sed 's,.*/,,'`.gmo \
 	  && rm -f $$file && $(GMSGFMT) -o $$file $<
 
 .po.cat:
Index: opcodes/po/Make-in
===================================================================
RCS file: /cvs/src/src/opcodes/po/Make-in,v
retrieving revision 1.7
diff -u -p -r1.7 Make-in
--- opcodes/po/Make-in	7 Jun 2006 15:38:01 -0000	1.7
+++ opcodes/po/Make-in	7 Dec 2006 02:18:14 -0000
@@ -73,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
 	$(MSGFMT) -o $@ $<
 
 .po.gmo:
-	file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+	file=`echo $* | sed 's,.*/,,'`.gmo \
 	  && rm -f $$file && $(GMSGFMT) -o $$file $<
 
 .po.cat:


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