From 040e098a5de9115501bd76ce0ea7adc9a0eded21 Mon Sep 17 00:00:00 2001 From: Kelley Cook Date: Mon, 12 Apr 2004 20:29:49 +0000 Subject: [PATCH] re PR bootstrap/14905 ('make install' fails on grepjar.1, not included in tarball) 2004-04-12 Kelley Cook PR bootstrap/14905 * configure.ac: Parse --enable-generated-files-in-srcdir. * Makefile.am: Copy man and info files to srcdir if requested. * configure: Regenerate. * Makefile.in Regenerate. From-SVN: r80628 --- fastjar/ChangeLog | 8 +++++++ fastjar/Makefile.am | 24 +++++++++++++++++++ fastjar/Makefile.in | 55 +++++++++++++++++++++++++++++++++----------- fastjar/configure | 45 +++++++++++++++++++++++++++++++++++- fastjar/configure.ac | 20 ++++++++++++++++ 5 files changed, 137 insertions(+), 15 deletions(-) diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog index e5d690bde1c..5032e913cca 100644 --- a/fastjar/ChangeLog +++ b/fastjar/ChangeLog @@ -1,3 +1,11 @@ +2004-04-12 Kelley Cook + + PR bootstrap/14905 + * configure.ac: Parse --enable-generated-files-in-srcdir. + * Makefile.am: Copy man and info files to srcdir if requested. + * configure: Regenerate. + * Makefile.in Regenerate. + 2004-03-10 Kelley Cook * configure.ac: Bump AC_PREREQ to 2.59. diff --git a/fastjar/Makefile.am b/fastjar/Makefile.am index 3d4ea36c232..6c442e22868 100644 --- a/fastjar/Makefile.am +++ b/fastjar/Makefile.am @@ -82,3 +82,27 @@ jar.pod: $(srcdir)/fastjar.texi grepjar.pod: $(srcdir)/fastjar.texi -$(TEXI2POD) -D grepjar $< > $@ + +# GCC LOCAL CHANGE +# The following commands allow us to release tarballs with the man pages +# and info documentation prebuilt. This feature is enabled via +# --enable-generated-files-in-srcdir in the configure script. + +if GENINSRC +STAMP_GENINSRC = stamp-geninsrc +else +STAMP_GENINSRC = +endif + +all-local: $(STAMP_GENINSRC) + +stamp-geninsrc: jar.1 grepjar.1 fastjar.info + -cp -p $(top_builddir)/jar.1 $(srcdir)/jar.1 + -cp -p $(top_builddir)/grepjar.1 $(srcdir)/grepjar.1 + -cp -p $(top_builddir)/fastjar.info $(srcdir)/fastjar.info + touch $@ + +CLEANFILES = stamp-geninsrc +MAINTAINERCLEANFILES = $(srcdir)/jar.1 \ + $(srcdir)/grepjar.1 \ + $(srcdir)/fastjar.info diff --git a/fastjar/Makefile.in b/fastjar/Makefile.in index 2e295a25c71..2260777ed82 100644 --- a/fastjar/Makefile.in +++ b/fastjar/Makefile.in @@ -60,6 +60,8 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GENINSRC_FALSE = @GENINSRC_FALSE@ +GENINSRC_TRUE = @GENINSRC_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -189,6 +191,20 @@ EXTRA_DIST = $(man_MANS) TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl POD2MAN = pod2man --center="GNU" --release="gcc-@gcc_version@" +@GENINSRC_FALSE@STAMP_GENINSRC = + + +# GCC LOCAL CHANGE +# The following commands allow us to release tarballs with the man pages +# and info documentation prebuilt. This feature is enabled via +# --enable-generated-files-in-srcdir in the configure script. +@GENINSRC_TRUE@STAMP_GENINSRC = stamp-geninsrc + +CLEANFILES = stamp-geninsrc +MAINTAINERCLEANFILES = $(srcdir)/jar.1 \ + $(srcdir)/grepjar.1 \ + $(srcdir)/fastjar.info + subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs @@ -601,7 +617,7 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-am -all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(MANS) config.h +all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(MANS) config.h all-local installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir) @@ -622,6 +638,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) @@ -629,6 +646,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am @@ -707,19 +725,20 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man uninstall-man: uninstall-man1 -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags dist dist-all dist-gzip dist-info distcheck \ - distclean distclean-compile distclean-generic distclean-hdr \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-man1 \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-aminfo \ - maintainer-clean-generic mostlyclean mostlyclean-aminfo \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-info-am uninstall-man uninstall-man1 +.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ + clean-binPROGRAMS clean-generic ctags dist dist-all dist-gzip \ + dist-info distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am info info-am install \ + install-am install-binPROGRAMS install-data install-data-am \ + install-exec install-exec-am install-info install-info-am \ + install-man install-man1 install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ + mostlyclean-aminfo mostlyclean-compile mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-info-am uninstall-man \ + uninstall-man1 %.1: %.pod @@ -734,6 +753,14 @@ jar.pod: $(srcdir)/fastjar.texi grepjar.pod: $(srcdir)/fastjar.texi -$(TEXI2POD) -D grepjar $< > $@ + +all-local: $(STAMP_GENINSRC) + +stamp-geninsrc: jar.1 grepjar.1 fastjar.info + -cp -p $(top_builddir)/jar.1 $(srcdir)/jar.1 + -cp -p $(top_builddir)/grepjar.1 $(srcdir)/grepjar.1 + -cp -p $(top_builddir)/fastjar.info $(srcdir)/fastjar.info + touch $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/fastjar/configure b/fastjar/configure index 9c07ad4b98d..6c17bc46d68 100755 --- a/fastjar/configure +++ b/fastjar/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RM CP CHMOD MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT fastjar_warn_cflags CPP EGREP ZLIBS ZDEPS ZINCS gcc_version LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RM CP CHMOD MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT fastjar_warn_cflags CPP EGREP ZLIBS ZDEPS ZINCS GENINSRC_TRUE GENINSRC_FALSE gcc_version LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -849,6 +849,10 @@ Optional Features: --enable-dependency-tracking Do not reject slow dependency extractors --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer + --enable-generated-files-in-srcdir + put copies of generated files in source dir + intended for creating source tarballs for users + without texinfo, perl, bison or flex. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -4981,6 +4985,36 @@ fi +# GCC LOCAL CHANGE +# We would like to our source tree to be readonly. However when releases or +# pre-releases are generated, the man pages need to be included as they are +# converted from the texi files via perl which we don't require end users to +# have installed. +# Therefore we have --enable-generated-files-in-srcdir to do just that. + +echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 +echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 + # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. +if test "${enable_generated_files_in_srcdir+set}" = set; then + enableval="$enable_generated_files_in_srcdir" + generated_files_in_srcdir=$enableval +else + generated_files_in_srcdir=no +fi; + +echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 +echo "${ECHO_T}$generated_files_in_srcdir" >&6 + + +if test x$generated_files_in_srcdir = xyes; then + GENINSRC_TRUE= + GENINSRC_FALSE='#' +else + GENINSRC_TRUE='#' + GENINSRC_FALSE= +fi + + # Get the version trigger filename from the toplevel if test "${with_gcc_version_trigger+set}" = set; then gcc_version_trigger=$with_gcc_version_trigger @@ -5104,6 +5138,13 @@ echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${GENINSRC_TRUE}" && test -z "${GENINSRC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"GENINSRC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"GENINSRC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -5684,6 +5725,8 @@ s,@EGREP@,$EGREP,;t t s,@ZLIBS@,$ZLIBS,;t t s,@ZDEPS@,$ZDEPS,;t t s,@ZINCS@,$ZINCS,;t t +s,@GENINSRC_TRUE@,$GENINSRC_TRUE,;t t +s,@GENINSRC_FALSE@,$GENINSRC_FALSE,;t t s,@gcc_version@,$gcc_version,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t diff --git a/fastjar/configure.ac b/fastjar/configure.ac index bb1ddf0abcb..f80fa54aa3e 100644 --- a/fastjar/configure.ac +++ b/fastjar/configure.ac @@ -67,6 +67,26 @@ AC_SUBST(ZLIBS) AC_SUBST(ZDEPS) AC_SUBST(ZINCS) +# GCC LOCAL CHANGE +# We would like to our source tree to be readonly. However when releases or +# pre-releases are generated, the man pages need to be included as they are +# converted from the texi files via perl which we don't require end users to +# have installed. +# Therefore we have --enable-generated-files-in-srcdir to do just that. + +AC_MSG_CHECKING([whether to place generated files in the source directory]) + dnl generated-files-in-srcdir is disabled by default + AC_ARG_ENABLE(generated-files-in-srcdir, +[ --enable-generated-files-in-srcdir + put copies of generated files in source dir + intended for creating source tarballs for users + without texinfo, perl, bison or flex.], + generated_files_in_srcdir=$enableval, + generated_files_in_srcdir=no) + +AC_MSG_RESULT($generated_files_in_srcdir) +AM_CONDITIONAL(GENINSRC, test x$generated_files_in_srcdir = xyes) + # Get the version trigger filename from the toplevel if test "${with_gcc_version_trigger+set}" = set; then gcc_version_trigger=$with_gcc_version_trigger