]> sigrok.org Git - libsigrok.git/commitdiff
build: Make ChangeLog generation distcheck-safe
authorDaniel Elstner <redacted>
Sat, 7 Nov 2015 20:51:40 +0000 (21:51 +0100)
committerDaniel Elstner <redacted>
Sat, 7 Nov 2015 20:51:40 +0000 (21:51 +0100)
.gitignore
ChangeLog [new file with mode: 0644]
Makefile.am

index f49f1e6d057765b267ba718555ffc995c295610f..2d2fadbb2f82260354dd538d9bc8a102a6a3c4e8 100644 (file)
@@ -21,7 +21,6 @@
 .deps/
 .dirstamp
 .libs/
-/ChangeLog
 /Makefile
 /config.*
 /doxy/
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..9fc0f8d
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,2 @@
+The ChangeLog is auto-generated when releasing. If you
+are seeing this, use 'git log' for a detailed list of changes.
index cd21a6884afa6731df1485cabe45577c77b15af7..2a0825d35295e8d1cb6fcb5998fb16b422af1031 100644 (file)
@@ -703,11 +703,16 @@ all-local: $(BUILD_EXTRA)
 install-exec-local: $(INSTALL_EXTRA)
 clean-local: $(CLEAN_EXTRA)
 
-MAINTAINERCLEANFILES = ChangeLog
-
-.PHONY: ChangeLog
-ChangeLog:
-       git --git-dir '$(top_srcdir)/.git' log >$@ || touch $@
-
-dist-hook: ChangeLog
+.PHONY: dist-changelog
+
+dist-hook: dist-changelog
+
+dist-changelog:
+       $(AM_V_at)if test ! -d '$(top_srcdir)/.git'; then \
+               cp -f '$(top_srcdir)/ChangeLog' "$(top_distdir)/ChangeLog"; \
+       elif git -C '$(top_srcdir)' log >.ChangeLog.tmp; then \
+               mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
+       else \
+               rm -f .ChangeLog.tmp; exit 1; \
+       fi