BUILD: use format tags in VERDATE and SUBVERS files

The first line now contains a git format tag asking git-archive to
place the last commit's commit date and the last commit's abbreviated
ID respectively. The makefile will use these information in preference
when they're available and git is not available.

Now it's only necessary to add the two following lines in
.git/info/attributes to have the files automatically filled by git-archive :

SUBVERS export-subst
VERDATE export-subst
This commit is contained in:
Willy Tarreau 2013-12-10 11:19:04 +01:00
parent ddee3ed9b7
commit b5e7ef6810
3 changed files with 3 additions and 1 deletions

View File

@ -359,7 +359,7 @@ ifeq ($(SUBVERS),)
SUBVERS := $(shell (grep -v '^\$$' SUBVERS 2>/dev/null || touch SUBVERS) | head -n 1) SUBVERS := $(shell (grep -v '^\$$' SUBVERS 2>/dev/null || touch SUBVERS) | head -n 1)
endif endif
ifeq ($(VERDATE),) ifeq ($(VERDATE),)
VERDATE := $(shell (grep -v '^\$$' VERDATE 2>/dev/null || touch VERDATE) | head -n 1) VERDATE := $(shell (grep -v '^\$$' VERDATE 2>/dev/null || touch VERDATE) | head -n 1 | cut -f1 -d' ' | tr '-' '/')
endif endif
#### Build options #### Build options

View File

@ -1 +1,2 @@
-$Format:%h$

View File

@ -1 +1,2 @@
$Format:%ci$
2013/06/17 2013/06/17