mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
build: improve maintainer-check-extra-dist target
Filter out from the git ls-files output the files we don't care they appeared (gnulib and intltools stuff), and use comm to only show the remaining added files (i.e. files not being distributed). The output of comm is redirected to file and then printed, so we can check it is empty (failing the target if not).
This commit is contained in:
16
Makefile.am
16
Makefile.am
@@ -573,13 +573,15 @@ maintainer-tag:
|
||||
maintainer-check-extra-dist:
|
||||
zcat $(PACKAGE_NAME)-$(VERSION).tar.gz | tar tf - | sort | \
|
||||
sed 's,^$(PACKAGE_NAME)-$(VERSION)/,,' > tmp/tarfiles
|
||||
git ls-files | sort > tmp/gitfiles
|
||||
diff -ur tmp/tarfiles tmp/gitfiles | \
|
||||
grep '^\+' | \
|
||||
grep -v '^\+intltool-.*\.in' | \
|
||||
grep -v '^\+.gitmodules' | \
|
||||
grep -v '^\+.gnulib' ||:
|
||||
rm tmp/tarfiles tmp/gitfiles
|
||||
git ls-files | \
|
||||
grep -v '^intltool-.*\.in' | \
|
||||
grep -v '^\.gitmodules' | \
|
||||
grep -v '^\.gnulib' | \
|
||||
sort > tmp/gitfiles
|
||||
comm -13 tmp/tarfiles tmp/gitfiles > tmp/comm-out
|
||||
cat tmp/comm-out
|
||||
[ ! -s tmp/comm-out ]
|
||||
rm tmp/tarfiles tmp/gitfiles tmp/comm-out
|
||||
|
||||
# Provide help on common Makefile targets.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user