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

Last change on this file since 597 was 595, checked in by rybkin, 13 years ago

See C.L. 472

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