Commit 1493a381 authored by Philip Withnall's avatar Philip Withnall

build: Update autogen.sh from GNOME template

https://wiki.gnome.org/Projects/GnomeCommon/Migration#autogen.sh
parent bc620c0d
#!/bin/sh #!/bin/sh
set -e # Run this to generate all the initial makefiles, etc.
test -n "$srcdir" || srcdir=$(dirname "$0")
test -d m4 || mkdir m4 test -n "$srcdir" || srcdir=.
gtkdocize || exit 1
olddir=$(pwd)
autoreconf -fi
cd $srcdir
# Honor NOCONFIGURE for compatibility with gnome-autogen.sh
if test x"$NOCONFIGURE" = x; then (test -f configure.ac) || {
run_configure=true echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
for arg in $*; do exit 1
case $arg in }
--no-configure)
run_configure=false # shellcheck disable=SC2016
;; PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
*)
;; if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
esac echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
done echo "*** If you wish to pass any to it, please specify them on the" >&2
else echo "*** '$0' command line." >&2
run_configure=false echo "" >&2
fi fi
if test $run_configure = true; then aclocal --install || exit 1
./configure "$@" gtkdocize --copy || exit 1
autoreconf --verbose --force --install || exit 1
cd "$olddir"
if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure "$@" || exit 1
if [ "$1" = "--help" ]; then exit 0 else
echo "Now type 'make' to compile $PKG_NAME" || exit 1
fi
else
echo "Skipping configure process."
fi fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment