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

Diego Biurrun git at videolan.org
Tue Feb 26 09:10:46 CET 2013


libdvdcss | branch: master | Diego Biurrun <diego at biurrun.de> | Tue Feb 19 15:23:17 2013 +0100| [4742c52aa57ade08fc7b03bb0be871c978c9f782] | 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.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=4742c52aa57ade08fc7b03bb0be871c978c9f782
---

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

diff --git a/Makefile.am b/Makefile.am
index 06ceb7f..65d2503 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,13 +6,11 @@ dist_doc_DATA = AUTHORS COPYING NEWS README ChangeLog
 
 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 $(@)
 
 lib_LTLIBRARIES = libdvdcss.la
 EXTRA_PROGRAMS = csstest dvd_region



More information about the libdvdcss-devel mailing list