[libdvdnav-devel] build: proper dependencies for ChangeLog generation target

Diego Biurrun git at videolan.org
Mon Nov 18 12:57:41 CET 2013


libdvdread | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Nov 18 12:56:40 2013 +0100| [96269118aff97ef74596a1765679cfee7f4bd018] | committer: Jean-Baptiste Kempf

build: proper dependencies for ChangeLog generation target

This fixes the ChangeLog file getting continuously rebuilt instead
of after each Git commit, which is the case now.

> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=96269118aff97ef74596a1765679cfee7f4bd018
---

 Makefile.am |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 8a3f6d1..639a676 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,13 +4,11 @@ dist_doc_DATA = AUTHORS ChangeLog COPYING NEWS README TODO
 
 DISTCLEANFILES = ChangeLog
 
-ChangeLog: stamp-changelog
-
-stamp-changelog:
-	-git log > ChangeLog-tmp
-	test -s ChangeLog-tmp && mv ChangeLog-tmp ChangeLog
-	-rm -f ChangeLog-tmp
-	test -e ChangeLog || touch ChangeLog
+ChangeLog: $(wildcard $(srcdir)/.git/logs/HEAD)
+	-cd $(srcdir) && git log > $(abs_builddir)/$(@)-tmp
+	test -s $(@)-tmp && mv $(@)-tmp $(@)
+	-rm -f $(@)-tmp
+	test -e $(@) || touch $(@)
 
 EXTRA_DIST = msvc/ doc/footer.html doc/header.html
 



More information about the libdvdnav-devel mailing list