mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
build: Use gnulib-tool with a module list.
* .gitmodules: New file. * gitsub.sh: New file, from gnulib/top/gitsub.sh. * autopull.sh: Use gitsub.sh to check out gnulib. * autogen.sh: Accept --skip-gnulib option. Invoke gnulib-tool, assuming a gnulib checkout is already present. * Makefile.devel (lib/aclocal.m4): Update reference to macros directory. * lib/configure.ac: Likewise. Invoke gl_EARLY, gl_INIT. * lib/Makefile.am (EXTRA_DIST, MOSTLYCLEANFILES): New variables. Include Makefile.gnulib.
This commit is contained in:
57
autogen.sh
57
autogen.sh
@@ -21,8 +21,61 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Prerequisite (if not used from a released tarball): ./autopull.sh
|
||||
# Usage: ./autogen.sh
|
||||
# Prerequisite (if not used from a released tarball): either
|
||||
# - the GNULIB_SRCDIR environment variable pointing to a gnulib checkout, or
|
||||
# - a preceding invocation of './autopull.sh'.
|
||||
#
|
||||
# Usage: ./autogen.sh [--skip-gnulib]
|
||||
#
|
||||
# Options:
|
||||
# --skip-gnulib Avoid fetching files from Gnulib.
|
||||
# This option is useful
|
||||
# - when you are working from a released tarball (possibly
|
||||
# with modifications), or
|
||||
# - as a speedup, if the set of gnulib modules did not
|
||||
# change since the last time you ran this script.
|
||||
|
||||
skip_gnulib=false
|
||||
while :; do
|
||||
case "$1" in
|
||||
--skip-gnulib) skip_gnulib=true; shift;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test $skip_gnulib = false; then
|
||||
|
||||
if test -n "$GNULIB_SRCDIR"; then
|
||||
test -d "$GNULIB_SRCDIR" || {
|
||||
echo "*** GNULIB_SRCDIR is set but does not point to an existing directory." 1>&2
|
||||
exit 1
|
||||
}
|
||||
else
|
||||
GNULIB_SRCDIR=`pwd`/gnulib
|
||||
test -d "$GNULIB_SRCDIR" || {
|
||||
echo "*** Subdirectory 'gnulib' does not yet exist. Use './gitsub.sh pull' to create it, or set the environment variable GNULIB_SRCDIR." 1>&2
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
# Now it should contain a gnulib-tool.
|
||||
GNULIB_TOOL="$GNULIB_SRCDIR/gnulib-tool"
|
||||
test -f "$GNULIB_TOOL" || {
|
||||
echo "*** gnulib-tool not found." 1>&2
|
||||
exit 1
|
||||
}
|
||||
GNULIB_MODULES='
|
||||
filename
|
||||
package-version
|
||||
'
|
||||
$GNULIB_TOOL --lib=libgp --source-base=lib --m4-base=lib/gnulib-m4 \
|
||||
--makefile-name=Makefile.gnulib \
|
||||
--import \
|
||||
$GNULIB_MODULES
|
||||
$GNULIB_TOOL --copy-file build-aux/install-sh; chmod a+x build-aux/install-sh
|
||||
$GNULIB_TOOL --copy-file build-aux/mkinstalldirs; chmod a+x build-aux/mkinstalldirs
|
||||
$GNULIB_TOOL --copy-file build-aux/compile; chmod a+x build-aux/compile
|
||||
$GNULIB_TOOL --copy-file build-aux/ar-lib; chmod a+x build-aux/ar-lib
|
||||
fi
|
||||
|
||||
make -f Makefile.devel totally-clean all || exit $?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user