]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
build: Handle the ChangeLog as a distributed-only file
authorGuillem Jover <guillem@hadrons.org>
Mon, 27 May 2013 02:41:58 +0000 (04:41 +0200)
committerGuillem Jover <guillem@hadrons.org>
Mon, 27 May 2013 03:39:44 +0000 (05:39 +0200)
The ChangeLog file is distributed, and cannot be regenerated outside
of the git repository, so do not remove it in DISTCLEANFILES, and move
the generation code into dist-hook, which also avoids unnecessary
computation during normal builds.

Makefile.am

index ae7cd209fec45ec42079c080c03078493d9da728..8e50b1d906d7e57a9814970fc564e9281742d272 100644 (file)
@@ -9,11 +9,8 @@ EXTRA_DIST = \
        get-version \
        $(nil)
 
-DISTCLEANFILES = ChangeLog
-.PHONY: ChangeLog
-
-ChangeLog:
-       git log --stat -C >$@
-
 dist-hook:
        echo $(VERSION) >$(distdir)/.dist-version
+       if [ -d .git ]; then \
+         git log --stat -C >$(distdir)/ChangeLog; \
+       fi