summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-23 15:41:27 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-23 15:47:09 (EST)
commit9dd2ae5dc265d936b8d5a637bb2cbc007b3df878 (patch)
tree93b57df6655a1598ee3592cd7c433958489401bb
parentd50d3b6042d92798b52806127023f07560ee4be8 (diff)
Makefile.am: Generate and use version.sh
Also, update manual pages any time the Git HEAD changes.
-rw-r--r--Makefile.am10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 6bf800e..c5e8079 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,7 @@ PACKAGE_VERSION_GIT = $(PACKAGE_VERSION)
endif
SUFFIXES = .sh .sho .ms .1in .1 .8in .8
-LINK = '$(srcdir)/tools/shld.sh' -I '$(SH)' -o $@ config.sh
+LINK = '$(srcdir)/tools/shld.sh' -I '$(SH)' -o $@ config.sh version.sh
bin_PROGRAMS = prokit
@@ -38,6 +38,7 @@ prokit_SHPPFLAGS = \
-DLOCALEDIR="$(localedir)" \
-DTEXTDOMAIN="$(TEXTDOMAIN)"
prokit_LDADD = $(prokit_SOURCES:.sh=.sho)
+prokit_DEPENDENCIES = version.sh
locale_MESSAGES = $(locale_sources:.sh=.ms)
@@ -69,6 +70,13 @@ AM_TESTS_ENVIRONMENT = srcdir=$(top_srcdir) COLOR_TEST_LOGS=$(COLOR_TEST_LOGS)
.builddirstamp:
$(AM_V_GEN)touch .builddirstamp
+version.sh:
+ $(AM_V_GEN)printf "PACKAGE_VERSION='%s'\n" "$(PACKAGE_VERSION_GIT)" >$@
+
+if IN_GIT
+version.sh $(man1_MANS) $(man8_MANS): $(top_srcdir)/.git
+endif
+
todo_script = \
/^[0-9]* .[ \t]*\#[ \t]*TODO/,/^[0-9]* \.[ \t]*[^ \t\#]/{ \
/^[0-9]* \.[ \t]*\#/p; \