From: Craig Small Date: Fri, 22 May 2020 07:05:43 +0000 (+1000) Subject: build-sys: Add version file creation X-Git-Tag: v23.4rc1~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b79170a147b7022fa18fbb36874fd6dd58fa65c;p=psmisc build-sys: Add version file creation Hopefully stops some of the version UNKNOWN stuff --- diff --git a/.gitignore b/.gitignore index a9ffc1a..5dca292 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.so *.sum *.swp +.version autom4te.cache/ config/ cov-int/ diff --git a/Makefile.am b/Makefile.am index 6129b66..7a05d15 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,11 +80,11 @@ src_prtstat_SOURCES = src/prtstat.c src/prtstat.h src_prtstat_LDADD = @LIBINTL@ nodist_src_killall_SOURCES = signames.h -BUILT_SOURCES = src/signames.h +BUILT_SOURCES = src/signames.h .version EXTRA_DIST = src/signames.c README.md misc/git-version-gen -CLEANFILES = src/signames.h +CLEANFILES = src/signames.h .version src/signames.h: src/signames.c Makefile src/$(am__dirstamp) export LC_ALL=C ; \ @@ -98,10 +98,14 @@ src/signames.h: src/signames.c Makefile src/$(am__dirstamp) src/signals.c: src/signames.h +.version: + echo $(VERSION) > $@-t && mv $@-t $@ + install-exec-hook: cd $(DESTDIR)$(bindir) && \ ( [ -h pstree.x11 ] || $(LN_S) pstree pstree.x11) - +dist-hook: + echo $(VERSION) > $(distdir)/.tarball-version get-trans: rsync -Lrtvz translationproject.org::tp/latest/psmisc/ po