From: Daiki Ueno Date: Sun, 7 Feb 2021 16:38:31 +0000 (+0100) Subject: bootstrap.conf: refactor detection of gtk-doc and gnulib sockets X-Git-Tag: 3.7.1~14^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bedcdd218c6ec3fe4e42766f09cf5301befa34a0;p=thirdparty%2Fgnutls.git bootstrap.conf: refactor detection of gtk-doc and gnulib sockets Signed-off-by: Daiki Ueno --- 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 <