-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
167 lines (138 loc) · 6.32 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# $Id: Makefile 22698 2010-11-11 21:27:55Z kanschat $
#
# Makefile for the whole library
SHELL=/bin/bash
help:
@echo "========================================================================"
@echo "= Global Makefile for the deal.II libraries ="
@echo "========================================================================"
@echo "= ="
@echo "= The following targets exist: ="
@echo "= all : debug and optimized libraries ="
@echo "= debug : the debug version of the deal.II library ="
@echo "= optimized : the optimized version of the deal.II library ="
@echo "= ="
@echo "= contrib : additional libraries in contrib, if there are any ="
@echo "= ="
@echo "= online-doc : generate the documentation in HTML format ="
@echo "= TODO : create a \"TODO\" file from the source files ="
@echo "= TAGS : create a TAGS file from include and source files ="
@echo "= ="
@echo "= clean : removes all object files in subdirs ="
@echo "= distclean : removes all object files, libraries, etc in subdirs ="
@echo "========================================================================"
deps:
@cd common/scripts && $(MAKE) $(MAKEOPTIONS)
@cd source && if $(MAKE) $(MAKEOPTIONS) Makefile.dep;\
then : ;\
else rm Makefile.dep && $(MAKE) $(MAKEOPTIONS) Makefile.dep; fi
@cd lib && $(MAKE) $(MAKEOPTIONS) external-links
all: debug optimized
debug: deps contrib
@cd source && $(MAKE) debug
optimized: deps contrib
@cd source && $(MAKE) optimized
contrib:
@cd contrib && $(MAKE)
online-doc doc:
cd doc && $(MAKE)
@echo
@echo
@echo =======================================================
@echo "The online documentation can now be accessed through"
@echo " doc/index.html"
@echo =======================================================
@echo
@echo
TODO:
@egrep -i '// *todo' include/deal.II/*/*.h source/*/*.cc \
| perl common/scripts/make_todo.pl > $@
TAGS:
@cd common ; etags --language=c++ \
../include/deal.II/*/*.h ../source/*/*.cc \
../examples/*/*.cc ; \
perl -pi -e 's/ \* .*//g; s&[\t]*/\*.*&&g; s&[\t]*\*/.*&&g;' TAGS
clean: clean-contrib clean-source \
clean-doc clean-examples clean-lib clean-tests
-rm -f TODO common/TAGS
clean-contrib:
@cd contrib && $(MAKE) clean
clean-source:
@cd source && $(MAKE) CLEAN=yes clean
clean-doc:
@cd doc && $(MAKE) CLEAN=yes clean
clean-examples:
@cd examples && $(MAKE) CLEAN=yes clean
clean-lib:
@cd lib && $(MAKE) CLEAN=yes clean
# if that directory exists, go into 'tests' and clean up there as well
clean-tests:
@-cd tests && $(MAKE) clean
clean-common-scripts:
@cd common/scripts && $(MAKE) clean
distclean: clean
@cd lib && $(MAKE) distclean
@-cd tests && $(MAKE) distclean
@-rm source/*/*.inst
@$(MAKE) clean-common-scripts
# #############################################################################
# targets for build tests. these targets are supposed to be called for regular
# build tests that send their results back home to our build test server. note
# that this target is supposed to be called right after checking out a version
# from our CVS server, so at this time, common/Make.global_options doesn't
# exist yet (and isn't included at the top of this file, due to a
# conditional), and we first have to set up all this stuff.
#
# the way this target works is that it first generates a bunch of lines for
# the output file that will ultimately be sent home. it then calls ./configure
# and stashes away both the output and the return value. if ./configure
# succeeds, we extract a little more information concluding the
# header. irrespective of this, we then append the output of ./configure to
# the log file. if the call to ./configure failed, we send the result back
# home and exit.
#
# if ./configure succeeded, we then go on to the build-test-do target, which
# actually compiles something, and when we come back from there we send the
# whole thing over to the server
build-test:
echo AUTOMATED DEAL.II BUILD TEST | tee build-test-log
-(./configure $(BUILDTESTFLAGS) 2>&1) > build-test-config
echo BEGIN HEADER `date -u '+%Y-%m-%d %T'` | tee -a build-test-log
(cd common ; $(MAKE) BUILDTEST=yes -f Make.global_options print-summary) | tee -a build-test-log
echo END HEADER `date -u '+%Y-%m-%d %T'` | tee -a build-test-log
echo | tee -a build-test-log
echo BEGIN CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'` | tee -a build-test-log
cat build-test-config | tee -a build-test-log
echo END CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'` | tee -a build-test-log
echo | tee -a build-test-log
-$(MAKE) BUILDTEST= build-test-do 2>&1 | tee -a build-test-log
# target to do the actual compilation tests for an automated build test. build
# the library, the example programs, and the doxygen example programs. if the
# testsuite has been checked out, run that, too, and send the results to the
# testsuite server
build-test-do:
@echo BEGIN MAKE LIB OUTPUT `date -u '+%Y-%m-%d %T'`
$(MAKE) all
@echo END MAKE LIB OUTPUT `date -u '+%Y-%m-%d %T'`
@echo
@echo BEGIN MAKE EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`
cd examples ; $(MAKE)
@echo END MAKE EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`
@echo
@echo BEGIN MAKE RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`
cd examples/doxygen ; $(MAKE) run
@echo END MAKE RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`
@echo
@echo BUILD TEST SUCCESSFUL `date -u '+%Y-%m-%d %T'`
.PHONY: all \
online-doc doc printable-doc tex-doc contrib \
clean clean-contrib clean-base clean-lac clean-dealII \
clean-doc clean-examples clean-lib clean-tests clean-common-scripts \
distclean \
build-test build-test-do \
TAGS TODO
# mark the following two as phony since they mark two actual files but
# we don't want to list the full dependencies here. let the sub-makefiles
# do that
.PHONY: common/scripts/make_dependencies \
common/scripts/expand_instantiations