summaryrefslogtreecommitdiff
path: root/git_version.sh
AgeCommit message (Collapse)AuthorFilesLines
2008-09-25git_version.sh: Debug failure to find .git/ dirHans Ulrich Niedermann1-1/+15
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.
2008-07-17Use 'git foo' instead of 'git-foo'Hans Ulrich Niedermann1-19/+15
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.
2008-07-12sh cmd substitution w/ backticks until git foundHans Ulrich Niedermann1-6/+7
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 $().
2008-06-02Fix check for wrong macro in git-version.sh.David Morrison1-1/+1
2008-04-10git_version scripts: add licensing information.Hans Ulrich Niedermann1-1/+34
2007-12-19Don't fail immediately when git-rev-parse fails.Egbert Eich1-1/+1
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.
2007-12-12Get rid of another potential quoting problemHans Ulrich Niedermann1-1/+1
Some obscure shell might choke on this as well.
2007-12-12Fix quoting issues on NetBSD ashJoerg Sonnenberger1-2/+2
2007-11-30Only accept the found git repo if it is in our top srcdir.Hans Ulrich Niedermann1-1/+6
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.
2007-11-26Handle non-branch case of git workdirHans Ulrich Niedermann1-1/+2
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.
2007-11-22Comment on all git calls' compatibilityHans Ulrich Niedermann1-0/+2
2007-11-22Detect uncommitted changes with git 1.4.xHans Ulrich Niedermann1-1/+3
2007-11-22Get rid of redundant broken GIT_DIR hackHans Ulrich Niedermann1-4/+4
2007-11-20Quieten imake compilation (git_version.sh)Hans Ulrich Niedermann1-2/+7
If git_version.sh does not change git_version.h, it does not print any messages now due to the new --quiet option.
2007-11-20Indentation fixHans Ulrich Niedermann1-1/+1
2007-11-20Keep git commit info in dist tarballsHans Ulrich Niedermann1-5/+23
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.
2007-11-20Multiple git_version.sh cleanupsHans Ulrich Niedermann1-6/+22
Add better --help output, make sure errors got stderr, etc.
2007-11-20git_version.sh: Note git version in .h fileHans Ulrich Niedermann1-1/+10
2007-11-20git_version.sh: Robust error handlingHans Ulrich Niedermann1-32/+75
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.
2007-11-20git_version.h: More efficient and robust git useHans Ulrich Niedermann1-17/+17
Use the proper internal git tools instead of parsing git porcelain output. Thanks to the experts on #git!
2007-11-19Nuke '..' from git id so copy/paste to gitk actually works.Matthias Hopf1-1/+1
2007-11-05Fix git_version.sh srcdir==builddirHans Ulrich Niedermann1-6/+14
Consequent separation of source tree dir ($srcdir) and working dir ($working_dir). Fixes imake and automake in-tree builds.
2007-11-02Log git commit if source tree is git checkoutHans Ulrich Niedermann1-25/+169
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
2007-11-02Add Luc Verhaegen's git_version.sh from xf86-video-unichromeHans Ulrich Niedermann1-0/+62