build-sys: do not assume $(top_srcdir)/.version file always exists

The issue was visible when trying to perform 'make distcheck'
without the .version file.

Reported-by: Craig Small <csmall@enc.com.au>
Reference: http://www.freelists.org/post/procps/watch-8bit-and-make-distcheck
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-06-04 09:42:50 +02:00 committed by Craig Small
parent dcd8cf0b4b
commit 47cc1b6ccf

View File

@ -108,7 +108,9 @@ dist_procpsng_DATA = \
Documentation/BUGS \
Documentation/FAQ
BUILT_SOURCES = $(top_srcdir)/.version
@ if [ -f $(top_srcdir)/.version ]; then \
BUILT_SOURCES = $(top_srcdir)/.version \
fi
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook: