summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2021-02-07 17:38:31 +0100
committerDaiki Ueno <ueno@gnu.org>2021-02-13 15:59:38 +0100
commitbedcdd218c6ec3fe4e42766f09cf5301befa34a0 (patch)
tree0824530cd44a2184e7769df547d61c7f9bea1b82
parent22671c71dce4aa072a5d9e27b268031f0642d5ce (diff)
downloadgnutls-bedcdd218c6ec3fe4e42766f09cf5301befa34a0.tar.gz
bootstrap.conf: refactor detection of gtk-doc and gnulib sockets
Signed-off-by: Daiki Ueno <ueno@gnu.org>
-rw-r--r--bootstrap.conf50
1 files changed, 19 insertions, 31 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 31eb7a33a6..0248acc813 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -53,53 +53,41 @@ autopoint -
autogen -
"
-GTKDOCIZE=$(which gtkdocize 2>/dev/null)
-if test $? -ne 0; then
- echo "No gtk-doc support found. You can't build the docs."
- # rm because gtk-doc.make might be a link to a protected file
- rm -f gtk-doc.make 2>/dev/null
- echo "EXTRA_DIST =" >gtk-doc.make
- echo "CLEANFILES =" >>gtk-doc.make
- GTKDOCIZE=""
-else
- $GTKDOCIZE
-fi
-
# update git submodules
git_options=
if test -n "$SUBMODULE_NOFETCH"; then
git_options="--no-fetch"
fi
-for mod in $required_submodules;do
- git submodule update --init $git_options $mod
+for mod in $required_submodules; do
+ git submodule update --init $git_options $mod
done
-if test -d ./gnulib;then
- TMP_GNULIB_SRCDIR="${GNULIB_SRCDIR:-./gnulib/}"
-
- deps=$(${TMP_GNULIB_SRCDIR}/gnulib-tool --extract-recursive-dependencies ${gnulib_modules})
- deps="echo -n ${deps} ${gnulib_modules}|sort -u"
- case ${deps} in
- *select*|*poll*|*sockets*|*recv*|*send*)
- echo "******************************************************************"
- die "the library cannot include the gnulib sockets; see CONTRIBUTION.md"
- ;;
- esac
+# This check needs to be done before actual import.
+TMP_GNULIB_SRCDIR="${GNULIB_SRCDIR:-gnulib}"
+if test -d "$TMP_GNULIB_SRCDIR"; then
+ if ${TMP_GNULIB_SRCDIR}/gnulib-tool --extract-recursive-dependencies ${gnulib_modules} | grep -E 'select|poll|sockets|recv|send' > /dev/null 2>&1; then
+ die "the library cannot include the gnulib sockets; see CONTRIBUTING.md"
+ fi
fi
bootstrap_post_import_hook ()
{
- # we re-use malloc-posix from the original gnulib
-# for i in ${unistring_modules}; do
-# sed -i 's/malloc-posix//g' ${GNULIB_SRCDIR}/modules/$i
-# done
-
${GNULIB_SRCDIR}/gnulib-tool --import --local-dir=lib/unistring/override --lib=libunistring --source-base=lib/unistring --m4-base=lib/unistring/m4 --doc-base=doc --aux-dir=build-aux --lgpl=3orGPLv2 --no-conditional-dependencies --libtool --without-tests --macro-prefix=unistring ${unistring_modules}
${GNULIB_SRCDIR}/gnulib-tool --import --local-dir=src/gl/override --lib=libgnu_gpl --source-base=src/gl --m4-base=src/gl/m4 --doc-base=doc --tests-base=src/gl/tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=ggl --with-tests --no-vc-files ${src_modules}
-# git -C ${GNULIB_SRCDIR} reset --hard
+ gtkdocize || {
+ echo "No gtk-doc support found. You can't build the docs."
+ # rm because gtk-doc.make might be a link to a protected file
+ rm -f gtk-doc.make
+ # Those need to be defined because the upstream Makefile boilerplate
+ # (doc/reference/Makefile.am) relies on them.
+ cat > gtk-doc.make <<EOF
+EXTRA_DIST =
+CLEANFILES =
+EOF
+ }
# Automake requires that ChangeLog exist.
touch ChangeLog || return 1