Skip to content

Commit 8bf9d71

Browse files
committed
add make distcheck
1 parent bb84f2e commit 8bf9d71

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@ test/misc: test/misc.c test/tests.o utf8proc.o utf8proc.h test/tests.h
175175
dist:
176176
git archive master --prefix=utf8proc-$(VERSION)/ -o utf8proc-$(VERSION).tar.gz
177177

178+
# build tarball, make sure it passes checks, and make sure version numbers are consistent
179+
distcheck: dist
180+
test `grep UTF8PROC_VERSION utf8proc.h | cut -d' ' -f3 | tr '\n' .` = $(VERSION). || exit 1
181+
test `grep "utf8proc VERSION" CMakeLists.txt |cut -d' ' -f 4` = $(VERSION) || exit 1
182+
test `grep libutf8proc.so.$(MAJOR).$(MINOR).$(PATCH) MANIFEST | wc -l` = 3 || exit 1
183+
test `grep 'set(SO_' CMakeLists.txt |cut -d' ' -f2 | tr -d ')' | tr '\n' '.'` = $(MAJOR).$(MINOR).$(PATCH). || exit 1
184+
tar xzf utf8proc-$(VERSION).tar.gz
185+
make -C utf8proc-$(VERSION) check
186+
rm utf8proc-$(VERSION).tar.gz
187+
178188
check: test/normtest data/NormalizationTest.txt data/Lowercase.txt data/Uppercase.txt test/graphemetest data/GraphemeBreakTest.txt test/printproperty test/case test/iscase test/custom test/charwidth test/misc test/valid test/iterate bench/bench.c bench/util.c bench/util.h utf8proc.o
179189
$(MAKE) -C bench
180190
test/normtest data/NormalizationTest.txt

0 commit comments

Comments
 (0)