diff --git a/.gitignore b/.gitignore index e41c312..e3a4fe4 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,8 @@ examples/register examples/roster examples/uuid examples/vcard +testbuild*.log +test-release/ test_stamp test-suite.log tests/*.o diff --git a/Makefile.am b/Makefile.am index f42d6fb..4418e04 100644 --- a/Makefile.am +++ b/Makefile.am @@ -103,6 +103,7 @@ EXTRA_DIST = \ MIT-LICENSE.txt \ bootstrap.sh \ build-android.sh \ + testbuild.sh \ examples/README.md \ jni/Android.mk \ jni/Application.mk \ @@ -270,3 +271,22 @@ coverage: check @lcov --capture --no-external --directory src -q --output-file coverage.info @genhtml coverage.info --output-directory coverage -q endif + + +release: + $(MAKE) dist + $(MAKE) dist-bzip2 + $(MAKE) dist-xz + +test-release: release + @touch testbuild-$(PACKAGE_VERSION).log && ln -sf testbuild-$(PACKAGE_VERSION).log testbuild.log + @mkdir -p test-release && cp $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.* test-release && pushd test-release && \ + tar xJf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.xz && pushd $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) && ./testbuild.sh && popd && rm -rf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) && \ + tar xjf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 && pushd $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) && ./testbuild.sh && popd && rm -rf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) && \ + tar xzf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz && pushd $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) && ./testbuild.sh && popd && rm -rf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) && \ + echo "Success" && popd + +docs: + @doxygen -q + +.PHONY: docs test-release diff --git a/testbuild.sh b/testbuild.sh new file mode 100755 index 0000000..16ec428 --- /dev/null +++ b/testbuild.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +logfile="../../testbuild.log" + +err_out() { + tail $logfile + exit 1 +} + +./bootstrap.sh +./configure >> $logfile || err_out +make -j$(( `nproc` * 2 + 1 )) >> $logfile || err_out +make check >> $logfile || err_out