source: CMT/v1r10p20011126/src/Makefile.header @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

File size: 5.3 KB
Line 
1
2cflags    = $(CFLAGS)
3cppflags  = $(CFLAGS)
4fflags    = $(CFLAGS)
5
6cc        = cc
7ccomp     = $(cc)  -c -I$(inc) $(cflags)
8clink     = $(cc)
9
10cpp       = g++
11cppcomp   = $(cpp) -c -I$(inc) $(cppflags)
12cpplink   = $(cpp)
13
14for       = f77
15fcomp     = $(for) -c -I$(inc) $(fflags)
16flink     = $(for)
17
18lexflags  =
19lex       = lex $(lexflags)
20
21yaccflags =
22yacc      = yacc $(yaccflags)
23
24mkdir     = mkdir
25
26comp      = $(ccomp)
27link      = $(cc)
28
29ar        = ar -crl
30ranlib    = ranlib
31
32tag       = $(CMTCONFIG)
33tags      = $(CMTEXTRATAGS)
34
35src       = ../src/
36inc       = ../src/
37mgr       = ../mgr/
38cmt       = ../cmt/
39bin       = ../$(tag)/
40
41build_strategy = rebuild_makefiles
42build_dependencies = echo
43
44
45#---------------------------------------------
46# Controlling the verbosity of Make
47#
48
49ifdef QUIET
50LEX_QUIET = 1
51YACC_QUIET = 1
52C_QUIET = 1
53CPP_QUIET = 1
54FORTRAN_QUIET = 1
55JAVA_QUIET = 1
56LINK_QUIET = 1
57LIB_QUIET = 1
58CLEANUP_QUIET = 1
59silent = @
60echo = @/bin/echo
61else
62silent =
63echo = @- echo
64endif
65
66ifdef LEX_QUIET
67lex_silent = @
68lex_echo = @/bin/echo rebuilding
69else
70lex_silent =
71lex_echo = $(echo)
72endif
73
74ifdef YACC_QUIET
75yacc_silent = @
76yacc_echo = @/bin/echo rebuilding
77else
78yacc_silent =
79yacc_echo = $(echo)
80endif
81
82ifdef C_QUIET
83c_silent = @
84c_echo = @/bin/echo rebuilding
85else
86c_silent =
87c_echo = $(echo)
88endif
89
90ifdef CPP_QUIET
91cpp_silent = @
92cpp_echo = @/bin/echo rebuilding
93else
94cpp_silent =
95cpp_echo = $(echo)
96endif
97
98ifdef FORTRAN_QUIET
99fortran_silent = @
100fortran_echo = @/bin/echo rebuilding
101else
102fortran_silent =
103fortran_echo = $(echo)
104endif
105
106ifdef JAVA_QUIET
107java_silent = @
108java_echo = @/bin/echo rebuilding
109else
110java_silent =
111java_echo = $(echo)
112endif
113
114ifdef LINK_QUIET
115link_silent = @
116link_echo = @/bin/echo rebuilding
117else
118link_silent =
119link_echo = $(echo)
120endif
121
122ifdef LIB_QUIET
123lib_silent = @
124lib_echo = @/bin/echo rebuilding
125else
126lib_silent =
127lib_echo = $(echo)
128endif
129
130ifdef CLEANUP_QUIET
131cleanup_silent = @
132cleanup_echo = @/bin/echo removing
133else
134cleanup_silent =
135cleanup_echo = $(echo)
136endif
137
138cmtexe = $(CMTROOT)/$(CMTBIN)/cmt.exe
139
140SHELL     = /bin/sh
141
142all :: setup.make checkuses
143
144##      @if [ ! "`${CMTROOT}/mgr/cmt show uses | grep 'found'`" = "" ] ; then \
145
146checkuses :
147        @if test "$(build_strategy)" = "rebuild_makefiles"; then \
148          echo "Checking configuration"; \
149          a=`${CMTROOT}/mgr/cmt show strategies | grep keep_makefiles`; \
150          if test "$${a}" = ""; then \
151            /bin/rm -f constituents.make setup.make $(tag).make; \
152          fi; \
153          $(cmtexe) check configuration -tag=$(tags); \
154          touch checkuses; \
155        fi
156
157dirs :: checkuses
158        @if test ! -r requirements ; then echo "No requirements file" ; fi; \
159          if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi; \
160          /bin/rm -f checkuses
161
162javadirs ::
163        @if test ! -d $(javabin) ; then $(mkdir) -p $(javabin) ; fi
164
165srcdirs ::
166        @if test ! -d $(src) ; then $(mkdir) -p $(src) ; fi
167
168cmt_path.make :: checkuses
169        @if test ! -f cmt_path.make -o "$(build_strategy)" = "rebuild_makefiles"; then \
170          echo "Rebuilding $@"; \
171          a=`$(cmtexe) show path -tag=$(tags) -quiet`; \
172          b=`$(cmtexe) show tags -tag=$(tags) -quiet`; \
173          /bin/rm -f cmt_path.make; \
174          echo '#'$${a} >cmt_path.make; \
175          echo '#'$${b} >>cmt_path.make; \
176        fi
177
178###       $(cmtexe) check_files cmt_path.make.tmp cmt_path.make;
179
180-include cmt_path.make
181
182setup.make : cmt_path.make requirements # $(CMTROOT)/mgr/cmt
183        @if test ! -f setup.make -o "$(build_strategy)" = "rebuild_makefiles"; then \
184          echo "Rebuilding $@"; \
185          $(cmtexe) build make_setup -quiet -tag=$(tags) ; \
186        fi
187
188-include setup.make
189
190$(gmake_hosts) ::
191        rsh $@ "sh -c '(cd `$(cmtexe) show pwd -quiet`; . setup.sh; gmake $(MAKEFLAGS) $(target))'"
192
193$(make_hosts) ::
194        rsh $@ "sh -c '(cd `$(cmtexe) show pwd`; . setup.sh; make $(MAKEFLAGS) $(target))'"
195
196everywhere :: $(everywhere)
197
198clean :: checkuses
199
200##      @echo clean done
201
202check ::
203        @echo check done
204
205help :: dirs setup.make
206        @echo '--------------------------------------------------------------------------'
207        @echo 'You may select one of the following make targets :'
208        @echo ' '
209        @echo 'help        : this help'
210        @echo 'all         : rebuild everything according to the $$(constituents) macro'
211        @echo '              (this is the default target)'
212        @echo 'clean       : remove everything that can be rebuilt'
213        @echo 'makefilesclean : remove configuration files (*.make)'
214        @echo ' '
215        @groups=`$(cmtexe) show groups -tag=$(tags)`; \
216          echo "all $${groups} : "
217        @echo '              rebuild all constituents of one of these groups'
218        @echo ' '
219        @all=""; \
220          for c in `$(cmtexe) show constituent_names -tag=$(tags)` ; do \
221            if test ! "$${all}" = ""; then all="$${all} "; fi; \
222            all="$${all}$${c}" ; \
223          done; \
224          echo "$${all} : "
225        @echo '              rebuild one of these constituents'
226        @echo ' '
227        @echo 'check :'
228        @echo '              run all applications defined with the -check option'
229        @echo ' '
230        @echo 'everywhere [target=...] : '
231        @echo '              o Rebuild on all plateforms specified in the $$(everywhere) macro'
232        @echo '              o Use "cmt show macro everywhere -tag=<site>" to check it'
233        @echo '              o The "target" option permits to transmit a target to the remote site'
234
235always ::
236
237.DEFAULT ::
238        @echo "No action for $@"
239
Note: See TracBrowser for help on using the repository browser.