source: CMT/HEAD/src/NMakefile.header @ 663

Last change on this file since 663 was 663, checked in by rybkin, 10 years ago

See C.L. 522

  • Property svn:eol-style set to native
File size: 5.6 KB
Line 
1#-----------------------------------------------------------
2# Copyright Christian Arnault LAL-Orsay CNRS
3# arnault@lal.in2p3.fr
4# Modified by Grigory Rybkin
5# See the complete license in cmt_license.txt "http://www.cecill.info".
6#-----------------------------------------------------------
7
8!include $(CMTROOT)/src/NMakefile.core
9
10#
11#  Basic tag management
12#
13!if defined (tag)
14CMTEXTRATAGS = $(tag)
15!else
16!if defined (CMTCONFIG)
17tag = $(CMTCONFIG)
18!else
19tag = VisualC
20!endif
21!endif
22
23tags      = $(tag),$(CMTEXTRATAGS)
24
25#
26#  Generic entry points for all targets
27#
28#build_strategy = rebuild_makefiles
29#build_dependencies = echo
30
31all :: ;
32
33#check_config ::
34#       @$(cmtexe) check configuration
35
36#configclean ::
37#       del *nmake* setup.* cleanup.*
38
39!if "$(CMTBCAST)" == ""
40binclean ::
41        $(echo) (NMakefile.header) Removing binary directory $(bin)
42        $(cleanup_silent)if not "$(bin)"==".\" (if exist $(bin) rmdir /S /Q $(bin))
43#       @del /Q $(bin)\*
44!endif
45
46#help :: dirs
47help ::
48!if "$(CMTBCAST)" == ""
49        @echo --------------------------------------------------------------------------
50        @echo You may select one of the following make targets :
51        @echo.
52        @echo help        : this help
53        @echo all         : rebuild everything according to the $$(constituents) macro
54        @echo               (this is the default target)
55        @echo clean       : remove everything that can be rebuilt
56#       @echo configclean : remove configuration files (*.nmake)
57        @echo binclean    : fast erase of the binary directory
58        @echo uninstall   : remove everything installed in the installation area
59        @echo.
60        @for /F "usebackq" %%i in (`$(cmtexe) show groups -tag^=$(tags)`) do \
61          @echo %%i : rebuild all constituents of group %%i
62        @echo Constituents: & \
63          for /F "usebackq" %%i in (`$(cmtexe) show constituent_names -tag^=$(tags)`) do \
64            @echo   %%i  %%iclean  %%iuninstall
65        @echo.
66        @echo check :
67        @echo               run all applications defined with the -check option
68        @echo.
69#       @echo everywhere [target=...] :
70#       @echo               o Rebuild on all plateforms specified in the $$(everywhere) macro
71#       @echo               o Use "cmt show macro everywhere -tag=<site>" to check it
72#       @echo               o The "target" option permits to transmit a target to the remote site
73        @echo To switch to BCAST mode, set CMTBCAST to non-empty string.
74!else
75        @echo Targets for BCAST mode:
76        @echo.
77        @echo help        : this help
78!if "$(BCAST_ONLY)" == ""
79!if "$(BCAST_GLOBAL)" == ""
80        @echo all         : (re)build all used packages in current project (this is default target)
81!else
82        @echo all         : (re)build all used packages in all projects (this is default target)
83!endif
84!else
85        @echo all         : (re)build current package (this is default target)
86!endif
87        @echo clean       : remove everything that can be rebuilt
88        @echo binclean    : fast erase of binary directories (and installation area)
89        @echo uninstall   : remove everything installed in the installation area
90        @echo check       : run all applications defined with the -check option
91        @echo.
92!if "$(BCAST_ONLY)" == ""
93        @echo    ... with dependencies packages (may be ignored by setting BCAST_ONLY).
94!else
95        @echo    ... without dependencies packages (may be included by unsetting BCAST_ONLY).
96!endif
97        @echo.
98!if "$(BCAST_GLOBAL)" == ""
99        @echo To (re)build packages in all projects, set BCAST_GLOBAL.
100!else
101        @echo To (re)build packages in current project, unset BCAST_GLOBAL.
102!endif
103!if "$(NO_ALL_GROUPS)" == ""
104        @echo To (re)build default group only, set NO_ALL_GROUPS.
105!if "$(CMTACTIONS)" == ""
106        @echo To also (re)build cmt_actions group, set CMTACTIONS.
107!endif
108!else
109        @echo To (re)build all groups, unset NO_ALL_GROUPS.
110!endif
111        @echo.
112        @echo To switch to PACKAGE mode, unset CMTBCAST.
113!endif
114
115!if "$(NO_ALL_GROUPS)" == ""
116!if "$(CMTACTIONS)" == ""
117_groups = all groups except cmt_actions
118!else
119_groups = all groups
120!endif
121!else
122_groups = default group
123!endif
124
125cmt_local_tagfile = $(bin)$(tag).nmake
126cmt_broadcast_tagfile = $(bin)$(tag)_broadcast.nmake
127
128cmt_constituents_makefile = $(bin)constituents.nmake
129cmt_broadcast_makefile = $(bin)broadcast.nmake
130
131#!if "$(CMTBCAST)" != ""
132#QUICK = 1
133#!endif
134
135!if "$(QUICK)" != ""
136!if "$(CMTBCAST)" == ""
137
138!if exist ($(cmt_local_tagfile))
139cmt_included = 1
140!include $(cmt_local_tagfile)
141!endif
142
143!else
144
145!if exist ($(cmt_broadcast_tagfile))
146cmt_included = 1
147!include $(cmt_broadcast_tagfile)
148!endif
149
150!endif
151!endif
152
153!if "$(QUICK)" == ""
154$(cmt_constituents_makefile) ::
155!else
156$(cmt_local_tagfile) $(cmt_constituents_makefile) : $(use_requirements)
157!endif
158        $(echo) (NMakefile.header) Rebuilding $@
159        @if not exist "$(@D)" mkdir "$(@D)"
160        @$(cmtexe) -tag=$(tags) build constituents_config -out=$(cmt_constituents_makefile)
161
162!if "$(QUICK)" == ""
163$(cmt_broadcast_makefile) ::
164!else
165$(cmt_broadcast_tagfile) $(cmt_broadcast_makefile) : $(use_requirements)
166!endif
167        $(echo) (NMakefile.header) Rebuilding $@
168        @if not exist "$(@D)" mkdir "$(@D)"
169        @$(cmtexe) -tag=$(tags) build broadcast_config -out=$(cmt_broadcast_makefile)
170
171!if "$(cmt_config)" == ""
172!if "$(CMTBCAST)" == ""
173
174#!if "$(cmt_config)" == ""
175!if [$(MAKE) /nologo /f NMake /$(MAKEFLAGS) cmt_config=1 $(cmt_constituents_makefile)] != 0
176!error (NMakefile.header) Cannot rebuild $(cmt_constituents_makefile)
177!endif
178#!endif
179
180!else
181
182#!if "$(cmt_config)" == ""
183!if [$(MAKE) /nologo /f NMake /$(MAKEFLAGS) cmt_config=1 $(cmt_broadcast_makefile)] != 0
184!error (NMakefile.header) Cannot rebuild $(cmt_broadcast_makefile)
185!endif
186#!endif
187
188!endif
189!endif
190
191!if "$(cmt_config)" == ""
192!if "$(CMTBCAST)" == ""
193
194#!if exist ($(cmt_constituents_makefile))
195!include $(cmt_constituents_makefile)
196#!endif
197
198!else
199
200#!if "$(cmt_config)" == ""
201#!undef CMTBCAST
202CMTBCAST =
203!include $(cmt_broadcast_makefile)
204#!endif
205
206!endif
207!endif
Note: See TracBrowser for help on using the repository browser.