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.
This commit is contained in:
Lasse Collin 2024-05-22 15:21:53 +03:00
parent f3434ecfcb
commit a119a4209e
1 changed files with 2 additions and 0 deletions

View File

@ -89,6 +89,7 @@ dist-hook:
> "$$dest/txt/$$BASE.txt"; \ > "$$dest/txt/$$BASE.txt"; \
done; \ done; \
fi fi
cd "$(distdir)" && sh "build-aux/license-check.sh"
# This works with GNU tar and gives cleaner package than normal 'make dist'. # 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 # 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 cd "$(srcdir)/po4a" && sh update-po
VERSION=$(VERSION); \ VERSION=$(VERSION); \
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \ 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-`; \ SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \ test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
fi; \ fi; \