diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-07-06 23:25:57 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-07-06 23:25:57 +0200 |
commit | 005de2e8273853e155c21767b1c8bdb4f3f3ca53 (patch) | |
tree | 1f215bb57b2bc61926e3d27357f7c43e993e73b9 /build-aux | |
parent | 32299e49e83b941082bee348c993630bb455a324 (diff) |
Update Gnulib to v0.0-7509-g98a2286.
* Makefile.am (EXTRA_DIST): Add `m4/gnulib-cache.m4'.
* build-aux/git-version-gen: Keep unchanged.
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/announce-gen | 54 | ||||
-rwxr-xr-x | build-aux/config.rpath | 2 | ||||
-rwxr-xr-x | build-aux/gitlog-to-changelog | 44 | ||||
-rwxr-xr-x | build-aux/gnu-web-doc-update | 89 | ||||
-rwxr-xr-x | build-aux/gnupload | 30 | ||||
-rw-r--r-- | build-aux/snippet/_Noreturn.h | 2 |
6 files changed, 152 insertions, 69 deletions
diff --git a/build-aux/announce-gen b/build-aux/announce-gen index 3ca90a9a0..ec7c22a28 100755 --- a/build-aux/announce-gen +++ b/build-aux/announce-gen @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' if 0; # Generate a release announcement message. -my $VERSION = '2012-01-06 07:46'; # UTC +my $VERSION = '2012-06-08 06:53'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -30,13 +30,15 @@ use strict; use Getopt::Long; use Digest::MD5; -use Digest::SHA1; +eval { require Digest::SHA; } + or eval 'use Digest::SHA1'; use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; my %valid_release_types = map {$_ => 1} qw (alpha beta stable); my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz'); +my $srcdir = '.'; sub usage ($) { @@ -51,7 +53,7 @@ sub usage ($) my @types = sort keys %valid_release_types; print $STREAM <<EOF; Usage: $ME [OPTIONS] -Generate an announcement message. +Generate an announcement message. Run this from builddir. OPTIONS: @@ -66,7 +68,9 @@ These options must be specified: The following are optional: - --news=NEWS_FILE + --news=NEWS_FILE include the NEWS section about this release + from this NEWS_FILE; accumulates. + --srcdir=DIR where to find the NEWS_FILEs (default: $srcdir) --bootstrap-tools=TOOL_LIST a comma-separated list of tools, e.g., autoconf,automake,bison,gnulib --gnulib-version=VERSION report VERSION as the gnulib version, where @@ -102,13 +106,13 @@ sub sizes (@) my %res; foreach my $f (@file) { - my $cmd = "du --human $f"; + my $cmd = "du -h $f"; my $t = `$cmd`; # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS $@ - and (warn "$ME: command failed: '$cmd'\n"), $fail = 1; + and (warn "command failed: '$cmd'\n"), $fail = 1; chomp $t; - $t =~ s/^([\d.]+[MkK]).*/${1}B/; + $t =~ s/^\s*([\d.]+[MkK]).*/${1}B/; $res{$f} = $t; } return $fail ? undef : %res; @@ -181,7 +185,7 @@ sub print_news_deltas ($$$) my ($news_file, $prev_version, $curr_version) = @_; my $news_name = $news_file; - $news_name =~ s|^\./||; + $news_name =~ s|^\Q$srcdir\E/||; print "\n$news_name\n\n"; @@ -310,7 +314,7 @@ sub print_changelog_deltas ($$) # The exit code should be 1. # Allow in case there are no modified ChangeLog entries. $? == 256 || $? == 128 - or warn "$ME: warning: '$cmd' had unexpected exit code or signal ($?)\n"; + or warn "warning: '$cmd' had unexpected exit code or signal ($?)\n"; } sub get_tool_versions ($$) @@ -340,7 +344,7 @@ sub get_tool_versions ($$) { defined $first_line and $first_line = ''; - warn "$ME: $t: unexpected --version output\n:$first_line"; + warn "$t: unexpected --version output\n:$first_line"; $fail = 1; } } @@ -368,6 +372,15 @@ sub get_tool_versions ($$) my $gnulib_version; my $print_checksums_p = 1; + # Reformat the warnings before displaying them. + local $SIG{__WARN__} = sub + { + my ($msg) = @_; + # Warnings from GetOptions. + $msg =~ s/Option (\w)/option --$1/; + warn "$ME: $msg"; + }; + GetOptions ( 'mail-headers=s' => \$mail_headers, @@ -378,6 +391,7 @@ sub get_tool_versions ($$) 'gpg-key-id=s' => \$gpg_key_id, 'url-directory=s' => \@url_dir_list, 'news=s' => \@news_file, + 'srcdir=s' => \$srcdir, 'bootstrap-tools=s' => \$bootstrap_tools, 'gnulib-version=s' => \$gnulib_version, 'print-checksums!' => \$print_checksums_p, @@ -388,32 +402,32 @@ sub get_tool_versions ($$) ) or usage 1; my $fail = 0; - # Ensure that sure each required option is specified. + # Ensure that each required option is specified. $release_type - or (warn "$ME: release type not specified\n"), $fail = 1; + or (warn "release type not specified\n"), $fail = 1; $package_name - or (warn "$ME: package name not specified\n"), $fail = 1; + or (warn "package name not specified\n"), $fail = 1; $prev_version - or (warn "$ME: previous version string not specified\n"), $fail = 1; + or (warn "previous version string not specified\n"), $fail = 1; $curr_version - or (warn "$ME: current version string not specified\n"), $fail = 1; + or (warn "current version string not specified\n"), $fail = 1; $gpg_key_id - or (warn "$ME: GnuPG key ID not specified\n"), $fail = 1; + or (warn "GnuPG key ID not specified\n"), $fail = 1; @url_dir_list - or (warn "$ME: URL directory name(s) not specified\n"), $fail = 1; + or (warn "URL directory name(s) not specified\n"), $fail = 1; my @tool_list = split ',', $bootstrap_tools; grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version - and (warn "$ME: when specifying gnulib as a tool, you must also specify\n" + and (warn "when specifying gnulib as a tool, you must also specify\n" . "--gnulib-version=V, where V is the result of running git describe\n" . "in the gnulib source directory.\n"), $fail = 1; exists $valid_release_types{$release_type} - or (warn "$ME: '$release_type': invalid release type\n"), $fail = 1; + or (warn "'$release_type': invalid release type\n"), $fail = 1; @ARGV - and (warn "$ME: too many arguments:\n", join ("\n", @ARGV), "\n"), + and (warn "too many arguments:\n", join ("\n", @ARGV), "\n"), $fail = 1; $fail and usage 1; diff --git a/build-aux/config.rpath b/build-aux/config.rpath index c0d31f92a..1a0701828 100755 --- a/build-aux/config.rpath +++ b/build-aux/config.rpath @@ -25,7 +25,7 @@ # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index 0efedb046..17c456271 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2012-01-06 07:14'; # UTC +my $VERSION = '2012-05-22 09:40'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -64,12 +64,19 @@ OPTIONS: makes a change to SHA1's commit log text or metadata. --append-dot append a dot to the first line of each commit message if there is no other punctuation or blank at the end. + --no-cluster never cluster commit messages under the same date/author + header; the default is to cluster adjacent commit messages + if their headers are the same and neither commit message + contains multiple paragraphs. --since=DATE convert only the logs since DATE; the default is to convert all log entries. --format=FMT set format string for commit subject and body; see 'man git-log' for the list of format metacharacters; the default is '%s%n%b%n' - + --strip-tab remove one additional leading TAB from commit message lines. + --strip-cherry-pick remove data inserted by "git cherry-pick"; + this includes the "cherry picked from commit ..." line, + and the possible final "Conflicts:" paragraph. --help display this help and exit --version output version information and exit @@ -190,6 +197,9 @@ sub parse_amend_file($) my $format_string = '%s%n%b%n'; my $amend_file; my $append_dot = 0; + my $cluster = 1; + my $strip_tab = 0; + my $strip_cherry_pick = 0; GetOptions ( help => sub { usage 0 }, @@ -198,6 +208,9 @@ sub parse_amend_file($) 'format=s' => \$format_string, 'amend=s' => \$amend_file, 'append-dot' => \$append_dot, + 'cluster!' => \$cluster, + 'strip-tab' => \$strip_tab, + 'strip-cherry-pick' => \$strip_cherry_pick, ) or usage 1; @@ -257,6 +270,13 @@ sub parse_amend_file($) $rest = $_; } + # Remove lines inserted by "git cherry-pick". + if ($strip_cherry_pick) + { + $rest =~ s/^\s*Conflicts:\n.*//sm; + $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; + } + my @line = split "\n", $rest; my $author_line = shift @line; defined $author_line @@ -302,13 +322,15 @@ sub parse_amend_file($) . substr ($_, 5) . "\n"; } - # If this header would be different from the previous date/name/email/ - # coauthors header, or if this or the previous entry consists of two - # or more paragraphs, then print the header. - if ($date_line ne $prev_date_line - or "@coauthors" ne "@prev_coauthors" - or $multi_paragraph - or $prev_multi_paragraph) + # If clustering of commit messages has been disabled, if this header + # would be different from the previous date/name/email/coauthors header, + # or if this or the previous entry consists of two or more paragraphs, + # then print the header. + if ( ! $cluster + || $date_line ne $prev_date_line + || "@coauthors" ne "@prev_coauthors" + || $multi_paragraph + || $prev_multi_paragraph) { $prev_date_line eq '' or print "\n"; @@ -339,6 +361,10 @@ sub parse_amend_file($) } } + # Remove one additional leading TAB from each line. + $strip_tab + and map { s/^\t// } @line; + # Prefix each non-empty line with a TAB. @line = map { length $_ ? "\t$_" : '' } @line; diff --git a/build-aux/gnu-web-doc-update b/build-aux/gnu-web-doc-update index 7a4304980..851f8b899 100755 --- a/build-aux/gnu-web-doc-update +++ b/build-aux/gnu-web-doc-update @@ -27,59 +27,80 @@ VERSION=2009-07-21.16; # UTC # Requirements: everything required to bootstrap your package, # plus these: git, cvs, cvsu, rsync, mktemp -ME=`basename "$0"` +ME=$(basename "$0") warn() { printf '%s: %s\n' "$ME" "$*" >&2; } die() { warn "$*"; exit 1; } -help_version() +help() { - case $1 in - --help) cat <<EOF + cat <<EOF Usage: $ME -Run this script (no options or arguments) after each non-alpha release, -to update the web documentation at http://www.gnu.org/software/\$pkg/manual/ -Run it from your project's the top-level directory. +Run this script from top_srcdir (no options or arguments) after each +non-alpha release, to update the web documentation at +http://www.gnu.org/software/\$pkg/manual/ Run it from your project's +the top-level directory. Options: - --help print this help, then exit - --version print version number, then exit + -C, --builddir=DIR location of (configured) Makefile (default: .) + --help print this help, then exit + --version print version number, then exit Report bugs and patches to <bug-gnulib@gnu.org>. EOF - exit ;; + exit +} - --version) - year=`echo "$VERSION" | sed 's/[^0-9].*//'` - cat <<EOF +version() +{ + year=$(echo "$VERSION" | sed 's/[^0-9].*//') + cat <<EOF $ME $VERSION Copyright (C) $year Free Software Foundation, Inc, License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. EOF - exit ;; + exit +} + +builddir=. +while test $# != 0 +do + # Handle --option=value by splitting apart and putting back on argv. + case $1 in + --*=*) + opt=$(echo "$1" | sed -e 's/=.*//') + val=$(echo "$1" | sed -e 's/[^=]*=//') + shift + set dummy "$opt" "$val" ${1+"$@"}; shift + ;; + esac - *) die "unrecognized option: $1";; + case $1 in + --help|--version) ${1#--};; + -C|--builddir) shift; builddir=$1; shift ;; + --*) die "unrecognized option: $1";; + *) break;; esac -} +done -case $# in - 0) ;; - 1) help_version $1 ;; - *) die "$ME: too many options" ;; -esac +test $# = 0 \ + || die "$ME: too many arguments" prev=.prev-version version=$(cat $prev) || die "$ME: no $prev file?" -pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' Makefile) || die "$ME: no Makefile?" +pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' $builddir/Makefile) \ + || die "$ME: no Makefile?" tmp_branch=web-doc-$version-$$ +current_branch=$(git branch | sed -ne '/^\* /{s///;p;q;}') cleanup() { - __st=$?; + __st=$? rm -rf "$tmp" - git checkout master + git checkout "$current_branch" + git submodule update --recursive git branch -d $tmp_branch exit $__st } @@ -89,15 +110,23 @@ trap 'exit $?' 1 2 13 15 # We must build using sources for which --version reports the # just-released version number, not some string like 7.6.18-20761. # That version string propagates into all documentation. +set -e git checkout -b $tmp_branch v$version -ok=0 -./bootstrap && ./configure && make && make web-manual && ok=1 -test $ok = 1 || exit 1 - -tmp=$(mktemp -d --tmpdir=. web-doc-update.XXXXXX) || exit 1 +git submodule update --recursive +./bootstrap +srcdir=$(pwd) +cd "$builddir" + ./config.status --recheck + ./config.status + make + make web-manual +cd "$srcdir" +set +e + +tmp=$(mktemp -d web-doc-update.XXXXXX) || exit 1 ( cd $tmp \ && cvs -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg ) -rsync -avP doc/manual/ $tmp/$pkg/manual +rsync -avP "$builddir"/doc/manual/ $tmp/$pkg/manual ( cd $tmp/$pkg/manual diff --git a/build-aux/gnupload b/build-aux/gnupload index eb450a0cd..a0e5c7b60 100755 --- a/build-aux/gnupload +++ b/build-aux/gnupload @@ -1,9 +1,9 @@ #!/bin/sh # Sign files and upload them. -scriptversion=2012-01-15.15; # UTC +scriptversion=2012-06-11.00; # UTC -# Copyright (C) 2004-2010, 2012 Free Software Foundation, Inc. +# Copyright (C) 2004-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 @@ -28,6 +28,7 @@ GPG='gpg --batch --no-tty' conffile=.gnuploadrc to= dry_run=false +replace= symlink_files= delete_files= delete_symlinks= @@ -53,8 +54,10 @@ Options: --to DEST specify one destination for FILES (multiple --to options are allowed) --user NAME sign with key NAME + --replace allow replacements of existing files --symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names --dry-run do nothing, show what would have been done + (including the constructed directive file) --version output version information and exit If --symlink-regex is given without EXPR, then the link target name @@ -146,6 +149,9 @@ while test -n "$1"; do --delete) collect_var=delete_files ;; + --replace) + replace="replace: true" + ;; --rmsymlink) collect_var=delete_symlinks ;; @@ -243,11 +249,13 @@ unset passphrase # listings with their arguments...). # Remember this script runs with 'set -e', so if echo is not built-in # it will exit now. -PATH=/empty echo -n "Enter GPG passphrase: " -stty -echo -read -r passphrase -stty echo -echo +if $dry_run; then :; else + PATH=/empty echo -n "Enter GPG passphrase: " + stty -echo + read -r passphrase + stty echo + echo +fi if test $# -ne 0; then for file @@ -270,7 +278,7 @@ filename: $3$stmt" fi cat >${2}.directive<<EOF -version: 1.1 +version: 1.2 directory: $1 comment: gnupload v. $scriptversion$stmt EOF @@ -393,6 +401,12 @@ do do echo "Uploading $file to $dest ..." stmt= + # + # allowing file replacement is all or nothing. + if test -n "$replace"; then stmt="$stmt +$replace" + fi + # files="$file $file.sig" destdir=`echo $dest | sed 's/[^:]*://'` if test -n "$symlink_expr"; then diff --git a/build-aux/snippet/_Noreturn.h b/build-aux/snippet/_Noreturn.h index 1a7b4daed..c44ad89b7 100644 --- a/build-aux/snippet/_Noreturn.h +++ b/build-aux/snippet/_Noreturn.h @@ -1,4 +1,4 @@ -#ifndef _Noreturn +#if !defined _Noreturn && __STDC_VERSION__ < 201112 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) |