ref: 4742c52aa57ade08fc7b03bb0be871c978c9f782
parent: 1d66d696a1d18db48a868cada1eb9b47cd7f5206
author: Diego Biurrun <diego@biurrun.de>
date: Tue Feb 19 10:23:17 EST 2013
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@videolan.org>
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,13 +6,11 @@
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