From a119a4209e8827e1d7c2cfd30cb9f5a9b76f9dff Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Wed, 22 May 2024 15:21:53 +0300 Subject: [PATCH] Build: Run license-check.sh in "mydist" and "dist-hook" In mydist the point is to check using the file list from the Git repository. In dist-hook it is to check that the TARBALL_IGNORE patterns work when the .git dir or the "git" command aren't available. Refuse to create a distribution tarball if license issues are found. --- Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.am b/Makefile.am index 43c9a336..05c25908 100644 --- a/Makefile.am +++ b/Makefile.am @@ -89,6 +89,7 @@ dist-hook: > "$$dest/txt/$$BASE.txt"; \ done; \ fi + cd "$(distdir)" && sh "build-aux/license-check.sh" # This works with GNU tar and gives cleaner package than normal 'make dist'. # This also ensures that the man page translations are up to date (dist-hook @@ -98,6 +99,7 @@ mydist: cd "$(srcdir)/po4a" && sh update-po VERSION=$(VERSION); \ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \ + sh "$(srcdir)/build-aux/license-check.sh" || exit 1; \ SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \ test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \ fi; \