Make jq --version report an actual git revision.

Closes #129.
This commit is contained in:
Stephen Dolan committed 2013-05-24 23:35:38 +01:00
1 parent cbd422d56e
commit f0b982795c
4 files changed
+14 -7

No files matched your search

+5 -5
View File
@@ -33,7 +33,10 @@ AM_YFLAGS = --warnings=all -d
### Building the jq binary
main.c: config.h
version.h:
@ { $(srcdir)/scripts/version || echo '$(VERSION)'; } | sed 's/.*/#define JQ_VERSION "&"/'> $@
main.c: config.h version.h
bin_PROGRAMS = jq
jq_SOURCES = ${JQ_SRC} main.c
@@ -95,16 +98,13 @@ DOC_FILES = docs/content docs/public docs/templates docs/site.yml \
# the developer setup script in the tarball.
EXTRA_DIST = config.h.in $(BUILT_SOURCES) $(man_MANS) $(TESTS) \
$(TEST_LOG_COMPILER) gen_utf8_tables.py jq.spec \
$(DOC_FILES)
$(DOC_FILES) scripts/version
# README.md is expected in Github projects, good stuff in it, so we'll
# distribute it and install it with the package in the doc directory.
docdir = ${datadir}/doc/${PACKAGE}
dist_doc_DATA = README.md COPYING AUTHORS README
releasetag:
git tag -s "jq-$$(cat VERSION)" -m "jq release $$(cat VERSION)"
RELEASE ?= 1
rpm: jq
@echo "Packaging jq as an RPM ..."