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"; \
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; \