krb5 commit: Remove util/reconf
Tom Yu
tlyu at mit.edu
Fri Dec 18 08:16:29 EST 2015
https://github.com/krb5/krb5/commit/84e41e7299c4da367e2e45f6267cb7cc634d84be
commit 84e41e7299c4da367e2e45f6267cb7cc634d84be
Author: Tom Yu <tlyu at mit.edu>
Date: Thu Dec 17 17:42:05 2015 -0500
Remove util/reconf
The bulk of the util/reconf script is to detect old versions of
autoconf and possibly work around bugs in them. Require
autoconf>=2.63, and remove the util/reconf script. Adjust
documentation and other scripts accordingly.
Also remove Makefile rules that remove autom4te.cache. Such rules
were supposedly necessary when mixing of different versions of
autoconf was common; this seems to be less of an issue now.
ticket: 8299
subject: Remove util/reconf
doc/build/doing_build.rst | 57 ++++++++++--------------
src/aclocal.m4 | 2 +-
src/config/post.in | 7 +---
src/include/Makefile.in | 2 -
src/util/mkrel | 4 +-
src/util/reconf | 106 ---------------------------------------------
6 files changed, 27 insertions(+), 151 deletions(-)
diff --git a/doc/build/doing_build.rst b/doc/build/doing_build.rst
index 3c686cc..25daa52 100644
--- a/doc/build/doing_build.rst
+++ b/doc/build/doing_build.rst
@@ -1,38 +1,6 @@
Doing the build
===============
-Using autoconf
---------------
-
-(If you are not a developer, you can skip this section.)
-
-In the Kerberos V5 source directory, there is a configure script which
-automatically determines the compilation environment and creates the
-proper Makefiles for a particular platform. This configure script is
-generated using autoconf, which you should already have installed.
-
-Normal users will not need to worry about running autoconf; the
-distribution comes with the configure script already prebuilt.
-
-One tool which is provided for the convenience of developers can be
-found in ``src/util/reconf``. This program should be run while the
-current directory is the top source directory. It will automatically
-rebuild the configure script if it needs rebuilding. If you know that
-you have made a change that will require that the configure file be
-rebuilt from scratch, specify the **-**\ **-force** option::
-
- cd /u1/krb5-VERSION/src
- ./util/reconf --force
-
-Then follow the instructions for building packaged source trees
-(below). To install the binaries into a binary tree, do::
-
- cd /u1/krb5-VERSION/src
- make all
- make install DESTDIR=somewhere-else
-
-You have a number of different options in how to build Kerberos.
-
.. _do_build:
Building within a single tree
@@ -165,5 +133,26 @@ Cleaning up the build
command.
* Use ``make distclean`` to remove all files generated by running
./configure script. After running ``make distclean`` your source
- tree (ideally) should look like the raw (just un-tarred) source tree
- with executed ``util/reconf`` command.
+ tree (ideally) should look like the raw (just un-tarred) source
+ tree.
+
+Using autoconf
+--------------
+
+(If you are not a developer, you can ignore this section.)
+
+In the Kerberos V5 source directory, there is a configure script which
+automatically determines the compilation environment and creates the
+proper Makefiles for a particular platform. This configure script is
+generated using autoconf, which you should already have installed if
+you will be making changes to ``src/configure.in``.
+
+Normal users will not need to worry about running autoconf; the
+distribution comes with the configure script already prebuilt.
+
+The autoconf package comes with a script called ``autoreconf`` that
+will automatically run ``autoconf`` and ``autoheader`` as needed. You
+should run ``autoreconf`` from the top source directory, e.g.::
+
+ cd /u1/krb5-VERSION/src
+ autoreconf --verbose
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index e2d5434..118c2c5 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -1,4 +1,4 @@
-AC_PREREQ(2.53)
+AC_PREREQ(2.63)
AC_COPYRIGHT([Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Massachusetts Institute of Technology.
])
diff --git a/src/config/post.in b/src/config/post.in
index 07816ed..f073396 100644
--- a/src/config/post.in
+++ b/src/config/post.in
@@ -150,7 +150,7 @@ clean:: clean-$(WHAT)
clean-unix::
$(RM) $(OBJS) $(DEPTARGETS_CLEAN) $(EXTRA_FILES)
$(RM) et-[ch]-*.et et-[ch]-*.[ch] testlog
- -$(RM) -r $(top_srcdir)/autom4te.cache testdir
+ -$(RM) -r testdir
clean-windows::
$(RM) *.$(OBJEXT)
@@ -173,17 +173,12 @@ Makefile: $(srcdir)/Makefile.in $(srcdir)/deps $(BUILDTOP)/config.status \
cd $(BUILDTOP) && $(SHELL) config.status $(mydir)/Makefile
$(BUILDTOP)/config.status: $(top_srcdir)/configure
cd $(BUILDTOP) && $(SHELL) config.status --recheck
-# autom4te.cache supposedly improves performance with multiple runs, but
-# it breaks across versions, and around MIT we've got plenty of version
-# mixing. So nuke it.
$(top_srcdir)/configure: @MAINT@ \
$(top_srcdir)/configure.in \
$(top_srcdir)/patchlevel.h \
$(top_srcdir)/aclocal.m4
- -$(RM) -r $(top_srcdir)/autom4te.cache
cd $(top_srcdir) && \
$(AUTOCONF) --include=$(CONFIG_RELTOPDIR) $(AUTOCONFFLAGS)
- -$(RM) -r $(top_srcdir)/autom4te.cache
RECURSE_TARGETS=all-recurse clean-recurse distclean-recurse install-recurse \
generate-files-mac-recurse \
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
index b160ea4..4bb11e4 100644
--- a/src/include/Makefile.in
+++ b/src/include/Makefile.in
@@ -34,10 +34,8 @@ all-unix:: @MAINT@ verify-calling-conventions-krb5
$(srcdir)/autoconf.h.in: @MAINT@ $(srcdir)/autoconf.stmp
$(srcdir)/autoconf.stmp: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
- $(RM) -r $(top_srcdir)/autom4te.cache
cd $(top_srcdir) && $(AUTOHEADER) --include=$(CONFIG_RELTOPDIR) $(AUTOHEADERFLAGS)
touch $(srcdir)/autoconf.stmp
- $(RM) -r $(top_srcdir)/autom4te.cache
##DOS##autoconf.h: win-mac.h
##DOS## $(CP) win-mac.h $@
diff --git a/src/util/mkrel b/src/util/mkrel
index a1c0d36..6223cf1 100755
--- a/src/util/mkrel
+++ b/src/util/mkrel
@@ -167,7 +167,7 @@ if test $dosrc = t; then
make)
fi
echo "Creating configure scripts..."
- (cd $reldir/src; util/reconf)
+ (cd $reldir/src; autoreconf -v)
if test -d $reldir/src/util/autoconf; then
echo "Cleaning src/util/autoconf..."
@@ -179,7 +179,7 @@ echo "Nuking unneeded files..."
find $reldir \( -name TODO -o -name todo -o -name .cvsignore \
-o -name .gitignore -o -name BADSYMS -o -name .Sanitize \
-o -name .rconf \) -print | xargs rm -f || true
-find $reldir -type d \( -name autom4te.cache \
+find $reldir -depth -type d \( -name autom4te.cache \
-o -name \$ac_config_fragdir \) -exec rm -rf {} \; || true
rm -rf $reldir/.git || true
diff --git a/src/util/reconf b/src/util/reconf
deleted file mode 100755
index aec534f..0000000
--- a/src/util/reconf
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/sh
-
-force=
-autoreconfprog=autoreconf
-localdir=.
-autoreconfoptions=""
-verbose=false
-localdirarg=
-
-autoreconf="/bin/sh $autoreconfprog"
-
-# This should prevent autoreconf -- at least, the Debian version -- from
-# running aclocal in directories with configure.in but not aclocal.m4, so
-# that we can find the top-level one via the --include option.
-ACLOCAL=true ; export ACLOCAL
-
-usage="Usage: $0 [--force] [--verbose] [--help]"
-for option
-do
- case "$option" in
- --force | -f)
- echo "Remaking all configuration files"
- force=--force ;;
- -help | --help | --hel | --he | --h)
- echo "$usage"; exit 0 ;;
- -v | --verbose)
- verbose=true ;;
- *) echo "$usage"; exit 1 ;;
- esac
-done
-
-# Currently (2003-04-24) we need 2.52 or later.
-patb="2.(1[0-9][0-9])|(5[2-9])|([6-9][0-9])"
-
-# sedcmd1 recognizes the older 2.12 version, and sedcmd2 the newer 2.49
-sedcmd1="s,.*version \(.*\)$,\1,"
-sedcmd2="s,.*) \(.*\)$,\1,;1q"
-
-if autoreconf --version | sed -e "$sedcmd1" -e "$sedcmd2" | egrep "$patb" >/dev/null && \
- autoconf --version | sed -e "$sedcmd1" -e "$sedcmd2" | egrep "$patb" >/dev/null && \
- autoheader --version | sed -e "$sedcmd1" -e "$sedcmd2" | egrep "$patb" >/dev/null; then
- autoreconf=autoreconf
- autoreconfoptions=
- autoconfversion=`autoconf --version | sed -e "$sedcmd1" -e "$sedcmd2"`
- echo "Using autoconf version $autoconfversion found in your path..."
- localdir=`pwd`
-
- # Determine if we need to patch autoreconf for 2.53
- case "$autoconfversion" in
- 2.52)
- echo "WARNING: autoconf 2.52 is known to generate buggy configure scripts!"
- ;;
- 2.53)
- echo "Patching autoreconf"
- # Walk the path to find autoreconf
- autoreconfpath=
- for i in `echo $PATH | sed -e 's/:/ /g'` ; do
- if test -r $i/autoreconf; then
- autoreconfpath=$i/autoreconf
- break
- fi
- done
- if test "x$autoreconfpath" = "x" ; then
- echo "Could not find autoreconf executable!!!"
- exit
- fi
-
- echo "About to patch $autoreconfpath to ..."
- TMPCMD=/tmp/autoreconf$$
- sed -e 's/push @ARGV, $_;/push @ARGV, catfile ($directory, $_);/' $autoreconfpath > $TMPCMD
- autoreconf="/bin/sh $TMPCMD"
- trap "rm $TMPCMD" 0
- ;;
- *)
- ;;
- esac
-
- # Determine the proper argument to autoreconf
- case "$autoconfversion" in
- 2.1*)
- localdirarg="-l"
- ;;
- 2.5[23])
- localdirarg="-l"
- ;;
- *)
- localdirarg="-I"
- ;;
- esac
-else
- echo "Couldn't find autoconf 2.52 or higher in your path."
- echo " "
- echo "Please install or add to your path and re-run ./util/reconf"
- exit 1
-fi
-
-if $verbose ; then
- echo $autoreconf $autoreconfoptions $localdirarg $localdir --verbose $force
-fi
-$autoreconf $autoreconfoptions $localdirarg $localdir --verbose $force || exit 1
-if test $? = 0 ; then
- if test ! -d include/autoconf.stmp ; then
- cp /dev/null include/autoconf.stmp
- fi
-fi
-find . -name autom4te.cache -print | xargs rm -rf
More information about the cvs-krb5
mailing list