Skip to content

Commit

Permalink
Unify version strings for legacy builds
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-dittrich committed Jan 2, 2018
1 parent 05a6297 commit e80285f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Substitions for git archive
src/Makefile.in export-subst
src/Makefile.legacy export-subst

# Files/directories to be ignored for git archive
.circle export-ignore
Expand Down
12 changes: 9 additions & 3 deletions src/Makefile.legacy
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ SORT = sort
STRIP = strip
MAKE_ORIG = +$(MAKE) -f Makefile.legacy

JTR_GIT_VERSION = \"$(shell git describe --tags --dirty=+ 2>/dev/null)\"
ifeq ($(JTR_GIT_VERSION), \"\")
JTR_GIT_VERSION = JUMBO_VERSION
JTR_GIT_COMMIT = \"-$(shell git rev-parse --short HEAD 2>/dev/null)\"
ifeq ($(JTR_GIT_COMMIT), \"-\")
F = "" # for tarballs or zip files not created using git archive
# this format string will be replaced by git archive:
JTR_ARCHIVE_VERSION_STRING = $Format:-%h %ci$
JTR_GIT_VERSION = JUMBO_VERSION "\"$(shell echo "$(JTR_ARCHIVE_VERSION_STRING)" | "$(SED)" 's/ormat:-%h %ci/-/g')\""
else
JTR_GIT_HEAD_TS = \" $(shell git show -s --format=%ci HEAD 2>/dev/null)\"
JTR_GIT_VERSION = JUMBO_VERSION "$(JTR_GIT_COMMIT) $(JTR_GIT_HEAD_TS)"
endif

## Uncomment the line below for MPI (can be used together with OMP as well)
Expand Down

0 comments on commit e80285f

Please sign in to comment.