This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: preparing to drop texinfo from CVS


On Tue, May 02, 2000 at 10:26:37AM -0600, Jeffrey A Law wrote:
> 
>   In message <20000501184044.I714@wolery.cumb.org>you write:
>   > On Mon, May 01, 2000 at 05:41:30PM -0700, Geoff Keating wrote:
>   > > Zack Weinberg <zack@wolery.cumb.org> writes:
>   > > 
>   > > > This patch adds suitable widgetry to the configure script and the
>   > > > Makefile, so that we can stop bundling texinfo.
...
>   > > I'd very much rather this was done the other way around: Use the
>   > > single-tree makeinfo if it exists, otherwise use whatever is available;
>   > > then once it's found a makeinfo, check its version.
>   > 
>   > Very well... updated patch, same changelog:
> This is basically OK.
> 
> The only problem I saw is you included lots of changes to Makefile.in which
> were not related to the texinfo changes.  Please check in just the changes
> related to zapping texinfo.

Sorry, I thought I trimmed those out properly.

The patch I actually committed is below.

> As for the pre-built files, the way we're going to deal with that is to
> build them for the release tarballs (and possibly the snapshot tarballs).

What I mean is, if you have the info files in the source directory,
but makeinfo's too old, they won't get installed.

zw

	* aclocal.m4 (gcc_AC_CHECK_PROG_VER): New macro.
	* configure.in: Look for makeinfo in the unified tree, then
	for a system makeinfo which is sufficiently new.
	* Makefile.in: If configure says makeinfo is too old, don't
	build or install Info documentation.

===================================================================
Index: aclocal.m4
--- aclocal.m4	2000/04/26 00:03:36	1.25
+++ aclocal.m4	2000/05/02 19:04:47
@@ -798,3 +798,28 @@ if test $ac_cv_func_mmap_file = yes; the
 	    [Define if read-only mmap of a plain file works.])
 fi
 ])
+
+dnl Locate a program and check that its version is acceptable.
+dnl AC_PROG_CHECK_VER(var, name, version-switch,
+dnl                  version-extract-regexp, version-glob)
+AC_DEFUN(gcc_AC_CHECK_PROG_VER,
+[AC_CHECK_PROG([$1], [$2], [$2])
+if test -n "[$]$1"; then
+  # Found it, now check the version.
+  AC_CACHE_CHECK(for modern $2, gcc_cv_prog_$2_modern,
+[changequote(<<,>>)dnl
+  ac_prog_version=`<<$>>$1 $3 2>&1 |
+                   sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'`
+  echo "configure:__oline__: version of $2 is $ac_prog_version" >&AC_FD_CC
+  case $ac_prog_version in
+    '')     gcc_cv_prog_$2_modern=no;;
+    <<$5>>)
+            gcc_cv_prog_$2_modern=yes;;
+    *)      gcc_cv_prog_$2_modern=no;;
+  esac
+changequote([,])dnl
+])
+else
+  gcc_cv_prog_$2_modern=no
+fi
+])
===================================================================
Index: configure.in
--- configure.in	2000/05/02 00:15:28	1.365
+++ configure.in	2000/05/02 19:04:48
@@ -383,6 +383,30 @@ AC_CHECK_HEADER(pthread.h, [have_pthread
 # See if GNAT has been installed
 AC_CHECK_PROG(gnat, gnatbind, yes, no)
 
+# Do we have a single-tree copy of texinfo?
+if test -f $srcdir/../texinfo/Makefile.in; then
+  MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
+  gcc_cv_prog_makeinfo_modern=yes
+  AC_MSG_RESULT([Using makeinfo from the unified source tree.])
+else
+  # See if makeinfo has been installed and is modern enough
+  # that we can use it.
+  gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
+  [GNU texinfo.* \([0-9][0-9.]*\)],
+  [3.1[2-9] | 3.[2-9][0-9] | 4.* | 1.6[89] | 1.7[0-9]])
+fi
+
+if test $gcc_cv_prog_makeinfo_modern = no; then
+  AC_MSG_WARN([
+*** Makeinfo is missing or too old.
+*** Info documentation will not be built or installed.])
+  BUILD_INFO=
+  INSTALL_INFO=
+else
+  BUILD_INFO=info		AC_SUBST(BUILD_INFO)
+  INSTALL_INFO=install-info	AC_SUBST(INSTALL_INFO)
+fi
+
 # See if the stage1 system preprocessor understands the ANSI C
 # preprocessor stringification operator.
 AC_C_STRINGIZE
===================================================================
Index: Makefile.in
--- Makefile.in	2000/05/01 18:20:09	1.432
+++ Makefile.in	2000/05/02 19:04:49
@@ -108,9 +108,7 @@ LN_S=@LN_S@
 # These permit overriding just for certain files.
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
-MAKEINFO = `if [ -f $(objdir)/../texinfo/makeinfo/Makefile ] ; \
-	then echo $(objdir)/../texinfo/makeinfo/makeinfo ; \
-	else echo makeinfo ; fi`
+MAKEINFO = @MAKEINFO@
 MAKEINFOFLAGS =
 TEXI2DVI = texi2dvi
 # For GNUmake: let us decide what gets passed to recursive makes.
@@ -425,6 +423,10 @@ LIBCONVERT =
 # Control whether header files are installed.
 INSTALL_HEADERS=install-headers
 
+# Control whether Info documentation is built and installed.
+BUILD_INFO = @BUILD_INFO@
+INSTALL_INFO = @INSTALL_INFO@
+
 # Additional directories of header files to run fixincludes on.
 # These should be directories searched automatically by default
 # just as /usr/include is.
@@ -2313,7 +2315,7 @@ stmp-fixproto: fixhdr.ready fixproto stm
 #
 # Remake the info files.
 
-doc: info gccbug
+doc: $(BUILD_INFO) gccbug
 info: cpp.info gcc.info lang.info
 
 cpp.info: $(srcdir)/cpp.texi
@@ -2473,8 +2475,8 @@ install: $(INSTALL_TARGET) ; @true
 # Install the driver last so that the window when things are
 # broken is small.
 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
-    $(INSTALL_CPP) install-man install-info intl.install lang.install-normal \
-    install-driver
+    $(INSTALL_CPP) install-man $(INSTALL_INFO) intl.install \
+    lang.install-normal install-driver
 
 # Do nothing while making gcc with a cross-compiler. The person who
 # makes gcc for the target machine has to know how to put a complete

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