summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Colberg <peter@colberg.org>2015-10-30 22:46:28 (GMT)
committer Peter Colberg <peter@colberg.org>2015-10-30 22:46:28 (GMT)
commita930086323814d946bcfd32ce26296036b46bccd (patch)
tree1b40c3222fdc11312194d63260bdfd1431597eaa
parentca3ceffbfb3aa7f5f6595436aeed9c9b3e493432 (diff)
downloadlibutf8proc-a930086323814d946bcfd32ce26296036b46bccd.tar.gz
libutf8proc-a930086323814d946bcfd32ce26296036b46bccd.tar.bz2
Test `make install`
Generate reproducible manifest of installed files.
-rw-r--r--.gitignore3
-rw-r--r--.travis.yml2
-rw-r--r--MANIFEST7
-rw-r--r--Makefile14
4 files changed, 22 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index a592011..532fa9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@
*.dylib
*.dSYM
*.out
+*.new
data/*.txt
data/*.ttf
data/*.sfd
@@ -18,9 +19,9 @@ bench/icu
bench/unistring
normtest
graphemetest
-utf8proc_data.c.new
printproperty
charwidth
valid
iterate
case
+/tmp/
diff --git a/.travis.yml b/.travis.yml
index 4e399e5..684df0f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,7 +10,7 @@ before_install:
- sudo apt-get update -qq -y
- sudo apt-get install libpcre3-dev julia fontforge -y
script:
- - make prefix=`pwd`/local install
+ - make manifest && diff MANIFEST.new MANIFEST
- make check
- make data && diff data/utf8proc_data.c.new utf8proc_data.c
- make clean && git status --ignored --porcelain && test -z "$(git status --ignored --porcelain)"
diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..237218e
--- a/dev/null
+++ b/MANIFEST
@@ -0,0 +1,7 @@
+include/
+include/utf8proc.h
+lib/
+lib/libutf8proc.a
+lib/libutf8proc.so -> libutf8proc.so.1.3.0
+lib/libutf8proc.so.1 -> libutf8proc.so.1.3.0
+lib/libutf8proc.so.1.3.0
diff --git a/Makefile b/Makefile
index 710dad1..ffb1cba 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ MAKE=make
AR?=ar
CC?=gcc
INSTALL=install
+FIND=find
# compiler settings
CFLAGS ?= -O2
@@ -17,7 +18,7 @@ UCFLAGS = $(CFLAGS) $(PICFLAG) $(C99FLAG) $(WCFLAGS) -DUTF8PROC_EXPORTS
# from the utf8proc version number because it indicates ABI compatibility,
# not API compatibility: MAJOR should be incremented whenever *binary*
# compatibility is broken, even if the API is backward-compatible
-# Be sure to also update these in CMakeLists.txt!
+# Be sure to also update these in MANIFEST and CMakeLists.txt!
MAJOR=1
MINOR=3
PATCH=0
@@ -38,7 +39,7 @@ includedir=$(prefix)/include
# meta targets
-.PHONY: all, clean, update, data
+.PHONY: all clean data update manifest install
all: libutf8proc.a libutf8proc.$(SHLIB_EXT)
@@ -48,6 +49,7 @@ ifneq ($(OS),Darwin)
rm -f libutf8proc.so.$(MAJOR)
endif
rm -f test/tests.o test/normtest test/graphemetest test/printproperty test/charwidth test/valid test/iterate test/case
+ rm -rf MANIFEST.new tmp
$(MAKE) -C bench clean
$(MAKE) -C data clean
@@ -56,6 +58,8 @@ data: data/utf8proc_data.c.new
update: data/utf8proc_data.c.new
cp -f data/utf8proc_data.c.new utf8proc_data.c
+manifest: MANIFEST.new
+
# real targets
data/utf8proc_data.c.new: libutf8proc.$(SHLIB_EXT) data/data_generator.rb data/charwidths.jl
@@ -93,6 +97,12 @@ ifneq ($(OS),Darwin)
ln -f -s libutf8proc.$(SHLIB_VERS_EXT) $(DESTDIR)$(libdir)/libutf8proc.so.$(MAJOR)
endif
+MANIFEST.new:
+ rm -rf tmp
+ $(MAKE) install prefix=/usr DESTDIR=$(PWD)/tmp
+ $(FIND) tmp/usr -mindepth 1 -type l -printf "%P -> %l\n" -or -type f -printf "%P\n" -or -type d -printf "%P/\n" | LC_ALL=C sort > $@
+ rm -rf tmp
+
# Test programs
data/NormalizationTest.txt: