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

Diego Biurrun diego at biurrun.de
Tue Feb 19 14:41:43 CET 2013


This fixes the ChangeLog file getting continuously rebuilt instead
of after each Git commit, which is the case now.
---
 Makefile.am |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 06ceb7f..9a6e49c 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: $(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
-- 
1.7.9.5



More information about the libdvdcss-devel mailing list