X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/6865d5bb30ac60fa75e850aecff992d409696bb6..d6dd733f6a7ade7f07b0721e576d66e56cf8b563:/main/Makefile.am?ds=sidebyside diff --git a/main/Makefile.am b/main/Makefile.am index 06e6e920..a65b4ac7 100644 --- a/main/Makefile.am +++ b/main/Makefile.am @@ -16,7 +16,7 @@ enigma2_SOURCES = \ xmlgenerator.cpp \ xmlgenerator.h \ version_info.cpp \ - version_info.h + version_info.h \ version.h EXTRA_DIST = \ @@ -57,24 +57,24 @@ GIT_DIR = $(top_srcdir)/.git GIT = git --git-dir=$(GIT_DIR) if HAVE_FAKE_GIT_DIR -ENIGMA2_DATE = `cat $(GIT_DIR)/last_commit_info | grep 'Date:' | cut -d' ' -f4` +ENIGMA2_COMMIT_DATE = `grep '^CommitDate:' $(GIT_DIR)/last_commit_info | cut -d' ' -f2` ENIGMA2_BRANCH = `cat $(GIT_DIR)/branch` else -ENIGMA2_DATE = `$(GIT) log --no-color -n 1 --format=format:%cd --date=short` +ENIGMA2_COMMIT_DATE = `$(GIT) log --no-color -n 1 --pretty=format:%cd --date=short` ENIGMA2_BRANCH = `$(GIT) branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` -ENIGMA2_REV = `$(GIT) describe --abbrev=7 --always --dirty --long --tags` +ENIGMA2_REV = `$(GIT) describe --abbrev=7 --always --long --tags` +endif endif BUILT_SOURCES = version-intermediate.h -CLEANFILES = version-intermediate.h +.INTERMEDIATE: version-intermediate.h +.PHONY: version-intermediate.h version-intermediate.h: $(AM_V_GEN)touch $@ - $(AM_V_at)[ -n "$(ENIGMA2_DATE)" ] && echo "#define ENIGMA2_LAST_CHANGE_DATE \"$(ENIGMA2_DATE)\"" >> $@ - $(AM_V_at)[ -n "$(ENIGMA2_BRANCH)" ] && echo "#define ENIGMA2_BRANCH \"$(ENIGMA2_BRANCH)\"" >> $@ - $(AM_V_at)[ -n "$(ENIGMA2_REV)" ] && echo "#define ENIGMA2_REV \"$(ENIGMA2_REV)\"" >> $@ + -$(AM_V_at)[ -n "$(ENIGMA2_COMMIT_DATE)" ] && echo "#define ENIGMA2_COMMIT_DATE \"$(ENIGMA2_COMMIT_DATE)\"" >> $@ + -$(AM_V_at)[ -n "$(ENIGMA2_BRANCH)" ] && echo "#define ENIGMA2_BRANCH \"$(ENIGMA2_BRANCH)\"" >> $@ + -$(AM_V_at)[ -n "$(ENIGMA2_REV)" ] && echo "#define ENIGMA2_REV \"$(ENIGMA2_REV)\"" >> $@ $(AM_V_at)([ -f version.h ] && diff -q version.h $@ >/dev/null) || $(INSTALL_HEADER) $@ version.h - $(AM_V_at)$(RM) $@ -endif enigma2$(EXEEXT): $(enigma2_OBJECTS) $(enigma2_DEPENDENCIES) $(enigma2_LDADD_WHOLE) $(AM_V_CXXLD)$(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ $(enigma2_LDFLAGS) $(enigma2_OBJECTS) \