]> sigrok.org Git - sigrok-firmware-fx2lafw.git/commitdiff
build: Simplify dist-changelog target
authorDaniel Elstner <redacted>
Mon, 9 Nov 2015 10:51:26 +0000 (11:51 +0100)
committerDaniel Elstner <redacted>
Mon, 9 Nov 2015 10:51:26 +0000 (11:51 +0100)
When not building from git, it is not necessary to manually copy
the ChangeLog file from the source directory to the distribution,
since Automake already does that for us.

Makefile.am

index 19f4388eb8f39ff78dbdbdf8375b92d891b6a802..733b81c054a0fbdcceea3204757b12c7874434da 100644 (file)
@@ -232,13 +232,11 @@ mostlyclean-local:
 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
+       $(AM_V_at)if test -d '$(top_srcdir)/.git'; then \
+               if git -C '$(top_srcdir)' log >.ChangeLog.tmp; \
+               then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
+               else rm -f .ChangeLog.tmp; exit 1; fi; \
+       else :; fi
 
 # Creates a convenience tarball with just the generated *.fw files, so that
 # the users don't have to build them manually.