]> sigrok.org Git - sigrok-firmware-fx2lafw.git/commitdiff
build: Allow dist-bin from non-git sources
authorDaniel Elstner <redacted>
Mon, 9 Nov 2015 13:27:12 +0000 (14:27 +0100)
committerDaniel Elstner <redacted>
Mon, 9 Nov 2015 13:27:12 +0000 (14:27 +0100)
Do not require the source directory to be a git checkout when
creating the tarball of binary firmware files.

Makefile.am

index 733b81c054a0fbdcceea3204757b12c7874434da..4e02f430cdbd0520709cff7bd1b506361819bc1a 100644 (file)
@@ -241,10 +241,13 @@ dist-changelog:
 # Creates a convenience tarball with just the generated *.fw files, so that
 # the users don't have to build them manually.
 dist-bin: $(firmware_binaries)
+       -$(AM_V_at)rm -fr $(distdir_bin)
        $(AM_V_at)$(MKDIR_P) $(distdir_bin)
        $(AM_V_at)$(INSTALL_DATA) $(firmware_binaries) $(distdir_bin)
        $(AM_V_at)$(INSTALL_DATA) $(srcdir)/COPYING $(srcdir)/COPYING.LESSER $(srcdir)/NEWS $(srcdir)/README $(distdir_bin)
-       $(AM_V_at)git -C '$(top_srcdir)' log > $(distdir_bin)/ChangeLog
+       $(AM_V_at)if test -d '$(top_srcdir)/.git'; \
+       then git -C '$(top_srcdir)' log > $(distdir_bin)/ChangeLog; \
+       else $(INSTALL_DATA) $(srcdir)/ChangeLog $(distdir_bin); fi
        $(AM_V_at)tar -czf $(distdir_bin).tar.gz $(distdir_bin)
        -$(AM_V_at)rm -fr $(distdir_bin)