diff options
author | Colin Walters <walters@verbum.org> | 2017-02-17 10:22:43 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-02-22 18:57:18 +0000 |
commit | 09b392675aa7ede9eb108cce478cc491080ac1f0 (patch) | |
tree | 9237f757998eecfe9cf006c6d0a051897c019e60 /Makefile.am | |
parent | 3ec509c89b07efbfc4b4d007327609b6dee77dd3 (diff) | |
download | ostree-09b392675aa7ede9eb108cce478cc491080ac1f0.tar.gz |
main: Make ostree --version output YAML (and add gitrev)
I learned today that `docker version` does this and I really like
the idea. While we have the patient open, also add the gitrev
with code taken from https://github.com/projectatomic/rpm-ostree/pull/584
Closes: #691
Approved by: giuseppe
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 31c41251..cc0e76f5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,6 +19,8 @@ include Makefile-decls.am shortened_sysconfdir = $$(echo "$(sysconfdir)" | sed -e 's|^$(prefix)||' -e 's|^/||') +OSTREE_GITREV=$(shell if command -v git >/dev/null 2>&1 && test -d $(srcdir)/.git; then git describe --abbrev=42 --tags --always HEAD; fi) + ACLOCAL_AMFLAGS = -I buildutil -I libglnx ${ACLOCAL_FLAGS} AM_CPPFLAGS += -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \ -DLOCALEDIR=\"$(datadir)/locale\" -DSYSCONFDIR=\"$(sysconfdir)\" \ @@ -26,6 +28,7 @@ AM_CPPFLAGS += -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \ -DOSTREE_FEATURES='"$(OSTREE_FEATURES)"' \ -DOSTREE_COMPILATION \ -DG_LOG_DOMAIN=\"OSTree\" \ + -DOSTREE_GITREV='"$(OSTREE_GITREV)"' \ -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 \ -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 -DSOUP_VERSION_MAX_ALLOWED=SOUP_VERSION_2_48 AM_CFLAGS += -std=gnu99 $(WARN_CFLAGS) |