changeset 20394:9df3feddcf22

only generate ChangeLog if building from hg archive * Makefile.am (changelog-from-hg-log): Don't attempt to generate ChangeLog file unless $(srcdir) contains a .hg directory.
author John W. Eaton <jwe@octave.org>
date Thu, 16 Jul 2015 13:44:11 -0400
parents 84ca63c8a038
children fb97c11f8e67
files Makefile.am
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Thu Jul 16 16:57:30 2015 +0100
+++ b/Makefile.am	Thu Jul 16 13:44:11 2015 -0400
@@ -196,13 +196,15 @@
 	@$(gdbinit_install_rule)
 
 define changelog-from-hg-log
-  rm -f $@-t $@ && \
-  ( cd $(srcdir); \
-    hg log --style=build-aux/changelog.tmpl --prune=b0e60ad4ae26 --only-branch=`hg branch`; \
-    echo ""; \
-    echo "See the files in the directory etc/OLD-ChangeLogs for changes before 2011-04-19"; \
-  ) > $@-t && \
-  mv $@-t $@
+  rm -f $@-t && \
+  cd $(srcdir) && \
+  if [ -d .hg ]; then \
+    ( hg log --style=build-aux/changelog.tmpl --prune=b0e60ad4ae26 --only-branch=`hg branch`; \
+      echo ""; \
+      echo "See the files in the directory etc/OLD-ChangeLogs for changes before 2011-04-19"; \
+    ) > $@-t && \
+    mv $@-t $@; \
+  fi
 endef
 
 ChangeLog: