# Copyright (c) 2005-2010 Andre Merzky # # Distributed under the Boost Software License, Version 1.0 # See LICENSE file or http://www.boost.org/LICENSE_1_0.txt SAGA_ROOT = $(shell pwd) SAGA_CONFIGURED = $(shell test -e config.status && echo yes || echo no) include $(SAGA_ROOT)/make/saga.util.mk SAGA_SUBDIRS = config make external saga adaptors ifeq "$(SAGA_BOOST_HAVE_TEST)" "yes" ifdef SAGA_IS_CHECKING SAGA_SUBDIRS += test endif else ifdef SAGA_IS_CLEANING SAGA_SUBDIRS += test else # $(warning "skipping tests - BOOST_TEST is missing") endif endif SAGA_SUBDIRS += examples tools docs include $(SAGA_ROOT)/make/saga.mk include $(SAGA_ROOT)/make/saga.dist.mk srcdist:: @test -d docs/apidocs/html || \ ( $(ECHO) "" ; \ $(ECHO) " ############################################################"; \ $(ECHO) " ## API Documentation has not been generated! The tarball ##"; \ $(ECHO) " ## generated by 'make srcdist' doesn't contain any ##"; \ $(ECHO) " ## documentation! ##"; \ $(ECHO) " ## ##"; \ $(ECHO) " ## To generate the API documentation, call 'make apidoc' ##"; \ $(ECHO) " ## in the docs/apidocs directory! ##"; \ $(ECHO) " ## ##"; \ $(ECHO) " ############################################################"; \ $(ECHO) "" ; ) .PHONY: apidoc apidoc:: @$(MAKE) -C docs apidoc .PHONY: doc doc: @$(MAKE) -C docs doc stats: @cd saga && kloc -gs -d @sloccount saga 2>>/dev/null distclean:: @$(RM) -r doc/doxygen/ doc/doxygen.*.conf doxygen.*.log @$(RM) Makefile.ok clean:: @$(RM) $(SAGA_ROOT)/.saga_check_failed packages: @./configure --prefix=`pwd`/usr @$(MAKE) install @tar zcvf libsaga++-$(SAGA_VERSION).tgz usr/ @sudo alien -to-deb libsaga++-$(SAGA_VERSION).tgz @sudo alien -to-rpm libsaga++-$(SAGA_VERSION).tgz @sudo alien -to-slp libsaga++-$(SAGA_VERSION).tgz @sudo alien -to-pkg libsaga++-$(SAGA_VERSION).tgz @$(RM) -r ./usr/ # make check is considered to have failed if any test left a .nok file behind. # this assumes, of course, that tests are run before we reach the target below. # So, make sure saga.mk is included before, so that subdirs traversal is defined # before we reach this. check:: @if ! $(TEST) `$(FIND) . -name \*.nok -print | wc -l | sed -e "s/ //g"` = '0'; then \ $(ECHO) " ======================================================" ; \ $(ECHO) " === some unit test failed" ; \ $(ECHO) " ======================================================" ; \ $(FALSE) ; fi all:: @$(ECHO) " ======================================================" @$(ECHO) " === make was successful" $(TYPE_INSTALL) ifeq "$(filter-out all,$(MAKECMDGOALS))" "" @$(ECHO) " === you can type 'make install'" endif @$(ECHO) " ======================================================" install:: @$(INSTALL) PACKAGE share/saga/ @$(INSTALL) config.summary share/saga/ @$(ECHO) " ======================================================" @$(ECHO) " === make install to $(SAGA_LOCATION) was successful" @$(ECHO) " ======================================================" uninstall:: @$(UNINSTALL) @$(ECHO) " ======================================================" @$(ECHO) " === SAGA uninstalled from $(SAGA_LOCATION)" @$(ECHO) " ======================================================" # directory dependencies saga: external adaptors: saga lite: adaptors bindings: adaptors test: adaptors examples: adaptors tools: adaptors docs: adaptors