summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-11-12 17:29:03 +0000
committerHéctor Orón Martínez <zumbi@debian.org>2019-09-01 01:59:08 +0200
commitd55f7891fb05b82ccc5b1d102df7753974848c56 (patch)
treea227c6621e421f5662e9e95a9166fbdad5644b82 /Makefile
parentf0339358fa82999cbb748ae35d91e6338b8f666d (diff)
Log the version number during startup
When testing OBS behaviour changes, it's useful to be able to look at a build log and see which code was running. Signed-off-by: Simon McVittie <smcv@collabora.com> Forwarded: https://github.com/openSUSE/obs-build/pull/497 Gbp-Pq: Name Log-the-version-number-during-startup.patch
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 41f73f3..7b2a5c9 100644
--- a/Makefile
+++ b/Makefile
@@ -20,13 +20,22 @@ sysconfdir=/etc
DESTDIR=
all:
+ifeq ($(SCM),svn)
+ echo $(VERSION)$(SVNVER) > version
+else
+ifeq ($(SCM),git)
+ echo $(VERSION)_git$(DATE) > version
+else
+ echo $(VERSION) > version
+endif
+endif
.PHONY: test
test:
PERL5LIB=. prove -v
-install:
+install: all
install -m755 -d \
$(DESTDIR)$(pkglibdir)/configs \
$(DESTDIR)$(pkglibdir)/baselibs_configs \
@@ -83,6 +92,7 @@ install:
install -m644 build-recipe build-recipe-* $(DESTDIR)$(pkglibdir)
install -m644 build-pkg build-pkg-* $(DESTDIR)$(pkglibdir)
install -m644 *.pm lxc.conf $(DESTDIR)$(pkglibdir)
+ install -m644 version $(DESTDIR)$(pkglibdir)
install -m644 configs/* $(DESTDIR)$(pkglibdir)/configs
install -m644 baselibs_configs/* $(DESTDIR)$(pkglibdir)/baselibs_configs
install -d $(DESTDIR)$(man1dir)