-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
111 lines (88 loc) · 3.65 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Copyright (c) 2005-2010 Andre Merzky <[email protected]>
#
# 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 stage/
@$(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::
@$(ECHO) " ======================================================"
@$(ECHO) " === make install to $(SAGA_LOCATION) was successful"
@$(ECHO) " ======================================================"
# directory dependencies
saga: external
adaptors: saga
lite: adaptors
bindings: adaptors
test: adaptors
examples: adaptors
tools: adaptors
docs: adaptors