From: Nick Bowler Date: Sun, 27 Feb 2022 01:48:54 +0000 (-0500) Subject: Update bootstrapping bits. X-Git-Url: http://git.draconx.ca/gitweb/upkg.git/commitdiff_plain/18cf0058df91c5c0338c202b222ee3c5ea3fce75 Update bootstrapping bits. 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. --- diff --git a/.gitignore b/.gitignore index 15c133e..4231653 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/bootstrap b/bootstrap index d7e5087..19efbbd 100755 --- 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. # @@ -10,17 +10,12 @@ 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 03a2675..a7cabb5 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 03a26752c80546ac8cf8fc81807bb5a153786599 +Subproject commit a7cabb5d0f067e78afd029d8ec41d14660d8f9e2 diff --git a/configure.ac b/configure.ac index 762de22..b5d8d3d 100644 --- a/configure.ac +++ b/configure.ac @@ -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])