add some new make targets

* `release` creates the tarballs
* `test-release` takes the tarballs, extracts them, builds the library
  and tests and runs the tests
* `docs` run doxygen

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2022-01-31 15:35:52 +01:00
parent 6a052ed0fc
commit f693efd532
3 changed files with 35 additions and 0 deletions

2
.gitignore vendored
View File

@@ -43,6 +43,8 @@ examples/register
examples/roster
examples/uuid
examples/vcard
testbuild*.log
test-release/
test_stamp
test-suite.log
tests/*.o

View File

@@ -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

13
testbuild.sh Executable file
View File

@@ -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