ext/xlsxwriter/libxlsxwriter/Makefile in xlsxwriter-0.0.3 vs ext/xlsxwriter/libxlsxwriter/Makefile in xlsxwriter-0.0.4.pre.2

- old
+ new

@@ -9,15 +9,19 @@ Q=@ ifdef V Q= endif +INSTALL_DIR ?= /usr/local + .PHONY: docs tags examples # Build the libs. all : +ifndef USE_SYSTEM_MINIZIP $(Q)$(MAKE) -C third_party/minizip +endif ifndef USE_STANDARD_TMPFILE $(Q)$(MAKE) -C third_party/tmpfileplus endif $(Q)$(MAKE) -C src @@ -29,31 +33,41 @@ clean : $(Q)$(MAKE) clean -C src $(Q)$(MAKE) clean -C test/unit $(Q)$(MAKE) clean -C test/functional/src $(Q)$(MAKE) clean -C examples - $(Q)$(MAKE) clean -C third_party/minizip $(Q)rm -rf docs/html $(Q)rm -rf test/functional/__pycache__ $(Q)rm -f test/functional/*.pyc $(Q)rm -f lib/* ifndef USE_STANDARD_TMPFILE + $(Q)$(MAKE) clean -C third_party/minizip +endif +ifndef USE_STANDARD_TMPFILE $(Q)$(MAKE) clean -C third_party/tmpfileplus endif # Run the unit tests. test : all test_functional test_unit +# Test for C++ const correctness on APIs. +test_const : all + $(Q)$(MAKE) clean -C test/functional/src + $(Q)! $(MAKE) -C test/functional/src CFLAGS=-Wwrite-strings 2>&1 | grep -A 1 "note:" + + # Run the functional tests. test_functional : all $(Q)$(MAKE) -C test/functional/src $(Q)py.test test/functional -v # Run all tests. test_unit : @echo "Compiling unit tests ..." +ifndef USE_SYSTEM_MINIZIP $(Q)$(MAKE) -C third_party/minizip +endif ifndef USE_STANDARD_TMPFILE $(Q)$(MAKE) -C third_party/tmpfileplus endif $(Q)$(MAKE) -C src test_lib $(Q)$(MAKE) -C test/unit test @@ -81,31 +95,52 @@ doc: docs docs: $(Q)$(MAKE) -C docs # Simple minded install. -install: - $(Q)cp -r include/* /usr/include - $(Q)cp lib/* /usr/lib +install: all + $(Q)mkdir -p $(INSTALL_DIR)/include + $(Q)cp -R include/* $(INSTALL_DIR)/include + $(Q)mkdir -p $(INSTALL_DIR)/lib + $(Q)cp lib/* $(INSTALL_DIR)/lib # Simpler minded uninstall. uninstall: - $(Q)rm -rf /usr/include/xlsxwriter* - $(Q)rm /usr/lib/libxlsxwriter.* + $(Q)rm -rf $(INSTALL_DIR)/include/xlsxwriter* + $(Q)rm $(INSTALL_DIR)/lib/libxlsxwriter.* # Strip the lib files. strip: $(Q)strip lib/* # Run a coverity static analysis. coverity: +ifndef USE_SYSTEM_MINIZIP $(Q)$(MAKE) -C third_party/minizip +endif +ifndef USE_STANDARD_TMPFILE + $(Q)$(MAKE) -C third_party/tmpfileplus +endif $(Q)$(MAKE) -C src clean $(Q)rm -f lib/* $(Q)rm -rf cov-int $(Q)rm -f libxlsxwriter-coverity.tgz - $(Q)../cov-analysis-macosx-7.7.0.4/bin/cov-build --dir cov-int make -C src libxlsxwriter.a + $(Q)../../cov-analysis-linux64-8.7.0/bin/cov-build --dir cov-int make -C src libxlsxwriter.a $(Q)tar -czf libxlsxwriter-coverity.tgz cov-int + $(Q)$(MAKE) -C src clean + $(Q)rm -f lib/* + +# Run a scan-build static analysis. +scan_build: +ifndef USE_SYSTEM_MINIZIP + $(Q)$(MAKE) -C third_party/minizip +endif +ifndef USE_STANDARD_TMPFILE + $(Q)$(MAKE) -C third_party/tmpfileplus +endif + $(Q)$(MAKE) -C src clean + $(Q)rm -f lib/* + $(Q)scan-build make -C src libxlsxwriter.a $(Q)$(MAKE) -C src clean $(Q)rm -f lib/* spellcheck: $(Q)for f in docs/src/*.dox; do aspell --lang=en_US --check $$f; done