#----------------------------------------------------------- # Copyright Christian Arnault LAL-Orsay CNRS # arnault@lal.in2p3.fr # See the complete license in cmt_license.txt "http://www.cecill.info". #----------------------------------------------------------- !include $(CMTROOT)/src/NMakefile.core # # Basic tag management # !if defined (tag) CMTEXTRATAGS = $(tag) !else !if defined (CMTCONFIG) tag = $(CMTCONFIG) !else tag = VisualC !endif !endif tags = $(tag),$(CMTEXTRATAGS) # # Generic entry points for all targets # #build_strategy = rebuild_makefiles #build_dependencies = echo all :: ; #check_config :: # @$(cmtexe) check configuration #configclean :: # del *nmake* setup.* cleanup.* !if "$(CMTBCAST)" == "" binclean :: $(echo) (NMakefile.header) Removing binary directory $(bin) $(cleanup_silent)if not "$(bin)"==".\" (if exist $(bin) rmdir /S /Q $(bin)) # @del /Q $(bin)\* !endif #help :: dirs help :: !if "$(CMTBCAST)" == "" @echo -------------------------------------------------------------------------- @echo You may select one of the following make targets : @echo. @echo help : this help @echo all : rebuild everything according to the $$(constituents) macro @echo (this is the default target) @echo clean : remove everything that can be rebuilt # @echo configclean : remove configuration files (*.nmake) @echo binclean : fast erase of the binary directory @echo uninstall : remove everything installed in the installation area @echo. @for /F "usebackq" %%i in (`$(cmtexe) show groups -tag^=$(tags)`) do \ @echo %%i : rebuild all constituents of group %%i @echo Constituents: & \ for /F "usebackq" %%i in (`$(cmtexe) show constituent_names -tag^=$(tags)`) do \ @echo %%i %%iclean %%iuninstall @echo. @echo check : @echo run all applications defined with the -check option @echo. # @echo everywhere [target=...] : # @echo o Rebuild on all plateforms specified in the $$(everywhere) macro # @echo o Use "cmt show macro everywhere -tag=" to check it # @echo o The "target" option permits to transmit a target to the remote site @echo To switch to BCAST mode, set CMTBCAST to non-empty string. !else @echo Targets for BCAST mode: @echo. @echo help : this help !if "$(BCAST_ONLY)" == "" !if "$(BCAST_GLOBAL)" == "" @echo all : (re)build all used packages in current project (this is default target) !else @echo all : (re)build all used packages in all projects (this is default target) !endif !else @echo all : (re)build current package (this is default target) !endif @echo clean : remove everything that can be rebuilt @echo binclean : fast erase of binary directories (and installation area) @echo uninstall : remove everything installed in the installation area @echo check : run all applications defined with the -check option @echo. !if "$(BCAST_ONLY)" == "" @echo ... with dependencies packages (may be ignored by setting BCAST_ONLY). !else @echo ... without dependencies packages (may be included by unsetting BCAST_ONLY). !endif @echo. !if "$(BCAST_GLOBAL)" == "" @echo To (re)build packages in all projects, set BCAST_GLOBAL. !else @echo To (re)build packages in current project, unset BCAST_GLOBAL. !endif !if "$(NO_ALL_GROUPS)" == "" @echo To (re)build default group only, set NO_ALL_GROUPS. !if "$(CMTACTIONS)" == "" @echo To also (re)build cmt_actions group, set CMTACTIONS. !endif !else @echo To (re)build all groups, unset NO_ALL_GROUPS. !endif @echo. @echo To switch to PACKAGE mode, unset CMTBCAST. !endif !if "$(NO_ALL_GROUPS)" == "" !if "$(CMTACTIONS)" == "" _groups = all groups except cmt_actions !else _groups = all groups !endif !else _groups = default group !endif cmt_local_tagfile = $(bin)$(tag).nmake cmt_broadcast_tagfile = $(bin)$(tag)_broadcast.nmake cmt_constituents_makefile = $(bin)constituents.nmake cmt_broadcast_makefile = $(bin)broadcast.nmake #!if "$(CMTBCAST)" != "" #QUICK = 1 #!endif !if "$(QUICK)" != "" !if "$(CMTBCAST)" == "" !if exist ($(cmt_local_tagfile)) cmt_included = 1 !include $(cmt_local_tagfile) !endif !else !if exist ($(cmt_broadcast_tagfile)) cmt_included = 1 !include $(cmt_broadcast_tagfile) !endif !endif !endif !if "$(QUICK)" == "" $(cmt_constituents_makefile) :: !else $(cmt_local_tagfile) $(cmt_constituents_makefile) : $(use_requirements) !endif $(echo) (NMakefile.header) Rebuilding $@ @if not exist "$(@D)" mkdir "$(@D)" @$(cmtexe) -tag=$(tags) build constituents_config -out=$(cmt_constituents_makefile) !if "$(QUICK)" == "" $(cmt_broadcast_makefile) :: !else $(cmt_broadcast_tagfile) $(cmt_broadcast_makefile) : $(use_requirements) !endif $(echo) (NMakefile.header) Rebuilding $@ @if not exist "$(@D)" mkdir "$(@D)" @$(cmtexe) -tag=$(tags) build broadcast_config -out=$(cmt_broadcast_makefile) !if "$(cmt_config)" == "" !if "$(CMTBCAST)" == "" #!if "$(cmt_config)" == "" !if [$(MAKE) /nologo /f NMake /$(MAKEFLAGS) cmt_config=1 $(cmt_constituents_makefile)] != 0 !error (NMakefile.header) Cannot rebuild $(cmt_constituents_makefile) !endif #!endif !else #!if "$(cmt_config)" == "" !if [$(MAKE) /nologo /f NMake /$(MAKEFLAGS) cmt_config=1 $(cmt_broadcast_makefile)] != 0 !error (NMakefile.header) Cannot rebuild $(cmt_broadcast_makefile) !endif #!endif !endif !endif !if "$(cmt_config)" == "" !if "$(CMTBCAST)" == "" #!if exist ($(cmt_constituents_makefile)) !include $(cmt_constituents_makefile) #!endif !else #!if "$(cmt_config)" == "" #!undef CMTBCAST CMTBCAST = !include $(cmt_broadcast_makefile) #!endif !endif !endif