public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] Add "install-pdf" target to makefiles.
@ 2007-02-27 13:28 Brooks Moses
  2007-02-27 14:17 ` Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Brooks Moses @ 2007-02-27 13:28 UTC (permalink / raw)
  To: gcc-patches; +Cc: fortran, help-gnat, java

[-- Attachment #1: Type: text/plain, Size: 6612 bytes --]

The attached patch adds "install-pdf" support to GCC.  The pdf files are 
currently installed in $(pdfdir), with $(pdfdir) determined by the 
--with-pdfdir configure option if supplied, and otherwise defaulting to 
$(docdir), which defaults to <installdir>/share/doc.

These locations, and the installation rules, are generally a copy of 
what would happen if we applied automake v1.10 (which supplies an 
install-pdf rule) to the relevant directories.

In general, the changes are quite mechanical, but there are also quite a 
lot of them.  I regenerated all of the relevant directories with 
automake version 1.9.6, and there are two versions of the patch 
attached; one includes the regenerated files and one has them stripped 
out.  I believe that I've cc'ed this to all relevant lists....

Tested with a bootstrap and then "make install-pdf" on 
x86_64-unknown-linux-gnu configured for all languages except Ada, and 
tested the same way on i686-pc-linux-gnu configured for C, Ada, and 
Fortran.  Ok for trunk?

- Brooks


ChangeLog -------------------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* configure.ac: Add "--with-pdfdir" configure option,
	which defines pdfdir variable.
	* Makefile.def (target=fixincludes): Add install-pdf to
	missing targets.
	(recursive_targets): Add install-pdf target.
	(flags_to_pass): Add pdfdir.
	* Makefile.tpl: Add pdfdir handling, add do-install-pdf
	target.
	* configure: Regenerate
	* Makefile.in: Regenerate

gcc/ChangeLog ---------------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Make-lang.in: Add install-pdf target as
	copied from automake v1.10 rules.
	* configure.ac: Add install-pdf to target list.
	* configure: Regenerate.

gcc/ada/ChangeLog -----------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Make-lang.in: Add install-pdf target as copied from
	automake v1.10 rules.

gcc/fortran/ChangeLog -------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Make-lang.in: Add install-pdf target as copied from
	automake v1.10 rules.

gcc/java/ChangeLog ----------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Make-lang.in: Add install-pdf target as copied from
	automake v1.10 rules.

gcc/treelang/ChangeLog ------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Make-lang.in: Add install-pdf target as copied from
	automake v1.10 rules.

gcc/cp/ChangeLog ------------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Make-lang.in: Add dummy lang.install-pdf target.

gcc/objc/ChangeLog ----------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Make-lang.in: Add dummy lang.install-pdf target.

gcc/objcp/ChangeLog ---------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Make-lang.in: Add dummy lang.install-pdf target.

libada/ChangeLog ------------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Make-lang.in: Add dummy install-pdf target.

libgcc/ChangeLog ------------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.in: Add install-html and install-pdf dummy
	targets.

libgomp/ChangeLog -----------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.am: Add install-pdf target as copied from
	automake v1.10 rules.
	* Makefile.in: Regenerate

libdecnumber/ChangeLog ------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.in: Add dummy install-pdf target.

zlib/ChangeLog.gcj ----------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.am: Add dummy install-pdf target.
	* Makefile.in: Regenerate

libstdc++-v3/ChangeLog ------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.am: Add dummy install-pdf target.
	* Makefile.in: Regenerate

libobjc/ChangeLog -----------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.in: Add dummy install-pdf target.

libgfortran/ChangeLog -------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.am: Add dummy install-pdf target.
	* Makefile.in: Regenerate

libcpp/ChangeLog ------------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.in: Add dummy install-pdf target.

gnattools/ChangeLog ---------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.in: Add dummy install-pdf target.

fixincludes/ChangeLog -------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.in: Add dummy install-pdf target.

libmudflap/ChangeLog --------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.am: Add dummy install-pdf target.
	* Makefile.in: Regenerate

boehm-gc/ChangeLog ----------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.am: Add dummy install-pdf target.
	* Makefile.in: Regenerate

libffi/ChangeLog ------------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.am: Add dummy install-pdf target.
	* Makefile.in: Regenerate

libssp/ChangeLog ------------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.am: Add dummy install-pdf target.
	* Makefile.in: Regenerate

libjava/ChangeLog -----------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.am: Add dummy install-pdf target.
	* Makefile.in: Regenerate
	* include/Makefile.in: Regenerate
	* testsuite/Makefile.in: Regenerate
	* gcj/Makefile.in: Regenerate

libiberty/ChangeLog ---------------------------------------------
2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>

	* Makefile.in: Add install-pdf target as copied from
	automake v1.10 rules.
	* testsuite/Makefile.in: Add dummy install-pdf target.

-----------------------------------------------------------------

[-- Attachment #2: install-pdf-noregen.diff --]
[-- Type: text/x-patch, Size: 21940 bytes --]

Index: libgcc/Makefile.in
===================================================================
--- libgcc/Makefile.in	(revision 122137)
+++ libgcc/Makefile.in	(working copy)
@@ -735,15 +735,14 @@
 all: $(extra-parts)
 
 # Documentation targets (empty).
-.PHONY: info html dvi pdf
+.PHONY: info html dvi pdf install-html install-pdf
 
 info:
-
 html:
-
+install-html:
 dvi:
-
 pdf:
+install-pdf:
 
 # Install rules.  These do not depend on "all", so that they can be invoked
 # recursively from it.
Index: libgomp/Makefile.am
===================================================================
--- libgomp/Makefile.am	(revision 122137)
+++ libgomp/Makefile.am	(working copy)
@@ -51,10 +51,19 @@
 env.o: libgomp_f.h
 
 
-# No install-html target
-.PHONY: install-html
+# No install-html or install-pdf support in automake yet
+.PHONY: install-html install-pdf
 install-html:
 
+install-pdf: $(PDFS)
+	@$(NORMAL_INSTALL)
+	test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
+	@list='$(PDFS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+	done
 
 # Automake Documentation:
 # If your package has Texinfo files in many directories, you can use the
Index: libdecnumber/Makefile.in
===================================================================
--- libdecnumber/Makefile.in	(revision 122137)
+++ libdecnumber/Makefile.in	(working copy)
@@ -136,13 +136,14 @@
 html:
 info:
 install-info:
+install-pdf:
 install-man:
 install-html:
 install:
 
 .PHONY: installdirs install install-strip mostlyclean clean distclean \
   maintainer-clean check installcheck dvi pdf html info install-info \
-  install-man update-po install-html
+  install-pdf install-man update-po install-html
 
 COMPILE = source='$<' object='$@' libtool=no $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALL_CFLAGS) -c
 
Index: gcc/java/Make-lang.in
===================================================================
--- gcc/java/Make-lang.in	(revision 122137)
+++ gcc/java/Make-lang.in	(working copy)
@@ -28,8 +28,8 @@
 # Each language makefile fragment must provide the following targets:
 #
 # foo.all.cross, foo.start.encap, foo.rest.encap,
-# foo.install-common, foo.install-man, foo.install-info, foo.dvi, foo.pdf,
-# foo.html, foo.uninstall,
+# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
+# foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
 # foo.mostlyclean, foo.clean, foo.distclean,
 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
 #
@@ -135,8 +135,13 @@
 	-cp -p $^ $(srcdir)/doc
 
 java.dvi: doc/gcj.dvi
-java.pdf: doc/gcj.pdf
+
+JAVA_PDFFILES = doc/gcj.pdf
+
+java.pdf: $(JAVA_PDFFILES)
+
 java.html: $(build_htmldir)/java/index.html
+
 JAVA_MANFILES = doc/gcj.1 doc/jcf-dump.1 doc/gij.1 \
                 doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1 \
 		doc/gcj-dbtool.1 doc/gc-analyze.1
@@ -187,6 +192,16 @@
 
 java.install-info: $(DESTDIR)$(infodir)/gcj.info
 
+java.install-pdf: $(JAVA_PDFFILES)
+	@$(NORMAL_INSTALL)
+	test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
+	@list='$(JAVA_PDFFILES)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(pdf__strip_dir) \
+	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+	done
+
 #\f
 # Clean hooks:
 # A lot of the ancillary files are deleted by the main makefile.
Index: gcc/objc/Make-lang.in
===================================================================
--- gcc/objc/Make-lang.in	(revision 122137)
+++ gcc/objc/Make-lang.in	(working copy)
@@ -23,8 +23,8 @@
 # Each language makefile fragment must provide the following targets:
 #
 # foo.all.cross, foo.start.encap, foo.rest.encap,
-# foo.install-common, foo.install-man, foo.install-info, foo.dvi, foo.pdf
-# foo.uninstall,
+# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
+# foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
 # foo.mostlyclean, foo.clean, foo.distclean,
 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
 #
@@ -91,6 +91,7 @@
 objc.install-info:
 objc.dvi:
 objc.pdf:
+objc.install-pdf:
 objc.html:
 objc.man:
 objc.srcinfo:
Index: gcc/objcp/Make-lang.in
===================================================================
--- gcc/objcp/Make-lang.in	(revision 122137)
+++ gcc/objcp/Make-lang.in	(working copy)
@@ -23,8 +23,8 @@
 # Each language makefile fragment must provide the following targets:
 #
 # foo.all.cross, foo.start.encap, foo.rest.encap,
-# foo.install-common, foo.install-man, foo.install-info, foo.dvi, foo.pdf
-# foo.uninstall,
+# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
+# foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
 # foo.mostlyclean, foo.clean, foo.distclean,
 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
 #
@@ -99,6 +99,7 @@
 obj-c++.install-info:
 obj-c++.dvi:
 obj-c++.pdf:
+obj-c++.install-pdf:
 obj-c++.html:
 obj-c++.srcinfo:
 obj-c++.srcextra:
Index: gcc/cp/Make-lang.in
===================================================================
--- gcc/cp/Make-lang.in	(revision 122137)
+++ gcc/cp/Make-lang.in	(working copy)
@@ -24,8 +24,8 @@
 # Each language makefile fragment must provide the following targets:
 #
 # foo.all.cross, foo.start.encap, foo.rest.encap,
-# foo.install-common, foo.install-man, foo.install-info, foo.dvi, foo.pdf
-# foo.uninstall,
+# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
+# foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
 # foo.mostlyclean, foo.clean, foo.distclean,
 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
 #
@@ -119,6 +119,7 @@
 c++.install-info:
 c++.dvi:
 c++.pdf:
+c++.install-pdf:
 c++.html:
 c++.srcinfo:
 c++.srcextra:
Index: gcc/ada/Make-lang.in
===================================================================
--- gcc/ada/Make-lang.in	(revision 122137)
+++ gcc/ada/Make-lang.in	(working copy)
@@ -23,8 +23,9 @@
 # Each language makefile fragment must provide the following targets:
 #
 # foo.all.cross, foo.start.encap, foo.rest.encap,
-# foo.install-common, foo.install-man, foo.install-info, foo.dvi, foo.pdf
-# foo.uninstall, foo.mostlyclean, foo.clean, foo.distclean,
+# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
+# foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
+# foo.mostlyclean, foo.clean, foo.distclean,
 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
 #
 # where `foo' is the name of the language.
@@ -433,9 +434,21 @@
 ada.dvi: doc/gnat_ugn_unw.dvi \
       doc/gnat_rm.dvi doc/gnat-style.dvi
 
-ada.pdf: doc/gnat_ugn_unw.pdf \
-      doc/gnat_rm.pdf doc/gnat-style.pdf
+ADA_PDFFILES = doc/gnat_ugn_unw.pdf \
+               doc/gnat_rm.pdf doc/gnat-style.pdf
 
+ada.pdf: $(ADA_PDFFILES)
+
+ada.install-pdf: $(ADA_PDFFILES)
+	@$(NORMAL_INSTALL)
+	test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
+	@list='$(ADA_PDFFILES)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(pdf__strip_dir) \
+	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+	done
+
 ada.html:
 
 doc/gnat_ugn_unw.dvi: doc/gnat_ugn_unw.texi $(gcc_docdir)/include/fdl.texi	\
Index: gcc/fortran/Make-lang.in
===================================================================
--- gcc/fortran/Make-lang.in	(revision 122137)
+++ gcc/fortran/Make-lang.in	(working copy)
@@ -25,10 +25,9 @@
 # Each language makefile fragment must provide the following targets:
 #
 # foo.all.cross, foo.start.encap, foo.rest.encap,
-# foo.info
-# foo.install-common, foo.install-info, foo.install-man,
-# foo.uninstall, foo.install-info, foo.dvi, foo.pdf, foo.html,
-# foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
+# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
+# foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
+# foo.mostlyclean, foo.clean, foo.distclean,
 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
 #
 # where `foo' is the name of the language.
@@ -124,9 +123,22 @@
 
 fortran.info: doc/gfortran.info
 fortran.dvi: doc/gfortran.dvi
-fortran.pdf: doc/gfortran.pdf
 fortran.html: $(build_htmldir)/gfortran/index.html
 
+F95_PDFFILES = doc/gfortran.pdf
+
+fortran.pdf: $(F95_PDFFILES)
+
+fortran.install-pdf: $(F95_PDFFILES)
+	@$(NORMAL_INSTALL)
+	test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
+	@list='$(F95_PDFFILES)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(pdf__strip_dir) \
+	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+	done
+
 F95_MANFILES = doc/gfortran.1
 
 fortran.man: $(F95_MANFILES)
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 122137)
+++ gcc/configure.ac	(working copy)
@@ -3543,8 +3543,8 @@
 rm -f Make-hooks
 touch Make-hooks
 target_list="all.cross start.encap rest.encap tags \
-	install-common install-man install-info dvi pdf html \
-	uninstall info man srcextra srcman srcinfo \
+	install-common install-man install-info install-pdf dvi pdf \
+	html uninstall info man srcextra srcman srcinfo \
 	mostlyclean clean distclean maintainer-clean"
 
 for t in $target_list
Index: gcc/treelang/Make-lang.in
===================================================================
--- gcc/treelang/Make-lang.in	(revision 122137)
+++ gcc/treelang/Make-lang.in	(working copy)
@@ -24,8 +24,8 @@
 # Each language makefile fragment must provide the following targets:
 #
 # foo.all.cross, foo.start.encap, foo.rest.encap,
-# foo.install-common, foo.install-man, foo.install-info, foo.dvi, foo.pdf
-# foo.html, foo.uninstall,
+# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
+# foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
 # foo.mostlyclean, foo.clean, foo.distclean,
 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
 #
@@ -160,8 +160,10 @@
 
 treelang.dvi: doc/treelang.dvi
 
-treelang.pdf: doc/treelang.pdf
+TREELANG_PDFFILES = doc/treelang.pdf
 
+treelang.pdf: $(TREELANG_PDFFILES)
+
 TEXI_TREELANG_FILES = treelang/treelang.texi \
 	 $(gcc_docdir)/include/gcc-common.texi \
 	 $(gcc_docdir)/include/gpl.texi \
@@ -210,6 +212,16 @@
 # We might not be able to build the info files
 treelang.install-info: $(DESTDIR)$(infodir)/treelang.info
 
+treelang.install-pdf: $(TREELANG_PDFFILES)
+	@$(NORMAL_INSTALL)
+	test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
+	@list='$(TREELANG_PDFFILES)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(pdf__strip_dir) \
+	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+	done
+
 treelang.install-man:
 
 treelang.uninstall:
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(revision 122137)
+++ gcc/Makefile.in	(working copy)
@@ -3592,9 +3592,11 @@
 doc/gccinstall.dvi: $(TEXI_GCCINSTALL_FILES)
 	$(TEXI2DVI) -I . -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
 
-pdf:: doc/gcc.pdf doc/gccint.pdf doc/gccinstall.pdf doc/cpp.pdf \
-      doc/cppinternals.pdf lang.pdf
+PDFFILES = doc/gcc.pdf doc/gccint.pdf doc/gccinstall.pdf doc/cpp.pdf \
+           doc/cppinternals.pdf
 
+pdf:: $(PDFFILES) lang.pdf
+
 doc/%.pdf: %.texi
 	$(TEXI2PDF) -I . -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
 
@@ -3890,6 +3892,18 @@
 	  else true; fi; \
 	else true; fi;
 
+pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-pdf: $(PDFFILES) lang.install-pdf
+	@$(NORMAL_INSTALL)
+	test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
+	@list='$(PDFFILES)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(pdf__strip_dir) \
+	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+	done
+
 html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
  
 install-html: $(HTMLS_BUILD)
Index: zlib/Makefile.am
===================================================================
--- zlib/Makefile.am	(revision 122137)
+++ zlib/Makefile.am	(working copy)
@@ -59,9 +59,11 @@
 	"RANLIB=$(RANLIB)" \
 	"DESTDIR=$(DESTDIR)"
 
-# No html, or install-html support.
-.PHONY: html install-html
+# No html support.
+# No install-html or install-pdf support in automake yet
+.PHONY: html install-html install-pdf
 
 html:
 install-html:
+install-pdf:
 
Index: libstdc++-v3/Makefile.am
===================================================================
--- libstdc++-v3/Makefile.am	(revision 122137)
+++ libstdc++-v3/Makefile.am	(working copy)
@@ -113,6 +113,8 @@
 
 # Installation of distribution html documentation not yet supported
 # TODO: Write custom install-html rule.
-.PHONY: install-html
+.PHONY: install-html install-pdf
 install-html:
 
+# No install-pdf support in automake yet
+install-pdf:
Index: configure.ac
===================================================================
--- configure.ac	(revision 122137)
+++ configure.ac	(working copy)
@@ -2610,6 +2610,11 @@
 [docdir="\${prefix}/${withval}"],
 [docdir="\${datarootdir}/doc"])
 
+AC_ARG_WITH(pdfdir,
+[  --with-pdfdir	Install pdf in this directory.],
+[pdfdir="\${prefix}/${withval}"],
+[pdfdir="\${docdir}"])
+
 AC_ARG_WITH(htmldir,
 [  --with-htmldir	Install html in this directory.],
 [htmldir="\${prefix}/${withval}"],
@@ -2617,6 +2622,7 @@
 
 AC_SUBST(datarootdir)
 AC_SUBST(docdir)
+AC_SUBST(pdfdir)
 AC_SUBST(htmldir)
 
 AC_OUTPUT(Makefile)
Index: libobjc/Makefile.in
===================================================================
--- libobjc/Makefile.in	(revision 122137)
+++ libobjc/Makefile.in	(working copy)
@@ -269,9 +269,10 @@
 
 doc: info dvi pdf html
 
-# No install-html support
-.PHONY: install-html
+# No install-html or install-pdf support
+.PHONY: install-html install-pdf
 install-html:
+install-pdf:
 
 libobjc$(libext).la: $(OBJS)
 	$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
Index: libgfortran/Makefile.am
===================================================================
--- libgfortran/Makefile.am	(revision 122137)
+++ libgfortran/Makefile.am	(working copy)
@@ -622,9 +622,10 @@
 intrinsics/dprod_r8.f90 \
 intrinsics/f2c_specifics.F90
 
-# No install-html support yet.
-.PHONY: install-html
+# No install-html or install-pdf support in automake yet
+.PHONY: install-html install-pdf
 install-html:
+install-pdf:
 
 # Turn on vectorization and loop unrolling for matmul.
 $(patsubst %.c,%.lo,$(notdir $(i_matmul_c))): AM_CFLAGS += -ftree-vectorize -funroll-loops
Index: Makefile.def
===================================================================
--- Makefile.def	(revision 122137)
+++ Makefile.def	(working copy)
@@ -55,6 +55,7 @@
 		missing= dvi;
 		missing= pdf;
 		missing= TAGS;
+		missing= install-pdf;
 		missing= install-info;
 		missing= installcheck; };
 host_modules= { module= flex; no_check_cross= true; };
@@ -166,6 +167,9 @@
 recursive_targets = { make_target= install-info; 
                       depend=configure;
                       depend=info; };
+recursive_targets = { make_target= install-pdf; 
+                      depend=configure;
+                      depend=pdf; };
 recursive_targets = { make_target= install-html; 
                       depend=configure;
                       depend=html; };
@@ -189,6 +193,7 @@
 flags_to_pass = { flag= datarootdir ; };
 flags_to_pass = { flag= docdir ; };
 flags_to_pass = { flag= infodir ; };
+flags_to_pass = { flag= pdfdir ; };
 flags_to_pass = { flag= htmldir ; };
 flags_to_pass = { flag= libdir ; };
 flags_to_pass = { flag= libexecdir ; };
Index: Makefile.tpl
===================================================================
--- Makefile.tpl	(revision 122137)
+++ Makefile.tpl	(working copy)
@@ -61,6 +61,7 @@
 infodir = @infodir@
 datarootdir = @datarootdir@
 docdir = @docdir@
+pdfdir = @pdfdir@
 htmldir = @htmldir@
 mandir = @mandir@
 man1dir = $(mandir)/man1
@@ -570,7 +571,8 @@
 
 # Here are the targets which correspond to the do-X targets.
 
-.PHONY: info installcheck dvi pdf html install-info install-html
+.PHONY: info installcheck dvi pdf html
+.PHONY: install-info install-pdf install-html
 .PHONY: clean distclean mostlyclean maintainer-clean realclean
 .PHONY: local-clean local-distclean local-maintainer-clean
 info: do-info
@@ -589,6 +591,8 @@
 	  $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
 	else true ; fi
 
+install-pdf: do-install-pdf
+
 install-html: do-install-html
 
 local-clean:
Index: libada/Makefile.in
===================================================================
--- libada/Makefile.in	(revision 122137)
+++ libada/Makefile.in	(working copy)
@@ -129,6 +129,8 @@
 
 install-info:
 
+install-pdf:
+
 install-html:
 
 # Cleaning rules.
Index: libmudflap/Makefile.am
===================================================================
--- libmudflap/Makefile.am	(revision 122137)
+++ libmudflap/Makefile.am	(working copy)
@@ -107,9 +107,10 @@
 
 MAKEOVERRIDES=
 
-.PHONY: install-html
-
+# No install-html or install-pdf support in automake yet
+.PHONY: install-html install-pdf
 install-html:
+install-pdf:
 
 ## ################################################################
 
Index: boehm-gc/Makefile.am
===================================================================
--- boehm-gc/Makefile.am	(revision 122137)
+++ boehm-gc/Makefile.am	(working copy)
@@ -111,7 +111,8 @@
 
 MAKEOVERRIDES=
 
-# No install-html support yet
-.PHONY: install-html
+# No install-html or install-pdf support in automake yet
+.PHONY: install-html install-pdf
 install-html:
+install-pdf:
 
Index: libiberty/testsuite/Makefile.in
===================================================================
--- libiberty/testsuite/Makefile.in	(revision 122137)
+++ libiberty/testsuite/Makefile.in	(working copy)
@@ -73,7 +73,8 @@
 		$(srcdir)/test-expandargv.c ../libiberty.a
 
 # Standard (either GNU or Cygnus) rules we don't use.
-html install-html info install-info clean-info dvi pdf install etags tags installcheck:
+html install-html info install-info clean-info dvi pdf install-pdf \
+install etags tags installcheck:
 
 # The standard clean rules.
 mostlyclean:
Index: libiberty/Makefile.in
===================================================================
--- libiberty/Makefile.in	(revision 122137)
+++ libiberty/Makefile.in	(working copy)
@@ -245,8 +245,25 @@
 install-info: install-info-subdir
 clean-info: clean-info-subdir
 dvi: libiberty.dvi dvi-subdir
-pdf: libiberty.pdf pdf-subdir
 
+LIBIBERTY_PDFFILES = libiberty.pdf
+
+pdf: $(LIBIBERTY_PDFFILES) pdf-subdir
+
+.PHONY: install-pdf
+
+pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-pdf: $(LIBIBERTY_PDFFILES)
+	@$(NORMAL_INSTALL)
+	test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
+	@list='$(LIBIBERTY_PDFFILES)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(pdf__strip_dir) \
+	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+	done
+
 # html, install-html targets
 HTMLS = libiberty.html
 
Index: libffi/Makefile.am
===================================================================
--- libffi/Makefile.am	(revision 122137)
+++ libffi/Makefile.am	(working copy)
@@ -162,9 +162,10 @@
 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
 AM_CCASFLAGS = $(AM_CPPFLAGS)
 
-# No install-html support
-.PHONY: install-html
+# No install-html or install-pdf support in automake yet
+.PHONY: install-html install-pdf
 install-html:
+install-pdf:
 
 # Multilib support.  Automake should provide these on its own.
 all-recursive: all-multi
Index: libssp/Makefile.am
===================================================================
--- libssp/Makefile.am	(revision 122137)
+++ libssp/Makefile.am	(working copy)
@@ -90,9 +90,10 @@
 
 MAKEOVERRIDES=
 
-.PHONY: install-html
-
+# No install-html or install-pdf support in automake yet
+.PHONY: install-html install-pdf
 install-html:
+install-pdf:
 
 ## ################################################################
 
Index: libjava/Makefile.am
===================================================================
--- libjava/Makefile.am	(revision 122137)
+++ libjava/Makefile.am	(working copy)
@@ -1092,9 +1092,10 @@
 
 MAKEOVERRIDES=
 
-# No install-html support yet.
-.PHONY: install-html
+# No install-html or install-pdf support in automake yet
+.PHONY: install-html install-pdf
 install-html:
+install-pdf:
 
 # Multilib support variables.
 MULTISRCTOP =
Index: libcpp/Makefile.in
===================================================================
--- libcpp/Makefile.in	(revision 122137)
+++ libcpp/Makefile.in	(working copy)
@@ -184,6 +184,7 @@
 html:
 info:
 install-info:
+install-pdf:
 install-man:
 install-html:
 
Index: gnattools/Makefile.in
===================================================================
--- gnattools/Makefile.in	(revision 122137)
+++ gnattools/Makefile.in	(working copy)
@@ -315,6 +315,8 @@
 
 install-info:
 
+install-pdf:
+
 install-html:
 
 # Cleaning rules.
Index: fixincludes/Makefile.in
===================================================================
--- fixincludes/Makefile.in	(revision 122137)
+++ fixincludes/Makefile.in	(working copy)
@@ -184,11 +184,12 @@
 	  $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@
 	$(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
 
-.PHONY: dvi pdf info html install-html
+.PHONY: dvi pdf info html install-pdf install-html
 
 dvi :
 pdf :
 info :
 html :
+install-pdf :
 install-html :
 installcheck :

[-- Attachment #3: install-pdf.diff.bz2 --]
[-- Type: application/octet-stream, Size: 13254 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch] Add "install-pdf" target to makefiles.
  2007-02-27 13:28 [patch] Add "install-pdf" target to makefiles Brooks Moses
@ 2007-02-27 14:17 ` Paolo Bonzini
  2007-02-27 15:19   ` Joseph S. Myers
  2007-02-28  1:01   ` Brooks Moses
  2007-02-27 19:11 ` Steve Kargl
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 11+ messages in thread
From: Paolo Bonzini @ 2007-02-27 14:17 UTC (permalink / raw)
  To: Brooks Moses; +Cc: gcc-patches, fortran, help-gnat, java

Brooks Moses wrote:
> The attached patch adds "install-pdf" support to GCC.  The pdf files are 
> currently installed in $(pdfdir), with $(pdfdir) determined by the 
> --with-pdfdir configure option if supplied, and otherwise defaulting to 
> $(docdir), which defaults to <installdir>/share/doc.

Foreword: I know this is asking a lot more work than this.  Would you 
have time to investigate instead switching to automake 1.10 (should be 
no big deal) and autoconf 2.61?  This would provide the same effect that 
you have here.  In addition, we wouldn't add another --with-pdfdir 
option that is there only to be deprecated when we switch to the newest 
autoconf.

I'm happy to provide help on the conversion and to review the patches.

Paolo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch] Add "install-pdf" target to makefiles.
  2007-02-27 14:17 ` Paolo Bonzini
@ 2007-02-27 15:19   ` Joseph S. Myers
  2007-02-28  1:01   ` Brooks Moses
  1 sibling, 0 replies; 11+ messages in thread
From: Joseph S. Myers @ 2007-02-27 15:19 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Brooks Moses, gcc-patches, fortran, help-gnat, java

On Tue, 27 Feb 2007, Paolo Bonzini wrote:

> Foreword: I know this is asking a lot more work than this.  Would you have
> time to investigate instead switching to automake 1.10 (should be no big deal)
> and autoconf 2.61?  This would provide the same effect that you have here.  In
> addition, we wouldn't add another --with-pdfdir option that is there only to
> be deprecated when we switch to the newest autoconf.

The gcc/ directory doesn't use automake, so all the copied rules would 
still be needed; it's only the configure option and dummy rules in 
automake directories that could be avoided.

The autoconf/automake upgrade needs coordinating across GCC, GDB, 
binutils, newlib and probably other projects in src.  This patch doesn't 
(though the toplevel parts do need applying to both repositories at the 
same time); install-pdf support can be added to GCC and GDB (neither of 
which use automake) independently of the other projects.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch] Add "install-pdf" target to makefiles.
  2007-02-27 13:28 [patch] Add "install-pdf" target to makefiles Brooks Moses
  2007-02-27 14:17 ` Paolo Bonzini
@ 2007-02-27 19:11 ` Steve Kargl
  2007-02-27 19:55 ` Andrew Pinski
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Steve Kargl @ 2007-02-27 19:11 UTC (permalink / raw)
  To: Brooks Moses; +Cc: fortran, gcc-patches, help-gnat, java

On Mon, Feb 26, 2007 at 11:56:29PM -0800, Brooks Moses wrote:
> 
> gcc/fortran/ChangeLog -------------------------------------------
> 2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>
> 
> 	* Make-lang.in: Add install-pdf target as copied from
> 	automake v1.10 rules.
> 
> libgfortran/ChangeLog -------------------------------------------
> 2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>
> 
> 	* Makefile.am: Add dummy install-pdf target.
> 	* Makefile.in: Regenerate
> 

These parts are ok.  Others will need to approve the rest
of the patch.

-- 
Steve

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch] Add "install-pdf" target to makefiles.
  2007-02-27 13:28 [patch] Add "install-pdf" target to makefiles Brooks Moses
  2007-02-27 14:17 ` Paolo Bonzini
  2007-02-27 19:11 ` Steve Kargl
@ 2007-02-27 19:55 ` Andrew Pinski
  2007-02-28  0:41   ` Brooks Moses
  2007-02-27 21:19 ` DJ Delorie
       [not found] ` <038BE980-9E62-4329-950C-F97CDB98B681@apple.com>
  4 siblings, 1 reply; 11+ messages in thread
From: Andrew Pinski @ 2007-02-27 19:55 UTC (permalink / raw)
  To: Brooks Moses; +Cc: gcc-patches, fortran, help-gnat, java

On 2/26/07, Brooks Moses <brooks.moses@codesourcery.com> wrote:

> Tested with a bootstrap and then "make install-pdf" on
> x86_64-unknown-linux-gnu configured for all languages except Ada.
Is that all languages except Ada including Objective-C++ and treelang
as those are not enabled by default?

>Ok for trunk?

> libobjc/ChangeLog -----------------------------------------------
> 2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>
>
>         * Makefile.in: Add dummy install-pdf target.

This part is ok for the trunk.

Thanks,
Andrew Pinski

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch] Add "install-pdf" target to makefiles.
  2007-02-27 13:28 [patch] Add "install-pdf" target to makefiles Brooks Moses
                   ` (2 preceding siblings ...)
  2007-02-27 19:55 ` Andrew Pinski
@ 2007-02-27 21:19 ` DJ Delorie
       [not found]   ` <45E5ED00.2090306@codesourcery.com>
       [not found] ` <038BE980-9E62-4329-950C-F97CDB98B681@apple.com>
  4 siblings, 1 reply; 11+ messages in thread
From: DJ Delorie @ 2007-02-27 21:19 UTC (permalink / raw)
  To: brooks.moses; +Cc: gcc-patches, fortran, help-gnat, java


Looks OK to me.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch] Add "install-pdf" target to makefiles.
       [not found] ` <038BE980-9E62-4329-950C-F97CDB98B681@apple.com>
@ 2007-02-27 21:52   ` Mike Stump
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Stump @ 2007-02-27 21:52 UTC (permalink / raw)
  To: Brooks Moses; +Cc: gcc-patches@gcc.gnu.org Patches

On Feb 26, 2007, at 11:56 PM, Brooks Moses wrote:
> The attached patch adds "install-pdf" support to GCC.

> gcc/objc/ChangeLog ----------------------------------------------
> 2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>
>
>    * Make-lang.in: Add dummy lang.install-pdf target.

> gcc/objcp/ChangeLog ---------------------------------------------
> 2007/02/27  Brooks Moses  <brooks.moses@codesourcery.com>
>
>    * Make-lang.in: Add dummy lang.install-pdf target.

> Ok for trunk?

Ok.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch] Add "install-pdf" target to makefiles.
  2007-02-27 19:55 ` Andrew Pinski
@ 2007-02-28  0:41   ` Brooks Moses
  0 siblings, 0 replies; 11+ messages in thread
From: Brooks Moses @ 2007-02-28  0:41 UTC (permalink / raw)
  To: gcc-patches

Andrew Pinski wrote:
> On 2/26/07, Brooks Moses <brooks.moses@codesourcery.com> wrote:
>> Tested with a bootstrap and then "make install-pdf" on
>> x86_64-unknown-linux-gnu configured for all languages except Ada.
> Is that all languages except Ada including Objective-C++ and treelang
> as those are not enabled by default?

Treelang, yes.  And I had intended it to include Objective-C++ as well, 
but reviewing my notes, I see that it got overlooked.  Thanks for asking!

I'm running a build with obj-c++ (on i686-pc-linux-gnu) now.

- Brooks

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch] Add "install-pdf" target to makefiles.
  2007-02-27 14:17 ` Paolo Bonzini
  2007-02-27 15:19   ` Joseph S. Myers
@ 2007-02-28  1:01   ` Brooks Moses
  2007-02-28  1:22     ` Joseph S. Myers
  1 sibling, 1 reply; 11+ messages in thread
From: Brooks Moses @ 2007-02-28  1:01 UTC (permalink / raw)
  To: gcc-patches; +Cc: fortran, help-gnat, java

Paolo Bonzini wrote:
> Brooks Moses wrote:
>> The attached patch adds "install-pdf" support to GCC.  The pdf files are 
>> currently installed in $(pdfdir), with $(pdfdir) determined by the 
>> --with-pdfdir configure option if supplied, and otherwise defaulting to 
>> $(docdir), which defaults to <installdir>/share/doc.
> 
> Foreword: I know this is asking a lot more work than this.  Would you 
> have time to investigate instead switching to automake 1.10 (should be 
> no big deal) and autoconf 2.61?  This would provide the same effect that 
> you have here.  In addition, we wouldn't add another --with-pdfdir 
> option that is there only to be deprecated when we switch to the newest 
> autoconf.

As Joseph said, upgrading autoconf/automake, while technically perhaps 
not a big deal, requires a substantial amount of coordination among lots 
of projects.  (And see also the debates we had about requiring an 
updated version of flex a month ago; I can see the same thing happening 
here.)  I don't think I could commit the time to try to navigate that 
process within the next few months, at least.

And, also, switching to automake 1.10 doesn't actually duplicate as much 
of this as one might hope.  Of the directories touched by this patch 
other than the top level, only nine (out of 25) are actually processed 
by automake, and of those only one actually installs any pdf files; the 
rest are trivial single-line patches.  The remaining non-top-level 
changes would need to be made regardless.

Your comment about the --with-pdfdir option is a good point, though: 
Would it be more appropriate to name the option just --pdfdir, so that 
it is consistent with what the more recent autoconf would produce, and 
thus will not need deprecation after the switch?  On the other hand, 
--with-pdfdir is consistent with the other options that are currently in 
configure.

Thanks,
- Brooks

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch] Add "install-pdf" target to makefiles.
  2007-02-28  1:01   ` Brooks Moses
@ 2007-02-28  1:22     ` Joseph S. Myers
  0 siblings, 0 replies; 11+ messages in thread
From: Joseph S. Myers @ 2007-02-28  1:22 UTC (permalink / raw)
  To: Brooks Moses; +Cc: gcc-patches, fortran, help-gnat, java

On Tue, 27 Feb 2007, Brooks Moses wrote:

> Your comment about the --with-pdfdir option is a good point, though: Would it
> be more appropriate to name the option just --pdfdir, so that it is consistent

I don't think you can do that; the only custom options you can add with 
autoconf are --enable and --with options.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch] Add "install-pdf" target to makefiles.
       [not found]   ` <45E5ED00.2090306@codesourcery.com>
@ 2007-03-01  7:38     ` Paolo Bonzini
  0 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2007-03-01  7:38 UTC (permalink / raw)
  To: Brooks Moses; +Cc: gcc-patches, Paolo Bonzini

Brooks Moses wrote:
> DJ Delorie wrote:
>> Looks OK to me.
> 
> Thanks for the review!
> 
> Paolo, I presume (since you haven't replied) that your questions/ 
> concerns about this have been addressed to your satisfaction, but I'll 
> wait a day before committing to give you a chance to say so if they 
> haven't.

Sorry, my mail server is not working.  Yes, it's okay.

Paolo


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-03-01  7:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-27 13:28 [patch] Add "install-pdf" target to makefiles Brooks Moses
2007-02-27 14:17 ` Paolo Bonzini
2007-02-27 15:19   ` Joseph S. Myers
2007-02-28  1:01   ` Brooks Moses
2007-02-28  1:22     ` Joseph S. Myers
2007-02-27 19:11 ` Steve Kargl
2007-02-27 19:55 ` Andrew Pinski
2007-02-28  0:41   ` Brooks Moses
2007-02-27 21:19 ` DJ Delorie
     [not found]   ` <45E5ED00.2090306@codesourcery.com>
2007-03-01  7:38     ` Paolo Bonzini
     [not found] ` <038BE980-9E62-4329-950C-F97CDB98B681@apple.com>
2007-02-27 21:52   ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).