autogen.sh (new file): add script for running the GNU autotools in the
authorPeter Maydell <pmaydell@chiark.greenend.org.uk>
Tue, 12 Aug 2008 18:04:29 +0000 (18:04 +0000)
committerPeter Maydell <pmaydell@chiark.greenend.org.uk>
Tue, 12 Aug 2008 18:04:29 +0000 (18:04 +0000)
right order. Mention and use new script in the appropriate places.

ChangeLog
INSTALL
autogen.sh [new file with mode: 0755]
docs/README.developers
test/setup-test

index 0b0c883..1016132 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-08-12  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * autogen.sh (new file): add script for running the GNU
+       autotools in the right order
+       * INSTALL: mention that you need to run autogen.sh if you
+       got nmh from CVS
+       * docs/README.developers: mention autogen.sh rather than
+       suggesting running autoheader and autoconf by hand.
+       * test/setup-test: run autotools via autogen.sh
+
 2008-08-08  Eric Gillespie  <epg@pretzelnet.org>
 
        * sbr/discard.c, sbr/m_getfld.c, uip/scansbr.c: Add support for
 2008-08-08  Eric Gillespie  <epg@pretzelnet.org>
 
        * sbr/discard.c, sbr/m_getfld.c, uip/scansbr.c: Add support for
diff --git a/INSTALL b/INSTALL
index a331387..e93a1b4 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -14,6 +14,14 @@ You should check the MACHINES file to see if there are any specific
 build instructions for your operating system.  To build nmh, you will
 need an ANSI C compiler such as gcc.
 
 build instructions for your operating system.  To build nmh, you will
 need an ANSI C compiler such as gcc.
 
+0) If you have obtained nmh by checking it out of CVS, you will
+   need to run the GNU autotools to regenerate some files.
+   (If your directory already contains a file 'config.h.in'
+   then this has already been done and you do not need to do it.)
+   You can regenerate the files by running the command
+
+   ./autogen.sh
+
 1) From the top-level source directory, run the command
 
    ./configure [options]
 1) From the top-level source directory, run the command
 
    ./configure [options]
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..29a02b9
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Regenerate config.h.in, configure, etc.
+# Necessary if building from CVS; not needed if
+# building from a distributed tarball.
+
+set -e
+autoheader
+autoconf
+date > stamp-h.in
index a85f37d..23a1d2d 100644 (file)
@@ -28,12 +28,10 @@ view of the developers (and the autoconf script).
 
 Note that the automatically generated autoconf files (such as config.h.in,
 stamp-h.in, and configure), are NOT kept in CVS.  Thus, when you check out
 
 Note that the automatically generated autoconf files (such as config.h.in,
 stamp-h.in, and configure), are NOT kept in CVS.  Thus, when you check out
-a CVS tree, you need to do the following things before you can build
+a CVS tree, you need to run the autogen.sh script before you can build
 anything:
 
 anything:
 
-       % autoheader
-       % autoconf
-       % date > stamp-h.in
+       % ./autogen.sh
 
 -------------------
 directory structure
 
 -------------------
 directory structure
index 2636a5d..00ad57a 100755 (executable)
@@ -6,7 +6,7 @@ TEMPDIR=`mktemp -d /tmp/nmh-test-XXXXXXXX`
 echo $TEMPDIR > test-temp-dir
 
 cd ..
 echo $TEMPDIR > test-temp-dir
 
 cd ..
-autoheader && autoconf && date > stamp-h.in
+./autogen.sh
 ./configure --prefix=$TEMPDIR --with-locking=fcntl --enable-debug
 make clean
 make install
 ./configure --prefix=$TEMPDIR --with-locking=fcntl --enable-debug
 make clean
 make install