diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Admin/release-steps | 3 | ||||
-rw-r--r-- | HACKING | 4 | ||||
-rwxr-xr-x | autogen.sh | 415 | ||||
-rwxr-xr-x | autopull.sh | 417 | ||||
-rw-r--r-- | libtextstyle/.gitignore | 4 | ||||
-rw-r--r-- | libtextstyle/HACKING | 6 | ||||
-rwxr-xr-x | libtextstyle/autogen.sh | 107 | ||||
-rwxr-xr-x | libtextstyle/autopull.sh | 107 | ||||
-rw-r--r-- | libtextstyle/m4/init-package-version.m4 | 6 |
10 files changed, 549 insertions, 524 deletions
diff --git a/.gitignore b/.gitignore index ca05bb1f9..4d3bbb6c4 100644 --- a/.gitignore +++ b/.gitignore @@ -341,9 +341,11 @@ /build-aux/test-driver /build-aux/ylwrap -# Other files brought in by autogen.sh: +# Other files brought in by autopull.sh: /build-aux/config.guess /build-aux/config.sub + +# Other files brought in by autogen.sh: # Dummy ChangeLogs: /ChangeLog /gettext-runtime/ChangeLog diff --git a/Admin/release-steps b/Admin/release-steps index 4497731a2..e0efb5409 100644 --- a/Admin/release-steps +++ b/Admin/release-steps @@ -19,6 +19,7 @@ We assume that the following environment variables are set: # Forcing a specific version number, without having to set a git tag. echo $CURRENT_VERSION > .tarball-version + ./autopull.sh ./autogen.sh ./configure make @@ -292,7 +293,7 @@ We assume that the following environment variables are set: ** Upload autopoint archive to alpha.gnu.org: This is needed to compile git master after the release (as - autogen.sh fetches the archive). + autopull.sh fetches the archive). xz -c -e < gettext-tools/misc/archive.dir.tar > archive.dir-$CURRENT_VERSION.tar.xz gnulib/build-aux/gnupload \ @@ -350,12 +350,12 @@ https://savannah.gnu.org/git/?group=gettext . After fetching the sources from the Git repository, peek at the comments in autogen.sh, then run - ./gitsub.sh pull + ./autopull.sh ./autogen.sh Then you can proceed with "./configure" as usual. Each time you want to update the source, do not only "git pull". Instead do - git pull && ./gitsub.sh pull + git pull && ./autopull.sh ./autogen.sh diff --git a/autogen.sh b/autogen.sh index c3a7ef9e4..b83cb929f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2003-2021 Free Software Foundation, Inc. +# Copyright (C) 2003-2022 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,416 +20,13 @@ # This script requires: # - Autoconf # - Automake >= 1.13 -# - Wget -# - XZ Utils -# If not used from a released tarball, it also requires either -# - the GNULIB_SRCDIR environment variable pointing to a gnulib checkout, or -# - a preceding invocation of './gitsub.sh pull'. -# -# In addition, it fetches the archive.dir.tar.gz file, which contains -# data files used by the autopoint program. If you already have the -# file, place it under gettext-tools/misc, before running this script. -# -# Usage: ./autogen.sh [--skip-gnulib] + +# Prerequisite (if not used from a released tarball): ./autopull.sh +# Usage: ./autogen.sh # Nuisances. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -skip_gnulib=false -skip_gnulib_option= - -while :; do - case "$1" in - --skip-gnulib) skip_gnulib=true; skip_gnulib_option='--skip-gnulib'; shift;; - *) break ;; - esac -done - -# The tests in gettext-tools/tests are not meant to be executable, because -# they have a TESTS_ENVIRONMENT that specifies the shell explicitly. - -if ! $skip_gnulib; 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 - } - # In gettext-runtime: - GNULIB_MODULES_RUNTIME_FOR_SRC=' - atexit - attribute - basename-lgpl - binary-io - closeout - error - getopt-gnu - gettext-h - havelib - memmove - noreturn - progname - propername - relocatable-prog - setlocale - sigpipe - stdbool - stdio - stdlib - strtoul - unistd - unlocked-io - xalloc - ' - GNULIB_MODULES_RUNTIME_OTHER=' - gettext-runtime-misc - ansi-c++-opt - csharpcomp-script - java - javacomp-script - ' - $GNULIB_TOOL --dir=gettext-runtime --lib=libgrt --source-base=gnulib-lib --m4-base=gnulib-m4 --no-libtool --local-dir=gnulib-local --local-symlink \ - --import $GNULIB_MODULES_RUNTIME_FOR_SRC $GNULIB_MODULES_RUNTIME_OTHER || exit $? - # In gettext-runtime/intl: - GNULIB_MODULES_LIBINTL=' - gettext-runtime-intl-misc - attribute - bison - filename - havelib - lib-symbol-visibility - localcharset - localename - lock - relocatable-lib-lgpl - tsearch - vasnprintf - ' - GNULIB_SETLOCALE_DEPENDENCIES=`$GNULIB_TOOL --extract-dependencies setlocale | sed -e 's/ .*//'` - $GNULIB_TOOL --dir=gettext-runtime/intl --source-base=gnulib-lib --m4-base=gnulib-m4 --lgpl=2 --libtool --local-dir=gnulib-local --local-symlink \ - --import $GNULIB_MODULES_LIBINTL $GNULIB_SETLOCALE_DEPENDENCIES || exit $? - # In gettext-runtime/libasprintf: - GNULIB_MODULES_LIBASPRINTF=' - alloca - vasnprintf - ' - $GNULIB_TOOL --dir=gettext-runtime/libasprintf --source-base=gnulib-lib --m4-base=gnulib-m4 --lgpl=2 --libtool --local-dir=gnulib-local --local-symlink \ - --import $GNULIB_MODULES_LIBASPRINTF || exit $? - # In gettext-tools: - GNULIB_MODULES_TOOLS_FOR_SRC=' - alloca-opt - atexit - attribute - backupfile - basename-lgpl - binary-io - bison - bison-i18n - byteswap - c-ctype - c-strcase - c-strcasestr - c-strstr - clean-temp - closedir - closeout - configmake - copy-file - csharpcomp - csharpexec - error - error-progname - execute - filename - findprog - fnmatch - fopen - free-posix - fstrcmp - full-write - fwriteerror - gcd - getline - getopt-gnu - gettext - gettext-h - iconv - javacomp - javaexec - libunistring-optional - libxml - localcharset - locale - localename - localtime - lock - mem-hash-map - memchr - memmove - memset - minmax - mkdir - noreturn - obstack - open - opendir - openmp-init - pipe-filter-ii - progname - propername - read-file - readdir - relocatable-prog - relocatable-script - setlocale - sh-filename - sh-quote - sigpipe - sigprocmask - spawn-pipe - stdbool - stdio - stdlib - stpcpy - stpncpy - strchrnul - strcspn - strdup-posix - strerror - strpbrk - strtol - strtoul - supersede - sys_select - sys_stat - sys_time - trim - unictype/ctype-space - unictype/syntax-java-whitespace - unilbrk/ulc-width-linebreaks - uniname/uniname - unistd - unistr/u8-check - unistr/u8-mbtouc - unistr/u8-mbtoucr - unistr/u8-uctomb - unistr/u16-mbtouc - uniwidth/width - unlocked-io - unsetenv - vasprintf - wait-process - write - xalloc - xconcat-filename - xerror - xmalloca - xmemdup0 - xsetenv - xstriconv - xstriconveh - xvasprintf - ' - # Common dependencies of GNULIB_MODULES_TOOLS_FOR_SRC and GNULIB_MODULES_TOOLS_FOR_LIBGREP. - GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES=' - alloca-opt - extensions - gettext-h - include_next - locale - localcharset - malloc-posix - mbrtowc - mbsinit - multiarch - setlocale-null - snippet/arg-nonnull - snippet/c++defs - snippet/warn-on-use - ssize_t - stdbool - stddef - stdint - stdlib - streq - unistd - verify - wchar - wctype-h - windows-mutex - windows-once - windows-recmutex - windows-rwlock - ' - GNULIB_MODULES_TOOLS_OTHER=' - gettext-tools-misc - ansi-c++-opt - csharpcomp-script - csharpexec-script - java - javacomp-script - javaexec-script - stdint - ' - GNULIB_MODULES_TOOLS_LIBUNISTRING_TESTS=' - unilbrk/u8-possible-linebreaks-tests - unilbrk/ulc-width-linebreaks-tests - unistr/u8-mbtouc-tests - unistr/u8-mbtouc-unsafe-tests - uniwidth/width-tests - ' - $GNULIB_TOOL --dir=gettext-tools --lib=libgettextlib --source-base=gnulib-lib --m4-base=gnulib-m4 --tests-base=gnulib-tests --makefile-name=Makefile.gnulib --libtool --with-tests --local-dir=gnulib-local --local-symlink \ - --import \ - --avoid=fdutimensat-tests --avoid=futimens-tests --avoid=utime-tests --avoid=utimens-tests --avoid=utimensat-tests \ - --avoid=array-list-tests --avoid=linked-list-tests --avoid=linkedhash-list-tests \ - `for m in $GNULIB_MODULES_TOOLS_LIBUNISTRING_TESTS; do echo --avoid=$m; done` \ - $GNULIB_MODULES_TOOLS_FOR_SRC $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES $GNULIB_MODULES_TOOLS_OTHER || exit $? - $GNULIB_TOOL --copy-file m4/libtextstyle.m4 gettext-tools/gnulib-m4/libtextstyle.m4 || exit $? - # In gettext-tools/libgrep: - GNULIB_MODULES_TOOLS_FOR_LIBGREP=' - mbrlen - regex - ' - $GNULIB_TOOL --dir=gettext-tools --macro-prefix=grgl --lib=libgrep --source-base=libgrep --m4-base=libgrep/gnulib-m4 --witness-c-macro=IN_GETTEXT_TOOLS_LIBGREP --makefile-name=Makefile.gnulib --local-dir=gnulib-local --local-symlink \ - --import \ - `for m in $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES; do \ - if test \`$GNULIB_TOOL --extract-applicability $m\` != all; then \ - case $m in \ - locale | stdbool | stddef | stdint | stdlib | unistd | wchar | wctype-h) ;; \ - *) echo --avoid=$m ;; \ - esac; \ - fi; \ - done` \ - $GNULIB_MODULES_TOOLS_FOR_LIBGREP || exit $? - # In gettext-tools/libgettextpo: - # This is a subset of the GNULIB_MODULES_TOOLS_FOR_SRC. - GNULIB_MODULES_LIBGETTEXTPO=' - attribute - basename-lgpl - close - c-ctype - c-strcase - c-strstr - error - error-progname - filename - fopen - free-posix - fstrcmp - fwriteerror - gcd - getline - gettext-h - iconv - libtextstyle-dummy - libunistring-optional - markup - mem-hash-map - minmax - open - relocatable-lib - sigpipe - stdbool - stdio - stdlib - stpcpy - stpncpy - strchrnul - strdup-posix - strerror - unictype/ctype-space - unilbrk/ulc-width-linebreaks - unistr/u8-mbtouc - unistr/u8-mbtoucr - unistr/u8-uctomb - unistr/u16-mbtouc - uniwidth/width - unlocked-io - vasprintf - xalloc - xconcat-filename - xmalloca - xerror - xstriconv - xvasprintf - ' - # Module 'fdopen' is enabled in gettext-tools/config.status, because - # it occurs as dependency of some module ('supersede') in - # GNULIB_MODULES_TOOLS_FOR_SRC. Therefore on mingw, libgettextpo/stdio.h - # contains '#define fdopen rpl_fdopen'. Therefore we need to include - # fdopen.lo in libgettextpo.la. - # Module 'realloc-posix' is enabled in gettext-tools/config.status, because - # it occurs as dependency of some module ('read-file') in - # GNULIB_MODULES_TOOLS_FOR_SRC. Therefore on mingw, libgettextpo/stdlib.h - # contains '#define realloc rpl_realloc'. Therefore we need to include - # realloc.lo in libgettextpo.la. - GNULIB_MODULES_LIBGETTEXTPO_OTHER=' - fdopen - realloc-posix - ' - $GNULIB_TOOL --dir=gettext-tools --source-base=libgettextpo --m4-base=libgettextpo/gnulib-m4 --macro-prefix=gtpo --makefile-name=Makefile.gnulib --libtool --local-dir=gnulib-local --local-symlink \ - --import --avoid=progname $GNULIB_MODULES_LIBGETTEXTPO $GNULIB_MODULES_LIBGETTEXTPO_OTHER || exit $? - # Overwrite older versions of .m4 files with the up-to-date version. - cp gettext-runtime/m4/gettext.m4 gettext-tools/gnulib-m4/gettext.m4 - # Import build tools. We use --copy-file to avoid directory creation. - $GNULIB_TOOL --copy-file tests/init.sh gettext-tools || exit $? - $GNULIB_TOOL --copy-file build-aux/x-to-1.in gettext-runtime/man/x-to-1.in || exit $? - $GNULIB_TOOL --copy-file build-aux/x-to-1.in gettext-tools/man/x-to-1.in || exit $? - $GNULIB_TOOL --copy-file build-aux/git-version-gen || exit $? - $GNULIB_TOOL --copy-file build-aux/gitlog-to-changelog || exit $? - $GNULIB_TOOL --copy-file build-aux/update-copyright || exit $? - $GNULIB_TOOL --copy-file build-aux/useless-if-before-free || exit $? - $GNULIB_TOOL --copy-file build-aux/vc-list-files || exit $? - $GNULIB_TOOL --copy-file top/GNUmakefile . || exit $? - $GNULIB_TOOL --copy-file top/maint.mk . || exit $? -fi - -# Fetch config.guess, config.sub. -if test -n "$GNULIB_TOOL"; then - for file in config.guess config.sub; do - $GNULIB_TOOL --copy-file build-aux/$file && chmod a+x build-aux/$file || exit $? - done -else - for file in config.guess config.sub; do - echo "$0: getting $file..." - wget -q --timeout=5 -O build-aux/$file.tmp "https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/${file};hb=HEAD" \ - && mv build-aux/$file.tmp build-aux/$file \ - && chmod a+x build-aux/$file - retval=$? - rm -f build-aux/$file.tmp - test $retval -eq 0 || exit $retval - done -fi - -# Fetch gettext-tools/misc/archive.dir.tar. -if ! test -f gettext-tools/misc/archive.dir.tar; then - if ! test -f gettext-tools/misc/archive.dir.tar.xz; then - echo "$0: getting gettext-tools/misc/archive.dir.tar..." - wget -q --timeout=5 -O gettext-tools/misc/archive.dir.tar.xz-t "https://alpha.gnu.org/gnu/gettext/archive.dir-latest.tar.xz" \ - && mv gettext-tools/misc/archive.dir.tar.xz-t gettext-tools/misc/archive.dir.tar.xz - retval=$? - rm -f gettext-tools/misc/archive.dir.tar.xz-t - test $retval -eq 0 || exit $retval - fi - xz -d -c < gettext-tools/misc/archive.dir.tar.xz > gettext-tools/misc/archive.dir.tar-t \ - && mv gettext-tools/misc/archive.dir.tar-t gettext-tools/misc/archive.dir.tar - retval=$? - rm -f gettext-tools/misc/archive.dir.tar-t - test $retval -eq 0 || exit $retval -fi - # Make sure we get new versions of files brought in by automake. (cd build-aux && rm -f ar-lib compile depcomp install-sh mdate-sh missing test-driver ylwrap) @@ -474,9 +71,7 @@ cd "$dir0" echo "$0: generating files in libtextstyle..." cd libtextstyle -(if ! $skip_gnulib; then export GNULIB_SRCDIR; fi - ./autogen.sh $skip_gnulib_option -) || exit $? +./autogen.sh || exit $? cd "$dir0" echo "$0: generating configure in gettext-tools/examples..." diff --git a/autopull.sh b/autopull.sh new file mode 100755 index 000000000..ce47e5980 --- /dev/null +++ b/autopull.sh @@ -0,0 +1,417 @@ +#!/bin/sh +# Copyright (C) 2003-2022 Free Software Foundation, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +# Convenience script for fetching auxiliary files that are omitted from +# the version control repository of this package. +# +# This script requires: +# - Wget +# - XZ Utils +# This script can make use of +# - the GNULIB_SRCDIR environment variable pointing to a gnulib checkout. +# +# In addition, it fetches the archive.dir.tar.gz file, which contains +# data files used by the autopoint program. If you already have the +# file, place it under gettext-tools/misc, before running this script. + +# Usage: ./autopull.sh + +# Nuisances. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +./gitsub.sh pull + +# The tests in gettext-tools/tests are not meant to be executable, because +# they have a TESTS_ENVIRONMENT that specifies the shell explicitly. + +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 +} +# In gettext-runtime: +GNULIB_MODULES_RUNTIME_FOR_SRC=' + atexit + attribute + basename-lgpl + binary-io + closeout + error + getopt-gnu + gettext-h + havelib + memmove + noreturn + progname + propername + relocatable-prog + setlocale + sigpipe + stdbool + stdio + stdlib + strtoul + unistd + unlocked-io + xalloc +' +GNULIB_MODULES_RUNTIME_OTHER=' + gettext-runtime-misc + ansi-c++-opt + csharpcomp-script + java + javacomp-script +' +$GNULIB_TOOL --dir=gettext-runtime --lib=libgrt --source-base=gnulib-lib --m4-base=gnulib-m4 --no-libtool --local-dir=gnulib-local --local-symlink \ + --import $GNULIB_MODULES_RUNTIME_FOR_SRC $GNULIB_MODULES_RUNTIME_OTHER || exit $? +# In gettext-runtime/intl: +GNULIB_MODULES_LIBINTL=' + gettext-runtime-intl-misc + attribute + bison + filename + havelib + lib-symbol-visibility + localcharset + localename + lock + relocatable-lib-lgpl + tsearch + vasnprintf +' +GNULIB_SETLOCALE_DEPENDENCIES=`$GNULIB_TOOL --extract-dependencies setlocale | sed -e 's/ .*//'` +$GNULIB_TOOL --dir=gettext-runtime/intl --source-base=gnulib-lib --m4-base=gnulib-m4 --lgpl=2 --libtool --local-dir=gnulib-local --local-symlink \ + --import $GNULIB_MODULES_LIBINTL $GNULIB_SETLOCALE_DEPENDENCIES || exit $? +# In gettext-runtime/libasprintf: +GNULIB_MODULES_LIBASPRINTF=' + alloca + vasnprintf +' +$GNULIB_TOOL --dir=gettext-runtime/libasprintf --source-base=gnulib-lib --m4-base=gnulib-m4 --lgpl=2 --libtool --local-dir=gnulib-local --local-symlink \ + --import $GNULIB_MODULES_LIBASPRINTF || exit $? +# In gettext-tools: +GNULIB_MODULES_TOOLS_FOR_SRC=' + alloca-opt + atexit + attribute + backupfile + basename-lgpl + binary-io + bison + bison-i18n + byteswap + c-ctype + c-strcase + c-strcasestr + c-strstr + clean-temp + closedir + closeout + configmake + copy-file + csharpcomp + csharpexec + error + error-progname + execute + filename + findprog + fnmatch + fopen + free-posix + fstrcmp + full-write + fwriteerror + gcd + getline + getopt-gnu + gettext + gettext-h + iconv + javacomp + javaexec + libunistring-optional + libxml + localcharset + locale + localename + localtime + lock + mem-hash-map + memchr + memmove + memset + minmax + mkdir + noreturn + obstack + open + opendir + openmp-init + pipe-filter-ii + progname + propername + read-file + readdir + relocatable-prog + relocatable-script + setlocale + sh-filename + sh-quote + sigpipe + sigprocmask + spawn-pipe + stdbool + stdio + stdlib + stpcpy + stpncpy + strchrnul + strcspn + strdup-posix + strerror + strpbrk + strtol + strtoul + supersede + sys_select + sys_stat + sys_time + trim + unictype/ctype-space + unictype/syntax-java-whitespace + unilbrk/ulc-width-linebreaks + uniname/uniname + unistd + unistr/u8-check + unistr/u8-mbtouc + unistr/u8-mbtoucr + unistr/u8-uctomb + unistr/u16-mbtouc + uniwidth/width + unlocked-io + unsetenv + vasprintf + wait-process + write + xalloc + xconcat-filename + xerror + xmalloca + xmemdup0 + xsetenv + xstriconv + xstriconveh + xvasprintf +' +# Common dependencies of GNULIB_MODULES_TOOLS_FOR_SRC and GNULIB_MODULES_TOOLS_FOR_LIBGREP. +GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES=' + alloca-opt + extensions + gettext-h + include_next + locale + localcharset + malloc-posix + mbrtowc + mbsinit + multiarch + setlocale-null + snippet/arg-nonnull + snippet/c++defs + snippet/warn-on-use + ssize_t + stdbool + stddef + stdint + stdlib + streq + unistd + verify + wchar + wctype-h + windows-mutex + windows-once + windows-recmutex + windows-rwlock +' +GNULIB_MODULES_TOOLS_OTHER=' + gettext-tools-misc + ansi-c++-opt + csharpcomp-script + csharpexec-script + java + javacomp-script + javaexec-script + stdint +' +GNULIB_MODULES_TOOLS_LIBUNISTRING_TESTS=' + unilbrk/u8-possible-linebreaks-tests + unilbrk/ulc-width-linebreaks-tests + unistr/u8-mbtouc-tests + unistr/u8-mbtouc-unsafe-tests + uniwidth/width-tests +' +$GNULIB_TOOL --dir=gettext-tools --lib=libgettextlib --source-base=gnulib-lib --m4-base=gnulib-m4 --tests-base=gnulib-tests --makefile-name=Makefile.gnulib --libtool --with-tests --local-dir=gnulib-local --local-symlink \ + --import \ + --avoid=fdutimensat-tests --avoid=futimens-tests --avoid=utime-tests --avoid=utimens-tests --avoid=utimensat-tests \ + --avoid=array-list-tests --avoid=linked-list-tests --avoid=linkedhash-list-tests \ + `for m in $GNULIB_MODULES_TOOLS_LIBUNISTRING_TESTS; do echo --avoid=$m; done` \ + $GNULIB_MODULES_TOOLS_FOR_SRC $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES $GNULIB_MODULES_TOOLS_OTHER || exit $? +$GNULIB_TOOL --copy-file m4/libtextstyle.m4 gettext-tools/gnulib-m4/libtextstyle.m4 || exit $? +# In gettext-tools/libgrep: +GNULIB_MODULES_TOOLS_FOR_LIBGREP=' + mbrlen + regex +' +$GNULIB_TOOL --dir=gettext-tools --macro-prefix=grgl --lib=libgrep --source-base=libgrep --m4-base=libgrep/gnulib-m4 --witness-c-macro=IN_GETTEXT_TOOLS_LIBGREP --makefile-name=Makefile.gnulib --local-dir=gnulib-local --local-symlink \ + --import \ + `for m in $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES; do \ + if test \`$GNULIB_TOOL --extract-applicability $m\` != all; then \ + case $m in \ + locale | stdbool | stddef | stdint | stdlib | unistd | wchar | wctype-h) ;; \ + *) echo --avoid=$m ;; \ + esac; \ + fi; \ + done` \ + $GNULIB_MODULES_TOOLS_FOR_LIBGREP || exit $? +# In gettext-tools/libgettextpo: +# This is a subset of the GNULIB_MODULES_TOOLS_FOR_SRC. +GNULIB_MODULES_LIBGETTEXTPO=' + attribute + basename-lgpl + close + c-ctype + c-strcase + c-strstr + error + error-progname + filename + fopen + free-posix + fstrcmp + fwriteerror + gcd + getline + gettext-h + iconv + libtextstyle-dummy + libunistring-optional + markup + mem-hash-map + minmax + open + relocatable-lib + sigpipe + stdbool + stdio + stdlib + stpcpy + stpncpy + strchrnul + strdup-posix + strerror + unictype/ctype-space + unilbrk/ulc-width-linebreaks + unistr/u8-mbtouc + unistr/u8-mbtoucr + unistr/u8-uctomb + unistr/u16-mbtouc + uniwidth/width + unlocked-io + vasprintf + xalloc + xconcat-filename + xmalloca + xerror + xstriconv + xvasprintf +' +# Module 'fdopen' is enabled in gettext-tools/config.status, because +# it occurs as dependency of some module ('supersede') in +# GNULIB_MODULES_TOOLS_FOR_SRC. Therefore on mingw, libgettextpo/stdio.h +# contains '#define fdopen rpl_fdopen'. Therefore we need to include +# fdopen.lo in libgettextpo.la. +# Module 'realloc-posix' is enabled in gettext-tools/config.status, because +# it occurs as dependency of some module ('read-file') in +# GNULIB_MODULES_TOOLS_FOR_SRC. Therefore on mingw, libgettextpo/stdlib.h +# contains '#define realloc rpl_realloc'. Therefore we need to include +# realloc.lo in libgettextpo.la. +GNULIB_MODULES_LIBGETTEXTPO_OTHER=' + fdopen + realloc-posix +' +$GNULIB_TOOL --dir=gettext-tools --source-base=libgettextpo --m4-base=libgettextpo/gnulib-m4 --macro-prefix=gtpo --makefile-name=Makefile.gnulib --libtool --local-dir=gnulib-local --local-symlink \ + --import --avoid=progname $GNULIB_MODULES_LIBGETTEXTPO $GNULIB_MODULES_LIBGETTEXTPO_OTHER || exit $? +# Overwrite older versions of .m4 files with the up-to-date version. +cp gettext-runtime/m4/gettext.m4 gettext-tools/gnulib-m4/gettext.m4 +# Import build tools. We use --copy-file to avoid directory creation. +$GNULIB_TOOL --copy-file tests/init.sh gettext-tools || exit $? +$GNULIB_TOOL --copy-file build-aux/x-to-1.in gettext-runtime/man/x-to-1.in || exit $? +$GNULIB_TOOL --copy-file build-aux/x-to-1.in gettext-tools/man/x-to-1.in || exit $? +$GNULIB_TOOL --copy-file build-aux/git-version-gen || exit $? +$GNULIB_TOOL --copy-file build-aux/gitlog-to-changelog || exit $? +$GNULIB_TOOL --copy-file build-aux/update-copyright || exit $? +$GNULIB_TOOL --copy-file build-aux/useless-if-before-free || exit $? +$GNULIB_TOOL --copy-file build-aux/vc-list-files || exit $? +$GNULIB_TOOL --copy-file top/GNUmakefile . || exit $? +$GNULIB_TOOL --copy-file top/maint.mk . || exit $? + +# Fetch config.guess, config.sub. +for file in config.guess config.sub; do + $GNULIB_TOOL --copy-file build-aux/$file && chmod a+x build-aux/$file || exit $? +done + +# Fetch gettext-tools/misc/archive.dir.tar. +if ! test -f gettext-tools/misc/archive.dir.tar; then + if ! test -f gettext-tools/misc/archive.dir.tar.xz; then + echo "$0: getting gettext-tools/misc/archive.dir.tar..." + wget -q --timeout=5 -O gettext-tools/misc/archive.dir.tar.xz-t "https://alpha.gnu.org/gnu/gettext/archive.dir-latest.tar.xz" \ + && mv gettext-tools/misc/archive.dir.tar.xz-t gettext-tools/misc/archive.dir.tar.xz + retval=$? + rm -f gettext-tools/misc/archive.dir.tar.xz-t + test $retval -eq 0 || exit $retval + fi + xz -d -c < gettext-tools/misc/archive.dir.tar.xz > gettext-tools/misc/archive.dir.tar-t \ + && mv gettext-tools/misc/archive.dir.tar-t gettext-tools/misc/archive.dir.tar + retval=$? + rm -f gettext-tools/misc/archive.dir.tar-t + test $retval -eq 0 || exit $retval +fi + +dir0=`pwd` + +echo "$0: generating files in libtextstyle..." +cd libtextstyle +(export GNULIB_SRCDIR + ./autopull.sh $skip_gnulib_option +) || exit $? +cd "$dir0" + +echo "$0: done. Now you can run './autogen.sh'." diff --git a/libtextstyle/.gitignore b/libtextstyle/.gitignore index 6d1b9cf40..781f75910 100644 --- a/libtextstyle/.gitignore +++ b/libtextstyle/.gitignore @@ -261,7 +261,7 @@ /build-aux/missing /build-aux/test-driver -# Other files brought in by autogen.sh: +# Other files brought in by autopull.sh: /INSTALL.windows /build-aux/config.guess /build-aux/config.sub @@ -280,6 +280,8 @@ /m4/ltversion.m4 /m4/lt~obsolete.m4 /m4/woe32-dll.m4 + +# Other files brought in by autogen.sh: # Dummy ChangeLogs: /ChangeLog diff --git a/libtextstyle/HACKING b/libtextstyle/HACKING index bb966faac..76b6fb71b 100644 --- a/libtextstyle/HACKING +++ b/libtextstyle/HACKING @@ -93,8 +93,10 @@ Access to the git repository is described at https://savannah.gnu.org/git/?group=gettext After fetching the sources from the repository, go into the 'libtextstyle' -directory, peek at the comments in autogen.sh, then run "./autogen.sh"; -then you can proceed with "./configure" as usual. +directory, peek at the comments in autogen.sh, then run + ./autopull.sh + ./autogen.sh +Then you can proceed with "./configure" as usual. Submitting patches diff --git a/libtextstyle/autogen.sh b/libtextstyle/autogen.sh index 620875195..2a6c5863e 100755 --- a/libtextstyle/autogen.sh +++ b/libtextstyle/autogen.sh @@ -5,10 +5,8 @@ # with new versions of autoconf or automake. # # This script requires autoconf-2.64..2.71 and automake-1.11..1.16 in the PATH. -# If not used from a released tarball, it also requires -# - the GNULIB_SRCDIR environment variable pointing to a gnulib checkout. -# Copyright (C) 2003-2021 Free Software Foundation, Inc. +# Copyright (C) 2003-2022 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,107 +21,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. -# Usage: ./autogen.sh [--skip-gnulib] -# -# Usage from a git checkout: ./autogen.sh -# This uses an up-to-date gnulib checkout. -# -# Usage from a released tarball: ./autogen.sh --skip-gnulib -# This does not use a gnulib checkout. - -skip_gnulib=false -while :; do - case "$1" in - --skip-gnulib) skip_gnulib=true; shift;; - *) break ;; - esac -done - -TEXINFO_VERSION=6.5 - -if test $skip_gnulib = false; then - mkdir -p build-aux - # texinfo.tex - # The most recent snapshot of it is available in the gnulib repository. - # But this is a snapshot, with all possible dangers. - # A stable release of it is available through "automake --add-missing --copy", - # but that depends on the Automake version. So take the version which matches - # the latest stable texinfo release. - if test ! -f build-aux/texinfo.tex; then - { wget -q --timeout=5 -O build-aux/texinfo.tex.tmp 'https://git.savannah.gnu.org/gitweb/?p=texinfo.git;a=blob_plain;f=doc/texinfo.tex;hb=refs/tags/texinfo-'"$TEXINFO_VERSION" \ - && mv build-aux/texinfo.tex.tmp build-aux/texinfo.tex; \ - } || rm -f build-aux/texinfo.tex.tmp - fi - - 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=' - ostream - fd-ostream - file-ostream - html-ostream - iconv-ostream - memory-ostream - term-ostream - styled-ostream - html-styled-ostream - noop-styled-ostream - term-styled-ostream - attribute - filename - isatty - largefile - vasprintf-posix - xalloc - xconcat-filename - - memory-ostream-tests - term-ostream-tests - ' - $GNULIB_TOOL --lib=libtextstyle --source-base=lib --m4-base=gnulib-m4 --tests-base=tests \ - --macro-prefix=lts \ - --makefile-name=Makefile.gnulib --libtool \ - --local-dir=gnulib-local --local-dir=../gnulib-local \ - --import $GNULIB_MODULES - $GNULIB_TOOL --copy-file build-aux/config.guess; chmod a+x build-aux/config.guess - $GNULIB_TOOL --copy-file build-aux/config.sub; chmod a+x build-aux/config.sub - $GNULIB_TOOL --copy-file build-aux/declared.sh lib/declared.sh; chmod a+x lib/declared.sh - $GNULIB_TOOL --copy-file build-aux/run-test; chmod a+x build-aux/run-test - $GNULIB_TOOL --copy-file build-aux/test-driver.diff - # If we got no texinfo.tex so far, take the snapshot from gnulib. - if test ! -f build-aux/texinfo.tex; then - $GNULIB_TOOL --copy-file build-aux/texinfo.tex - fi - # For use by the example programs. - $GNULIB_TOOL --copy-file m4/libtextstyle.m4 -fi - -# Copy some files from gettext. -cp -p ../INSTALL.windows . -mkdir -p m4 -cp -p ../m4/libtool.m4 m4/ -cp -p ../m4/lt*.m4 m4/ -cp -p ../m4/woe32-dll.m4 m4/ -cp -p ../build-aux/ltmain.sh build-aux/ -cp -p ../build-aux/texi2html build-aux/ -cp -p ../gettext-tools/m4/exported.m4 m4/ -cp -p ../gettext-tools/libgettextpo/exported.sh.in lib/ +# Prerequisite (if not used from a released tarball): ./autopull.sh +# Usage: ./autogen.sh aclocal -I m4 -I gnulib-m4 autoconf diff --git a/libtextstyle/autopull.sh b/libtextstyle/autopull.sh new file mode 100755 index 000000000..aebf3330f --- /dev/null +++ b/libtextstyle/autopull.sh @@ -0,0 +1,107 @@ +#!/bin/sh +# Convenience script for fetching auxiliary files that are omitted from +# the version control repository of this package. +# +# This script requires +# - the GNULIB_SRCDIR environment variable pointing to a gnulib checkout. + +# Copyright (C) 2003-2022 Free Software Foundation, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +# Usage: ./autopull.sh + +TEXINFO_VERSION=6.5 + +mkdir -p build-aux +# texinfo.tex +# The most recent snapshot of it is available in the gnulib repository. +# But this is a snapshot, with all possible dangers. +# A stable release of it is available through "automake --add-missing --copy", +# but that depends on the Automake version. So take the version which matches +# the latest stable texinfo release. +if test ! -f build-aux/texinfo.tex; then + { wget -q --timeout=5 -O build-aux/texinfo.tex.tmp 'https://git.savannah.gnu.org/gitweb/?p=texinfo.git;a=blob_plain;f=doc/texinfo.tex;hb=refs/tags/texinfo-'"$TEXINFO_VERSION" \ + && mv build-aux/texinfo.tex.tmp build-aux/texinfo.tex; \ + } || rm -f build-aux/texinfo.tex.tmp +fi + +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=' + ostream + fd-ostream + file-ostream + html-ostream + iconv-ostream + memory-ostream + term-ostream + styled-ostream + html-styled-ostream + noop-styled-ostream + term-styled-ostream + attribute + filename + isatty + largefile + vasprintf-posix + xalloc + xconcat-filename + + memory-ostream-tests + term-ostream-tests +' +$GNULIB_TOOL --lib=libtextstyle --source-base=lib --m4-base=gnulib-m4 --tests-base=tests \ + --macro-prefix=lts \ + --makefile-name=Makefile.gnulib --libtool \ + --local-dir=gnulib-local --local-dir=../gnulib-local \ + --import $GNULIB_MODULES +$GNULIB_TOOL --copy-file build-aux/config.guess; chmod a+x build-aux/config.guess +$GNULIB_TOOL --copy-file build-aux/config.sub; chmod a+x build-aux/config.sub +$GNULIB_TOOL --copy-file build-aux/declared.sh lib/declared.sh; chmod a+x lib/declared.sh +$GNULIB_TOOL --copy-file build-aux/run-test; chmod a+x build-aux/run-test +$GNULIB_TOOL --copy-file build-aux/test-driver.diff +# If we got no texinfo.tex so far, take the snapshot from gnulib. +if test ! -f build-aux/texinfo.tex; then + $GNULIB_TOOL --copy-file build-aux/texinfo.tex +fi +# For use by the example programs. +$GNULIB_TOOL --copy-file m4/libtextstyle.m4 + +# Copy some files from gettext. +cp -p ../INSTALL.windows . +mkdir -p m4 +cp -p ../m4/libtool.m4 m4/ +cp -p ../m4/lt*.m4 m4/ +cp -p ../m4/woe32-dll.m4 m4/ +cp -p ../build-aux/ltmain.sh build-aux/ +cp -p ../build-aux/texi2html build-aux/ +cp -p ../gettext-tools/m4/exported.m4 m4/ +cp -p ../gettext-tools/libgettextpo/exported.sh.in lib/ diff --git a/libtextstyle/m4/init-package-version.m4 b/libtextstyle/m4/init-package-version.m4 index 823afc6f7..f9916aa26 100644 --- a/libtextstyle/m4/init-package-version.m4 +++ b/libtextstyle/m4/init-package-version.m4 @@ -1,5 +1,5 @@ -# init-package-version.m4 serial 3 -dnl Copyright (C) 1992-2021 Free Software Foundation, Inc. +# init-package-version.m4 serial 4 +dnl Copyright (C) 1992-2022 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program @@ -79,7 +79,7 @@ dnl the same distribution terms as the rest of that program. # configure file: # # make distclean -# ./autogen.sh --skip-gnulib +# ./autogen.sh # ./configure # make # |