diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-12-14 10:43:21 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-12-14 10:43:21 +0100 |
commit | de736a2222a4ffe7dfb82b60ba2fa10192548a31 (patch) | |
tree | 4ecc07aeb3c167ec021bc1a33ca603ef0ca3c628 | |
parent | d7a59576910338592410afd23bb726348fa59000 (diff) | |
parent | 33263a0fec525a7dfb0b0b0c0c21bb9d35b1d12f (diff) | |
download | automake-de736a2222a4ffe7dfb82b60ba2fa10192548a31.tar.gz |
Merge branch 'maint'
* maint:
docs: fixlet about xz compression levels and command line options
maint: more files excluded in 'update-copyright'
maint: adapt 'update-copyright' recipe to the new $(FETCHFILES) format
HACKING: update instructions to update the manuals at www.gnu.org
maint: add an explicative comment in Makefile
maint: factor out the name of the dir where web manuals are generated
maint: rename rules to build/upload web manuals
cosmetic: minor variable and rules reordering in Makefile.am
docs: build the web manuals for CVS in the builddir, not in the srcdir
release: automate uploading of web manuals in CVS
docs: AM_CFLAGS: remove reference to non-existing "more detailed" desc
tests: avoid two spurious failures on FreeBSD
tests: improve 'pkg-config' requirement
-rw-r--r-- | HACKING | 23 | ||||
-rw-r--r-- | Makefile.am | 128 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/automake.texi | 2 | ||||
-rwxr-xr-x | gen-testsuite-part | 5 | ||||
-rw-r--r-- | t/ax/am-test-lib.sh | 14 | ||||
-rw-r--r-- | t/list-of-tests.mk | 3 | ||||
-rwxr-xr-x | t/pkg-config-macros.sh | 94 | ||||
-rwxr-xr-x | t/vala-headers.sh | 2 | ||||
-rwxr-xr-x | t/vala-libs.sh | 2 | ||||
-rwxr-xr-x | t/vala-non-recursive-setup.sh | 2 | ||||
-rwxr-xr-x | t/vala-per-target-flags.sh | 2 | ||||
-rwxr-xr-x | t/vala-recursive-setup.sh | 2 |
13 files changed, 227 insertions, 54 deletions
@@ -258,10 +258,25 @@ locations. In case you need to sign with a non-default key, you can use "make GNUPLOADFLAGS='--user KEY' git-upload-release". -* For stable releases, update the manuals at www.gnu.org: - - Generate manuals, running "make web-manuals". - - Copy manuals recursively to web CVS. - - Commit in CVS. +* For stable releases you'll have to update the manuals at www.gnu.org. + + - Generate manuals (with the help of the standard gendocs.sh script): + + make web-manual + + The ready-to-be-uploaded manuals (in several formats) will be left + in the 'doc/web-manuals' directory. + + - Commit the updated manuals to web CVS: + + make web-manual-update + + If your local username is different from your username at Savannah, + you'll have to override the 'CVS_USER' make variable accordingly; + for example: + + make web-manual-update CVS_USER=slattarini + - Check for link errors, fix them, recheck until convergence: <http://validator.w3.org/checklink> diff --git a/Makefile.am b/Makefile.am index 8e762b197..f3eb432d7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -999,38 +999,81 @@ fetch: $(AM_V_at)rm -rf Fetchdir .PHONY: fetch -## --------------------------------------------------------------------- ## -## Generate manuals in several formats, for upload on the GNU website. ## -## --------------------------------------------------------------------- ## - -# The gendocs.sh script sadly leaves TeX and Texinfo auxiliary files -# in the directory where it's invoked. -clean_texinfo_clutter_cmd = \ - $(am__cd) doc && rm -f *.ac *.aux *.cm *.cp *.cps *.fn *.fns *.ky \ - *.log *.op *.pg *.toc *.tp *.tr *.vr *.vrs - -clean-web-manuals: - $(AM_V_at)rm -rf doc/web-manuals -clean-texinfo-clutter: - $(AM_V_at)$(clean_texinfo_clutter_cmd) -clean-local: clean-web-manuals clean-texinfo-clutter -.PHONY: clean-web-manuals clean-texinfo-clutter - -web-manuals: - $(AM_V_at)rm -rf doc/web-manuals - $(AM_V_GEN): \ -## The gendocs.sh script only works from the srcdir, sadly. - && $(am__cd) $(srcdir)/doc \ - && GENDOCS_TEMPLATE_DIR=../lib \ +## ---------------------------------------------------------------------- ## +## Generate and upload manuals in several formats, for the GNU website. ## +## ---------------------------------------------------------------------- ## + +web_manual_dir = doc/web-manual + +RSYNC = rsync +CVS = cvs +CVSU = cvsu +CVS_USER = $${USER} +WEBCVS_ROOT = cvs.savannah.gnu.org:/web + +web-manual: + $(AM_V_at)rm -rf $(web_manual_dir) + $(AM_V_GEN)tmp=$@.dir \ + && rm -rf $$tmp \ + && mkdir $$tmp \ + && $(am__cd) $$tmp \ + && GENDOCS_TEMPLATE_DIR='$(abs_srcdir)/lib' \ && export GENDOCS_TEMPLATE_DIR \ +## Needed to pacify extra checks from gendocs.sh. + && $(LN_S) '$(abs_srcdir)/doc/$(PACKAGE).texi' . \ ## Try to respect silent rules. && if $(AM_V_P); then :; else exec >/dev/null 2>&1; fi \ ## Finally generate the manual in several formats. - && $(SHELL) ../lib/gendocs.sh -o web-manuals \ - --email $(PACKAGE_BUGREPORT) $(PACKAGE) '$(PACKAGE_NAME)' - $(AM_V_at)$(clean_texinfo_clutter_cmd) - $(AM_V_at)if $(AM_V_P); then ls -l doc/web-manuals; else :; fi -.PHONY: web-manuals + && $(SHELL) '$(abs_srcdir)/lib/gendocs.sh' \ + -I '$(abs_srcdir)/doc' --email $(PACKAGE_BUGREPORT) \ + $(PACKAGE) '$(PACKAGE_NAME)' + $(AM_V_at)tmp=$@.dir \ + && mkdir $(web_manual_dir) \ + && mv -f $$tmp/manual/* $(web_manual_dir) \ + && rm -rf $$tmp \ + && { ! $(AM_V_P) || ls -l $(web_manual_dir); } +.PHONY: web-manual + +web-manual-update: + $(AM_V_at)fatal () { echo "$@: $$*" >&2; exit 1; }; \ + $(determine_release_type); \ + case $$release_type in \ + [Mm]ajor\ release|[Mm]inor\ release);; \ + *) echo "Cannot upload manuals from a \"$$release_type\"" >&2; \ + exit 1;; \ + esac + $(AM_V_at)test -f $(web_manual_dir)/$(PACKAGE).html || { \ + echo 'You have to run "$(MAKE) web-manuals" before' \ + 'invoking "$(MAKE) $@"' >&2; \ + exit 1; \ + } + $(AM_V_GEN): \ + && CVS_RSH=ssh && export CVS_RSH=ssh \ + && tmp=$@.dir \ + && rm -rf $$tmp \ + && mkdir $$tmp \ + && $(am__cd) $$tmp \ + && $(CVS) -z3 -d :ext:$(CVS_USER)@$(WEBCVS_ROOT)/$(PACKAGE) \ + co $(PACKAGE) \ + && cd .. \ +## According to the rsync manpage, "a trailing slash on the source [...] +## avoids creating an additional directory level at the destination". +## So the trailing '/' after '$(web_manual_dir)' below is intended. + && $(RSYNC) -avP $(web_manual_dir)/ $$tmp/$(PACKAGE)/manual \ + && ( \ + cd $$tmp/$(PACKAGE)/manual \ + && new_files=`$(CVSU) --types='?'` \ + && new_files=`echo "$$new_files" | sed s/^..//` \ + && { test -z "$$new_files" || $(CVS) add -ko $$new_files; } \ + && $(CVS) ci -m $(VERSION) \ + ) \ + && rm -rf $$tmp +.PHONY: web-manual-update + +clean-web-manual: + $(AM_V_at)rm -rf $(web_manual_dir) +.PHONY: clean-web-manual +clean-local: clean-web-manual EXTRA_DIST += lib/gendocs.sh lib/gendocs_template @@ -1044,6 +1087,26 @@ update_copyright_env = \ UPDATE_COPYRIGHT_FORCE=1 \ UPDATE_COPYRIGHT_USE_INTERVALS=2 +# In addition to the several README files, these as well are +# not expected to have a copyright notice. +files_without_copyright = \ + .autom4te.cfg \ + .git-log-fix \ + .gitattributes \ + .gitignore \ + INSTALL \ + COPYING \ + AUTHORS \ + THANKS \ + lib/INSTALL \ + lib/COPYING + +# This script is in the public domain. +files_without_copyright += lib/mkinstalldirs + +# This script has an MIT-style license +files_without_copyright += lib/install-sh + .PHONY: update-copyright update-copyright: $(AM_V_GEN)set -e; \ @@ -1051,9 +1114,12 @@ update-copyright: || { echo "$@: cannot get current year" >&2; exit 1; }; \ sed -i "/^RELEASE_YEAR=/s/=.*$$/=$$current_year/" \ bootstrap.sh configure.ac; \ - excluded_re=`echo $(FETCHFILES) \ - | sed -e 's|^.*/|lib/|' -e 's| | lib/|g' -e 's, ,|,g'`; \ + excluded_re=`( \ + for url in $(FETCHFILES); do echo "$$url"; done \ + | sed -e 's!^.*/!!' -e 's!^.*=!!' -e 's!^!lib/!' \ + && for f in $(files_without_copyright); do echo $$f; done \ + ) | sed -e '$$!s,$$,|,' | tr -d '\012\015'`; \ $(GIT) ls-files \ - | grep -Ev '^(lib/)?(COPYING|INSTALL)$$' \ + | grep -Ev '(^|/)README$$' \ | grep -Ev "^($$excluded_re)$$" \ | $(update_copyright_env) xargs $(srcdir)/lib/$@ diff --git a/configure.ac b/configure.ac index de218daa9..033fa2688 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,8 @@ AC_SUBST([system_acdir], ["\${datadir}/aclocal"]) ACLOCAL="\"`pwd`/t/wrap/aclocal-$APIVERSION\"" AUTOMAKE="\"`pwd`/t/wrap/automake-$APIVERSION\"" +AC_PROG_LN_S + AC_PATH_PROG([PERL], [perl]) if test -z "$PERL"; then AC_MSG_ERROR([perl not found]) diff --git a/doc/automake.texi b/doc/automake.texi index 1c96940f3..d2e3b3897 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -8681,7 +8681,7 @@ By default, this rule makes @samp{xz} use a compression option of @option{-e}. To make it use a different one, set the @env{XZ_OPT} environment variable. For example, run this command to use the default compression ratio, but with a progress indicator: -@samp{make dist-xz XZ_OPT=-7e}. +@samp{make dist-xz XZ_OPT=-ve}. @trindex dist-xz @item @code{dist-zip} diff --git a/gen-testsuite-part b/gen-testsuite-part index 59fbf05a5..6bd8e15ae 100755 --- a/gen-testsuite-part +++ b/gen-testsuite-part @@ -154,6 +154,11 @@ my %deps_extractor = line_matcher => qr/^\s*required=.*\bgettext/, nodist_prereqs => "$testdir/gettext-macros.log", }, + pkgconfig_macros => + { + line_matcher => qr/^\s*required=.*\bpkg-config/, + nodist_prereqs => "$testdir/pkg-config-macros.log", + }, use_trivial_test_driver => { line_matcher => qr/\btrivial-test-driver\b/, diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh index 6d7c69b04..ba2101220 100644 --- a/t/ax/am-test-lib.sh +++ b/t/ax/am-test-lib.sh @@ -787,14 +787,14 @@ process_requirements () for am_tool in $*; do require_tool $am_tool done + # We might need extra m4 macros, e.g., for Libtool or Gettext. + for am_tool in gettext libtool pkg-config; do + case " $required " in + # The lack of whitespace after $am_tool is intended. + *" $am_tool"*) . ./t/$am_tool-macros.dir/get.sh;; + esac + done am_tool=; unset am_tool - # We might need extra macros, e.g., from Libtool or Gettext. - case " $required " in - *\ libtool*) . ./t/libtool-macros.dir/get.sh;; - esac - case " $required " in - *\ gettext*) . ./t/gettext-macros.dir/get.sh;; - esac } ## ---------------------------------------------------------------- ## diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 3f48e514c..5ee31d09b 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -1273,7 +1273,8 @@ t/yflags-force-conditional.sh \ t/yflags-force-override.sh \ t/yflags-var-expand.sh \ t/libtool-macros.sh \ -t/gettext-macros.sh +t/gettext-macros.sh \ +t/pkg-config-macros.sh print-list-of-tests: @echo $(handwritten_TESTS) diff --git a/t/pkg-config-macros.sh b/t/pkg-config-macros.sh new file mode 100755 index 000000000..06a65e35e --- /dev/null +++ b/t/pkg-config-macros.sh @@ -0,0 +1,94 @@ +#! /bin/sh +# Copyright (C) 2012 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 2, 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 <http://www.gnu.org/licenses/>. + +# Try to find the pkg-config '.m4' files and make them easily accessed +# to the test cases requiring them. + +. ./defs || exit 1 + +echo "# Automatically generated by $me." > get.sh +echo : >> get.sh + +if ver=$(pkg-config --version) && test -n "$ver"; then + echo "printf 'pkg-config version: %s\\n' '$ver'" >> get.sh +else + echo "skip_all_ \"'pkg-config' not available\"" >> get.sh +fi + +cat > configure.ac <<'END' +AC_INIT([pkg], [1.0]) +PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4]) +END + +have_pkg_config_macros () +{ + $AUTOCONF && ! $FGREP PKG_CHECK_MODULES configure +} + +if have_pkg_config_macros; then + # The pkg-config macros are already available, nothing to do. + exit 0 +fi + +# Usual locations where pkg.m4 *might* be installed. +XT_ACLOCAL_PATH=/usr/local/share/aclocal:/usr/share/aclocal + +# Find the location of the pkg-config executable. +oIFS=$IFS dir= +for d in $PATH; do + IFS=$oIFS + if test -f $dir/pkg-config || test -f $dir/pkg-config.exe; then + dir=$d + break + fi +done +IFS=$oIFS + +# Now try to use the location of the pkg-config executable to guess +# where the corresponding pkg.m4 might be installed. +if test -n "$dir"; then + # Only support standard installation layouts. + XT_ACLOCAL_PATH=${dir%/bin}/share/alocal:$XT_ACLOCAL_PATH +fi + +XT_ACLOCAL_PATH=$XT_ACLOCAL_PATH${ACLOCAL_PATH+":$ACLOCAL_PATH"} + +# Try once again to fetch the pkg-config macros. +mkdir m4 +ACLOCAL_PATH=$XT_ACLOCAL_PATH $ACLOCAL --install -I m4 +if test -f m4/pkg.m4 && have_pkg_config_macros; then + echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh + echo "export ACLOCAL_PATH" >> get.sh + echo "sed 20q '$(pwd)/m4/pkg.m4' # For debugging." >> get.sh +else + echo "skip_all_ \"pkg-config m4 macros not found\"" >> get.sh +fi + +ACLOCAL_PATH=; unset ACLOCAL_PATH +. ./get.sh + +$ACLOCAL --force -I m4 || cat >> get.sh <<'END' +# We need to use '-Wno-syntax', since we do not want our test suite +# to fail merely because some third-party '.m4' file is underquoted. +ACLOCAL="$ACLOCAL -Wno-syntax" +END + +# The pkg-config m4 file(s) we might fetched will be copied in the +# 'm4' subdirectory of the test directory are going to be needed by +# other tests, so we must not remove the test directory. +keep_testdirs=yes + +: diff --git a/t/vala-headers.sh b/t/vala-headers.sh index 79a7b27c8..9d2f95fd1 100755 --- a/t/vala-headers.sh +++ b/t/vala-headers.sh @@ -62,8 +62,6 @@ $ACLOCAL $AUTOCONF $AUTOMAKE -a -grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found" - ./configure $MAKE diff --git a/t/vala-libs.sh b/t/vala-libs.sh index 852051b0d..87394483d 100755 --- a/t/vala-libs.sh +++ b/t/vala-libs.sh @@ -49,8 +49,6 @@ $ACLOCAL $AUTOCONF $AUTOMAKE -a -grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found" - ./configure cat > mu2.c << 'END' diff --git a/t/vala-non-recursive-setup.sh b/t/vala-non-recursive-setup.sh index 96135d34e..67c7920b2 100755 --- a/t/vala-non-recursive-setup.sh +++ b/t/vala-non-recursive-setup.sh @@ -50,8 +50,6 @@ $ACLOCAL $AUTOCONF $AUTOMAKE -a -grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found" - ./configure $MAKE test -f src/zardoz.c diff --git a/t/vala-per-target-flags.sh b/t/vala-per-target-flags.sh index 5eae28185..f73b58772 100755 --- a/t/vala-per-target-flags.sh +++ b/t/vala-per-target-flags.sh @@ -68,8 +68,6 @@ $ACLOCAL $AUTOCONF $AUTOMAKE -a -grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found" - ./configure $MAKE diff --git a/t/vala-recursive-setup.sh b/t/vala-recursive-setup.sh index 2543c78e9..a0cc43892 100755 --- a/t/vala-recursive-setup.sh +++ b/t/vala-recursive-setup.sh @@ -56,8 +56,6 @@ $ACLOCAL $AUTOCONF $AUTOMAKE -a -grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found" - ./configure $MAKE |