Age | Commit message (Collapse) | Author | Files | Lines |
|
There appear to be some systems and cases when we do not find
the .git/ dir belonging to the source tree, and thus fail to
determine the git version for git_version.h.
This adds a few internal variables to git_version.h as
C comments.
|
|
git upstream have declared the 'git-foo' syntax to be deprecated,
and it has already been removed from standard git installs, even
if many OS vendors are still shipping git packages with git-foo
in the default PATH.
The updated scripts using 'git foo' should still be compatible
with git >= 1.3.0 with respect to the 'git foo' vs 'git-foo'
issue, and with git >= 1.4.0 wrt the git commands themselves.
|
|
git's sh scripts use $(), so if we have detected git we know there is
a $() capable sh on board somewhere and can use it. Until then, we use
`` and hope our quoting is a) correct and b) works even on those
ancient sh implementations which may have problems with $().
|
|
|
|
|
|
When a shell is executed with -e it exists immediately if an untested command
fails. Therefore we need to make sure that this doesn't happen or a
git_version.h may not be created which will lead to a failed build.
|
|
Some obscure shell might choke on this as well.
|
|
|
|
Fixes bug introduced in ff796eba:
In srcdir!=builddir builds, if builddir is a subdirectory of srcdir,
"make distcheck" exposes a conflict between the dist tarballs'
git_version.h and the new git_version.h erroneously created while
compiling the source tree from the dist tarball.
|
|
git-symbolic-ref HEAD may fail due to there being no HEAD. This happens
(e.g. if you "git checkout some_tag"), is thus OK, and "(no branch)" is
exactly what "git branch" prints in such a case.
|
|
|
|
|
|
|
|
If git_version.sh does not change git_version.h, it does not print
any messages now due to the new --quiet option.
|
|
|
|
Add git_version.sh option --keep-if-no-repo, and hook it into imake
and automake builds.
automake builds do proper "make dist" tarball generation, shipping a
git_version.h file specifically marked as being part of a dist tarball.
Both automake and imake builds keep existing git_version.h files if
they detect the source tree is not a git workdir.
|
|
Add better --help output, make sure errors got stderr, etc.
|
|
|
|
Handle errors (git tools not present, not a git repo, error running
git tools, ...) properly, by either saying "non-git sources" or by
adding an error message.
Write enough info into git_version.h to make it possible to determine
problems rooted in git_version.sh.
|
|
Use the proper internal git tools instead of parsing git porcelain
output. Thanks to the experts on #git!
|
|
|
|
Consequent separation of source tree dir ($srcdir) and working
dir ($working_dir). Fixes imake and automake in-tree builds.
|
|
Defines a number of CPP macros with a git commit version message
if source tree is git checkout.
Both radeonhd_drv.so and rhd_conntest print that version message.
Numerous adaptations to git_version.sh and build rules:
* only touch git_version.h if content needs to change
* always define useful GIT_MESSAGE
* add example program using git_version.h
* handle srcdir != builddir
* variable header name and ifndef
|
|
|