1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-16 01:22:18 +03:00
Commit Graph

47 Commits

Author SHA1 Message Date
Paul Eggert
e89646ad6f maint: time stamp -> timestamp
Use the spelling "timestamp", as that is what POSIX uses.
2017-01-09 11:58:08 -08:00
Paul Eggert
a3fd683de3 version-etc: new year
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
2017-01-01 02:59:23 +00:00
Paul Eggert
de37a1ca04 git-version-gen: avoid undefined shift
Problem reported by Mosè Giordano in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-05/msg00012.html
* build-aux/git-version-gen: Avoid undefined behavior if invoked
with --prefix or --fallback but without a later argument.  While
we're at it, omit unnecessary quotes.
2016-05-08 11:39:20 -07:00
Paul Eggert
6118065a2b Port Universal Time settings to strict POSIX
* build-aux/announce-gen, build-aux/bootstrap:
* build-aux/do-release-commit-and-tag, build-aux/git-version-gen:
* build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update:
* build-aux/gnupload, build-aux/mkinstalldirs:
* build-aux/move-if-change, build-aux/prefix-gnulib-mk:
* build-aux/update-copyright, build-aux/useless-if-before-free:
* build-aux/vc-list-files, tests/test-strftime.c:
Use TZ="UTC0", not TZ="UTC".  Either works on GNU platforms,
but POSIX says the behavior of TZ="UTC" is undefined.
2016-01-12 09:30:15 -08:00
Paul Eggert
71090a2a31 version-etc: new year
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
2016-01-01 00:57:21 -08:00
Mats Erik Andersson
6c4ac1b665 git-version-gen: revert "detect untagged revisions"
Revert commit bedd7833 as it breaks `make dist` in Inetutils
at least, due to the interdependencies with top/GNUMakefile,
which depend on the tag prefixes.  This results in `make dist`
inducing a new call to autoconf where a simple tar-ball build
would be expected.
2015-04-14 21:33:27 +01:00
Mats Erik Andersson
bedd7833ac git-version-gen: detect untagged revisions
* build-aux/git-version-gen: If fallback string is empty,
but git is available, use "git describe --always" to extract
a revision, and prefix it with "g".  This is much better than
responding "UNKNOWN" and it applies to shallow clones!
2015-04-14 11:39:11 +01:00
Paul Eggert
b9bfe78424 version-etc: new year
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
2014-12-31 17:47:54 -08:00
KO Myung-Hun
e5a15adc6d git-version-gen: do not print new line characters
On platforms with CRLF endings (such as OS/2), use of 'echo' may
leave behind an unwanted CR.

* build-aux/git-version-gen: Use printf instead of echo and tr.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-12-02 12:38:14 -07:00
Alfred M. Szmidt
fdf9a5de25 git-version-gen: improve option descriptions
* build-aux/git-version-gen: Mention that --prefix and --fallback
have a mandatory argument.
2014-06-20 01:37:05 +01:00
Eric Blake
1276a2c5f2 maint: update copyright
I ran 'make update-copyright'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-01 00:07:10 -07:00
Eric Blake
9fc81090f6 maint: update all copyright year number ranges
Run "make update-copyright".  Compare to commit 1602f0a from last year.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-01-01 00:50:58 +00:00
Eric Blake
d4d4aa2ee0 git-version-gen: avoid test -z portability glitch
Autoconf warns that there are some broken shells where 'test -z "$x"'
gives 0 exit status if $x is ')'.  Since some of our strings come
from command-line arguments, and since git-version-gen is run on
end-user machines where sh might be broken, we should be robust to
abuse.  Some of the instances replaced here are provably safe,
and could not confuse even broken 'test', but it is easier to
replace all instances of test -[nz].

* build-aux/git-version-gen: Prefer portable test spelling, since
git-version-gen is run on more than just developer machines.

Signed-off-by: Eric Blake <eblake@redhat.com>
2012-12-31 16:01:13 -07:00
Peter Rosin
b679574e3a git-version-gen: add --fallback option to use if git is not present
When building in a git checkout, but from a system lacking git, it
is useful to fall back to the version determined when the git
checkout was last used from a system sporting git.

* build-aux/git-version-gen: Add support for the new option --fallback,
which comes into play when there is no $tarball_version_file and
git is not working.
(scriptversion): Update.

Copyright-paperwork-exempt: yes
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2012-12-31 15:55:16 -07:00
Andreas Oberritter
cbc11ff002 git-version-gen: don't let "prefix" envvar cause trouble
* build-aux/git-version-gen (prefix): Initialize properly,
so as not to use a value specified via the environment.
Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810
2012-03-18 18:39:35 +01:00
Paul Eggert
04c1ac6962 Use ', not `, for quoting output.
* build-aux/announce-gen (usage, sizes, print_news_deltas)
(print_changelog_deltas, get_tool_versions, main program):
* build-aux/git-version-gen:
* build-aux/gitlog-to-changelog (usage, parse_amend_file):
* build-aux/move-if-change (help):
* build-aux/useless-if-before-free (usage, main program):
* check-module (parse_module_file, usage)
(find_included_lib_files, check_module):
* lib/argmatch.c (main) [TEST]:
* lib/argp-help.c (_help):
* lib/getopt1.c (main) [TEST]:
* lib/git-merge-changelog.c (usage):
* lib/xstrtol-error.c (xstrtol_error):
* m4/alloca.m4 (_AC_LIBOBJ_ALLOCA):
* m4/argz.m4 (gl_FUNC_ARGZ):
* m4/bison.m4 (gl_BISON):
* m4/calloc.m4 (gl_FUNC_CALLOC_GNU):
* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
* m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
* m4/fpending.m4 (gl_PREREQ_FPENDING):
* m4/gc-random.m4 (gl_GC_RANDOM):
* m4/intl.m4 (gt_CHECK_DECL):
* m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK):
* m4/longlong.m4 (AC_TYPE_LONG_LONG_INT)
(AC_TYPE_UNSIGNED_LONG_LONG_INT):
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS):
* m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK):
* m4/onceonly.m4 (AC_CHECK_FUNCS_ONCE):
* m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION):
* tests/test-dirname.c (main):
* tests/test-getpass.c (main):
* tests/test-iconvme.c (main):
* tests/test-parse-datetime.c (LOG):
* tests/test-xstrtoimax.sh:
* tests/test-xstrtol.sh:
* tests/test-xstrtoll.sh:
* tests/test-xstrtoumax.sh:
* tests/unigbrk/test-uc-is-grapheme-break.c (main):
* top/GNUmakefile (abort-due-to-no-makefile):
Quote 'like this', not `like this', as per the recent change to
the GNU coding standards.
2012-01-05 23:44:47 -08:00
Jim Meyering
1602f0afed maint: update all copyright year number ranges
Run "make update-copyright".
2012-01-01 10:04:58 +01:00
Simon Josefsson
de82454c42 Fix for last commit. 2011-11-13 14:46:48 +01:00
Simon Josefsson
b50f730683 git-version-gen: Add --prefix.
* build-aux/git-version-gen: Add --prefix to configure the tag
match string.
2011-11-13 14:43:35 +01:00
Simon Josefsson
d67fde90c6 git-version: Improve command line handling.
* build-aux/git-version-gen: Add --help and --version.
2011-11-13 11:07:41 +01:00
Jim Meyering
17857d41b4 git-version-gen: correct the advice in a comment
* build-aux/git-version-gen: Correct comment.
Don't recommend to list .tarball-version in .gitignore.
2011-08-11 14:16:35 +02:00
Iain Nicol
c596dce252 git-version-gen: document that EXTRA_DIST must include .version
* build-aux/git-version-gen: In the how-to-use comment, document
that EXTRA_DIST must include .version.  Otherwise, "make distcheck"
will fail when run from an unpacked distribution tarball.
2011-08-01 22:55:44 +02:00
Jim Meyering
fd0201ccc4 git-version-gen: skip "-dirty" check when appropriate
* build-aux/git-version-gen: Don't run any git commands when the
version string comes from .tarball-version.  Prior to this, we
would run git update-index --refresh even from a just-unpacked
tarball directory, and that could affect a .git/ directory in a
parent of the build directory.  Reported by Mike Frysinger.
2011-02-19 22:39:21 +01:00
Bruce Korb
67c47b3ef9 avoid an unnecessary sub-shell 2011-01-04 09:33:27 -08:00
Ben Pfaff
a2e8447d6b git-version-gen: use (...) rather than sh -c '...'
* build-aux/git-version-gen: Rather than hard-coding a shell's name
with "sh -c '...'", just use "(...)".  Less syntax is better, too.
2011-01-03 21:05:04 +01:00
Jim Meyering
307d434949 git-version-gen: convert leading TABs to spaces
* build-aux/git-version-gen: Expand leading TABs.
2011-01-03 20:41:49 +01:00
Jim Meyering
98e2bedbc9 git-version-gen: handle failed "git rev-list"
* build-aux/git-version-gen: Rather than leaking a "fatal" error
from git and proceeding as if it had succeeded but printed no SHA1
checksums, suppress the diagnostic and handle the failure.
Reported by Bruce Korb in http://marc.info/?l=git&m=129399145930450&w=2
2011-01-03 20:39:03 +01:00
Jim Meyering
55b6628590 git-version-gen: include command name in one more diagnostic
* build-aux/git-version-gen: When the required .tarball-version file
was missing or unreadable, you might see the diagnostic from "cat",
but no trace of the name of the invoking script.  Now, you still see
the diagnostic from cat, but also get one from "git-version-gen: ".
Inspired by a patch from Bruce Korb.
2011-01-03 11:50:43 +01:00
Jim Meyering
d60f3b0c6b maint: update almost all copyright ranges to include 2011
Run the new "make update-copyright" rule.
2011-01-01 22:12:59 +01:00
Jim Meyering
49e38169be git-version-gen: do require git-VC'd files in cwd
* build-aux/git-version-gen: Reject a git version string
if there are no commits associated with the current directory.
This avoids an unlikely false-positive (unrelated dir whose parent
repository also contains a tag matching v*), as pointed out
by Giuseppe Scrivano in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/21843/focus=23664
2010-10-14 07:29:30 +02:00
Jim Meyering
932cfeb12a git-version-gen: don't require that .git/ be in the current dir
* build-aux/git-version-gen: Adjust this script so that it works
when run from any working directory beneath the top-level .git/-
containing directory.  Inspired by a patch from Giusseppe Scrivano,
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/21843/focus=21847
2010-10-13 16:08:36 +02:00
Thien-Thi Nguyen
e0fcde8130 git-version-gen: init shell var to avoid env var influence
* build-aux/git-version-gen (v): Init shell var to empty.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-06-14 14:36:01 -06:00
Ludovic Courtès
8ab5996c4a git-version-gen: take a sed script to transform the git tag
* build-aux/git-version-gen (tag_sed_script): New variable.  Use it to
transform the output of "git describe" to the canonical form.
* top/GNUmakefile (_curr-ver): Pass $(git-version-gen-tag-sed-script) as
a second argument to `git-version-gen'.
2010-05-28 17:22:17 +02:00
Jim Meyering
6e417accc9 git-version-gen: aesthetic tweak
* build-aux/git-version-gen: Use "$nl" rather than a literal,
so that the command remains on a single line.
2010-04-26 18:59:46 +02:00
Eric Blake
95d5b8747b git-version-gen: allow use on EBCDIC hosts
* build-aux/git-version-gen (dirty): Use literal rather than tying
ourselves to ascii.
Reported by Steve Goetze.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-04-26 09:46:01 -06:00
Andreas Gruenbacher
197b47e41b git-version-gen: use "git update-index..." rather than "git status"
* build-aux/git-version-gen: Use git update-index --refresh, not
"git status".  With some versions of git, "git status" would fail
to update the index and result in an unwarranted "-dirty" suffix.
2010-04-12 20:11:05 +02:00
Eric Blake
108cfb8031 bootstrap, git-version-gen: use timestamp
Timestamps are useful, particularly for files copied into other
packages, to see how long since a file has forked.

* build-aux/git-version-gen (scriptversion): Force UTC.
* build-aux/bootstrap (scriptversion): New variable.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-02-24 10:25:56 -07:00
Jim Meyering
fb4a9aa847 maint: normalize copyright notices
Normalize some copyright comments: change the two spaces before
"Free Software..." to one:

  git grep -l -E '[0-9]{4}   *Free Software' \
    | xargs perl -pi -e 's/  +(Free Software)/ $1/'
2010-01-27 17:13:38 +01:00
Simon Josefsson
ff867baa1c Fix copyright statement. 2010-01-27 16:13:04 +01:00
Ralf Wildenhues
acaed473b0 Fix copyright header in build-aux scripts.
* build-aux/git-version-gen: Fix copyright header to match GPLv3
recommendation.
* build-aux/ncftpput-ftp: Likewise.
* build-aux/update-copyright: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-10 19:57:57 +02:00
Eric Blake
cfda781673 Use 'git describe --match' if present (added in git 1.5.5).
* build-aux/git-version-gen: Limit result to tags that match 'v*'
if possible.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-08 11:26:12 -06:00
Eric Blake
1a98f86fef Ensure sane .version contents.
* top/GNUmakefile (_dummy): Also delete .version when rebuilding
version string.
* build-aux/git-version-gen: Improve documentation.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-03 16:53:45 -06:00
Jim Meyering
2745af103f * build-aux/git-version-gen: Adjust a comment and the Usage string.
Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-03-02 17:21:16 +01:00
Bob Proulx
511e2bf85a Enable use of older two part flavor 'git describe'.
* build-aux/git-version-gen: If using the older two part flavor of
git version then recreate the third part now present in the
newer three part flavor of git describe.
2008-02-21 09:07:10 +01:00
Jim Meyering
77b76ce0d1 * build-aux/git-version-gen: Use "git status", not "git-status". 2008-02-08 11:31:54 +01:00
Jim Meyering
0f6573c5dd git-version-gen: sync from coreutils.
* build-aux/git-version-gen: Add comments.
Change the first '-' to '.' in the snapshot version string,
e.g., 6.9-377-08144 -> 6.9.377-08144
Remove first parameter.
Don't declare a version "-dirty" merely because a time
stamp has changed.
2007-11-05 08:27:07 +01:00
Jim Meyering
673dc837e4 * build-aux/git-version-gen: New file, from coreutils. For details, see
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=bfe49f506
2007-09-02 22:42:45 +00:00