From a930086323814d946bcfd32ce26296036b46bccd Mon Sep 17 00:00:00 2001 From: Peter Colberg Date: Fri, 30 Oct 2015 18:46:28 -0400 Subject: Test `make install` Generate reproducible manifest of installed files. --- .gitignore | 3 ++- .travis.yml | 2 +- MANIFEST | 7 +++++++ Makefile | 14 ++++++++++++-- 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 MANIFEST 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 --- /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: -- cgit v1.2.3