]> git.draconx.ca Git - upkg.git/commitdiff
Update bootstrapping bits.
authorNick Bowler <nbowler@draconx.ca>
Sun, 27 Feb 2022 01:48:54 +0000 (20:48 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sun, 27 Feb 2022 01:52:03 +0000 (20:52 -0500)
Sync the bootstrap script to include updates from other packages,
and pull in fix-gnulib and fix-ltdl updates from dxcommon.

Stub out the silly warning flags configure test found in the
latest gnulib.

.gitignore
bootstrap
common
configure.ac

index 15c133e6e3580bdcb245dfcfe0c3fa1c8d457fd7..4231653fa546c15c19a4f4374133a6698535ffe1 100644 (file)
@@ -1,29 +1,30 @@
-*.o
-*.lo
-*.la
 *.gobstamp
-Makefile
-Makefile.in
-.libs
+*.la
+*.lo
+*.o
 .deps
 .dirstamp
-/config.*
-/configure
+.libs
+/INSTALL
+/Makefile
+/Makefile.in
 /aclocal.m4
 /autom4te.cache
-/libtool
+/compile
+/config.*
+/configure
+/depcomp
+/exported.sh
+/install-sh
+/lib
 /libltdl
+/libtool
+/libuobject.pc
 /ltmain.sh
-/install-sh
-/depcomp
 /missing
 /mkinstalldirs
-/stamp-h1
-/compile
-/libuobject.pc
-/lib
 /snippet
-/upkg
-/test-suite.log
+/stamp-h1
 /test-driver
-/exported.sh
+/test-suite.log
+/upkg
index d7e5087db43f9784761cb01796a426534999d897..19efbbd7b94ab992a6224dc4eb30a0d4a16fe1b6 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright © 2011-2012, 2015 Nick Bowler
+# Copyright © 2011-2012, 2015, 2021-2022 Nick Bowler
 #
 # Simple script to get started from a fresh git checkout.
 #
 
 scriptname=$0
 
-err() {
-       printf '%s: %s\n' "$scriptname" "$@" 1>&2
-}
-
-die() {
-       err "$@"
-       exit 1
-}
+err() { printf '%s: %s\n' "$scriptname" "$*" 1>&2; }
+die() { err "$@"; exit 1; }
 
 : ${LIBTOOLIZE=libtoolize}
 : ${AUTORECONF=autoreconf}
+: ${AUTOMAKE=automake}
 : ${GNULIB=gnulib}
 : ${GIT=git}
 : ${PERL=perl}
@@ -28,13 +23,25 @@ die() {
 $GIT submodule update --init || err "Failed to update submodules from git."
 
 if test -x $GNULIB/gnulib-tool; then
-       $GNULIB/gnulib-tool --update -S || die "Failed to update Gnulib."
+  $GNULIB/gnulib-tool --update -S || die "Failed to update Gnulib."
 else
-       die "Gnulib sources are not properly installed in gnulib/."
+  err "Gnulib sources are not properly installed in $GNULIB/"
+  cat >&2 <<'EOF'
+
+To bootstrap this package using an external Gnulib, you can set the GNULIB
+environment variable to indicate the location of the Gnulib sources.
+EOF
+
+  test ! -f configure || cat >&2 <<'EOF'
+
+However, it seems this package is already bootstrapped.  It should not
+normally be necessary to run this script from a release tarball.
+EOF
+  exit 1
 fi
 
 $PERL common/scripts/fix-gnulib.pl -o lib/gnulib.mk -i lib/gnulib.mk.in \
-       || die "Failed to fixup Gnulib makefile fragment."
+  || die "Failed to fixup Gnulib makefile fragment."
 
 # Frustratingly, libtoolize has changed the name of its nonrecursive ltdl
 # makefile output, which broke all packages depending on previous documented
@@ -47,7 +54,18 @@ test ! -f libltdl/ltdl.mk || mv -f libltdl/ltdl.mk libltdl/ltdl.mk.in
 $PERL common/scripts/fix-ltdl.pl -o libltdl/ltdl.mk -i libltdl/ltdl.mk.in \
        || die "Failed to fixup libltdl makefile fragment."
 
+# Rewrite if ! ... construts produced by gnulib conditional dependencies
+# as these fail in heirloom-sh.
+sed 's/if ! *\(.*gnulib_enabled[^;]*\); then/if \1; then :; else/' \
+  m4/gnulib-comp.m4 >m4/gnulib-comp.m4.new || exit
+mv -f m4/gnulib-comp.m4.new m4/gnulib-comp.m4 || exit
+
 # Punt some automake-generated files so that Gentoo's wrapper script doesn't
 # try to detect the automake version in use.
 rm -f Makefile.in aclocal.m4
-LIBTOOLIZE=true $AUTORECONF -fis
+LIBTOOLIZE=true $AUTORECONF -fis || exit
+
+amdir=`$AUTOMAKE --print-libdir`
+if test -f "$amdir/INSTALL"; then
+  ln -sf "$amdir/INSTALL" INSTALL
+fi
diff --git a/common b/common
index 03a26752c80546ac8cf8fc81807bb5a153786599..a7cabb5d0f067e78afd029d8ec41d14660d8f9e2 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 03a26752c80546ac8cf8fc81807bb5a153786599
+Subproject commit a7cabb5d0f067e78afd029d8ec41d14660d8f9e2
index 762de2207ca7cbd7bb8fdf448725f386745df132..b5d8d3d2b17fc98fa80538cc03e5737772878003 100644 (file)
@@ -4,6 +4,9 @@ dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
 dnl This is free software: you are free to do what the fuck you want to.
 dnl There is NO WARRANTY, to the extent permitted by law.
 
+dnl remove pointless gnulib warning flag check
+AC_DEFUN([gl_CC_GNULIB_WARNINGS])
+
 AC_INIT([upkg],[0.1],[nbowler@draconx.ca])
 AC_CONFIG_SRCDIR([src/libupkg.c])
 AC_CONFIG_HEADERS([config.h])