summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/utf8proc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/utf8proc/Makefile')
-rw-r--r--3rdparty/utf8proc/Makefile27
1 files changed, 22 insertions, 5 deletions
diff --git a/3rdparty/utf8proc/Makefile b/3rdparty/utf8proc/Makefile
index fa1c6b09f38..d2e299b5386 100644
--- a/3rdparty/utf8proc/Makefile
+++ b/3rdparty/utf8proc/Makefile
@@ -11,7 +11,7 @@ PERL=perl
CFLAGS ?= -O2
PICFLAG = -fPIC
C99FLAG = -std=c99
-WCFLAGS = -Wall -Wextra -pedantic
+WCFLAGS = -Wsign-conversion -Wall -Wextra -pedantic
UCFLAGS = $(CPPFLAGS) $(CFLAGS) $(PICFLAG) $(C99FLAG) $(WCFLAGS) -DUTF8PROC_EXPORTS $(UTF8PROC_DEFINES)
LDFLAG_SHARED = -shared
SOFLAG = -Wl,-soname
@@ -22,9 +22,12 @@ SOFLAG = -Wl,-soname
# compatibility is broken, even if the API is backward-compatible.
# The API version number is defined in utf8proc.h.
# Be sure to also update these ABI versions in MANIFEST and CMakeLists.txt!
-MAJOR=2
-MINOR=4
-PATCH=1
+MAJOR=3
+MINOR=0
+PATCH=0
+
+# api version (also in utf8proc.h and CMakeLists.txt)
+VERSION=2.9.0
OS := $(shell uname)
ifeq ($(OS),Darwin) # MacOS X
@@ -78,7 +81,7 @@ utf8proc.o: utf8proc.h utf8proc.c utf8proc_data.c
libutf8proc.a: utf8proc.o
rm -f libutf8proc.a
- $(AR) rs libutf8proc.a utf8proc.o
+ $(AR) crs libutf8proc.a utf8proc.o
libutf8proc.so.$(MAJOR).$(MINOR).$(PATCH): utf8proc.o
$(CC) $(LDFLAGS) $(LDFLAG_SHARED) -o $@ $(SOFLAG) -Wl,libutf8proc.so.$(MAJOR) utf8proc.o
@@ -168,6 +171,20 @@ test/custom: test/custom.c test/tests.o utf8proc.o utf8proc.h test/tests.h
test/misc: test/misc.c test/tests.o utf8proc.o utf8proc.h test/tests.h
$(CC) $(UCFLAGS) $(LDFLAGS) -DUNICODE_VERSION='"'`$(PERL) -ne "/^UNICODE_VERSION=/ and print $$';" data/Makefile`'"' test/misc.c test/tests.o utf8proc.o -o $@
+# make release tarball from master branch
+dist:
+ git archive master --prefix=utf8proc-$(VERSION)/ -o utf8proc-$(VERSION).tar.gz
+
+# build tarball, make sure it passes checks, and make sure version numbers are consistent
+distcheck: dist
+ test `grep UTF8PROC_VERSION utf8proc.h | cut -d' ' -f3 | tr '\n' .` = $(VERSION). || exit 1
+ test `grep "utf8proc VERSION" CMakeLists.txt |cut -d' ' -f 4` = $(VERSION) || exit 1
+ test `grep libutf8proc.so.$(MAJOR).$(MINOR).$(PATCH) MANIFEST | wc -l` = 3 || exit 1
+ test `grep 'set(SO_' CMakeLists.txt |cut -d' ' -f2 | tr -d ')' | tr '\n' '.'` = $(MAJOR).$(MINOR).$(PATCH). || exit 1
+ tar xzf utf8proc-$(VERSION).tar.gz
+ make -C utf8proc-$(VERSION) check
+ rm -rf utf8proc-$(VERSION)
+
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
$(MAKE) -C bench
test/normtest data/NormalizationTest.txt