]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: prepare the makefile to skip format lines in SUBVERS and VERDATE
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Dec 2013 10:16:09 +0000 (11:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 10 Dec 2013 10:16:09 +0000 (11:16 +0100)
We're going to put format lines in these files for use by git archive,
so let's ensure that the current default format still works. For this
we'll use two lines and only take the first one without a format tag.

Makefile

index e1a74247c579439d8adf45f25db334c5e6eb7899..4a51985b16a5fb429e3439dfe89e2861c7db82b2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -356,10 +356,10 @@ ifeq ($(VERSION),)
 VERSION := $(shell cat VERSION 2>/dev/null || touch VERSION)
 endif
 ifeq ($(SUBVERS),)
-SUBVERS := $(shell cat SUBVERS 2>/dev/null || touch SUBVERS)
+SUBVERS := $(shell (grep -v '^\$$' SUBVERS 2>/dev/null || touch SUBVERS) | head -n 1)
 endif
 ifeq ($(VERDATE),)
-VERDATE := $(shell cat VERDATE 2>/dev/null || touch VERDATE)
+VERDATE := $(shell (grep -v '^\$$' VERDATE 2>/dev/null || touch VERDATE) | head -n 1)
 endif
 
 #### Build options