[lockdev-devel] [PATCH 02/10] build: Generate ChangeLog from git

Roger Leigh rleigh at debian.org
Sun Feb 28 00:00:02 UTC 2010


Distribute ChangeLog.old in addition
---
 Makefile.am |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c5aa20d..276ebbd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,3 +2,20 @@ SUBDIRS = src docs
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = lockdev.pc
+
+dist-hook:
+# Remove junk from the generated tarball.
+	$(FIND) $(distdir) -name '.*' -print | $(XARGS) xargs $(RM) -rf
+	$(FIND) $(distdir) -name '#*' -print | $(XARGS) $(RM) -rf
+	$(FIND) $(distdir) -name '*~' -print | $(XARGS) $(RM) -rf
+
+# Generate ChangeLog
+	if [ -d .git ]; then			\
+	  git log > $(distdir)/ChangeLog;	\
+	fi
+
+EXTRA_DIST =		\
+	ChangeLog.old	\
+	LICENSE		\
+	SHLIBS		\
+	VERSION
-- 
1.7.0




More information about the lockdev-devel mailing list