diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -528,17 +528,10 @@ CLI_OBJS = cli_classic.o cli_output.o cli_common.o print.o # versioninfo.inc is used when packaging flashrom and is generated by the # export rule. If versioninfo.inc is not found, version info will be obtained -# using util/getrevision.sh or "unknown" if SCM metadata directory isn't found. +# using util/getrevision.sh. ifeq ($(wildcard versioninfo.inc),) -ifeq ($(wildcard .git),) -VERSION ?= unknown -MAN_DATE ?= unknown -else VERSION ?= $(shell ./util/getrevision.sh --local) -MAN_DATE ?= $(shell ./util/getrevision.sh -d $(PROGRAM).8.tmpl 2>/dev/null) -# This is also a convenient time to install hooks. -$(shell ./util/git-hooks/install.sh) -endif +MAN_DATE ?= $(shell ./util/getrevision.sh --date $(PROGRAM).8.tmpl 2>/dev/null) else include versioninfo.inc endif @@ -557,6 +550,9 @@ RELEASENAME ?= $(shell echo "$(VERSION)" | sed -e 's/ /_/') # Inform user of the version string $(info Replacing all version templates with $(VERSION).) +# If a VCS is found then try to install hooks. +$(shell ./util/getrevision.sh -c 2>/dev/null && ./util/git-hooks/install.sh) + ############################################################################### # Default settings of CONFIG_* variables. |