source: CMT/HEAD/mgr/fragments/nmake/constituent_lock @ 595

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

See C.L. 472

File size: 7.3 KB
Line 
1#-- start of constituent_lock ------
2
3cmt_${CONSTITUENT}_${HASTARGETTAG} = 1
4
5#--------------------------------------------------------
6
7!if defined (cmt_${CONSTITUENT}_has_target_tag)
8
9#cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag)_${CONSTITUENT}.nmake
10cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.nmake
11cmt_local_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.nmake.tmp
12cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.nmake
13#cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}_${CONSTITUENT}_setup.nmake
14cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.nmake
15
16${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT}
17
18#!if [if not exist $(bin) mkdir $(bin)] == 0
19#!endif
20
21#!if "$(QUICK)" == "" || !exist ($(cmt_local_tagfile_${CONSTITUENT}))
22
23#!if [$(echo) (constituents.nmake) Rebuilding $(cmt_local_tagfile_${CONSTITUENT})] == 0
24#!endif
25#!if [cmt -tag=$(tags) $(${CONSTITUENT}_extratags) build tag_makefile >$(cmt_local_tagfile_${CONSTITUENT})] == 0
26#!endif
27
28#!if [$(echo) (constituents.nmake) Rebuilding $(cmt_final_setup_${CONSTITUENT})] == 0
29#!endif
30#!if [$(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) show setup >$(cmt_local_setup_${CONSTITUENT})] == 0
31#!endif
32
33#!if exist ($(cmt_final_setup_${CONSTITUENT})) && [ echo n|comp $(cmt_final_setup_${CONSTITUENT}) $(cmt_local_setup_${CONSTITUENT}) >nul 2>&1 ] == 0
34#!if [ del $(cmt_local_setup_${CONSTITUENT}) ] == 0
35#!endif
36#!else
37#!if [ move /y $(cmt_local_setup_${CONSTITUENT}) $(cmt_final_setup_${CONSTITUENT}) >nul ] == 0
38#!endif
39#!endif
40
41#!endif
42
43!else
44
45#cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag).nmake
46cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).nmake
47#cmt_local_setup_${CONSTITUENT} = $(bin)setup.nmake.tmp
48cmt_final_setup_${CONSTITUENT} = $(bin)setup.nmake
49#cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}_setup.nmake
50cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.nmake
51
52!endif
53
54#!if "$(QUICK)" == ""
55#$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT})
56#!else
57#$(cmt_local_${CONSTITUENT}_makefile) : $(cmt_local_tagfile_${CONSTITUENT})
58#!endif
59
60!if defined (cmt_${CONSTITUENT}_has_target_tag)
61
62!if "$(QUICK)" == "" || !exist ($(cmt_local_${CONSTITUENT}_makefile)) || !exist ($(cmt_local_tagfile_${CONSTITUENT})) || !exist ($(cmt_final_setup_${CONSTITUENT}))
63$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) dirs
64        $(echo) (constituents.nmake) Building ${CONSTITUENT}.nmake
65        @set include=$(include)
66        @set lib=$(lib)
67        @$(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$@ ${CONSTITUENT}
68!else
69$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(use_requirements)
70        @set include=$(include)
71        @set lib=$(lib)
72        @if not "$?"=="$(${CONSTITUENT}_dependencies)" ((if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) Rebuilding ${CONSTITUENT}.nmake") & $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$@ ${CONSTITUENT}) else (if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) ${CONSTITUENT}.nmake up-to-date")
73!endif
74
75!else
76
77!if "$(QUICK)" == "" || !exist ($(cmt_local_${CONSTITUENT}_makefile)) || !exist ($(cmt_local_tagfile_${CONSTITUENT})) || !exist ($(cmt_final_setup_${CONSTITUENT}))
78$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) dirs
79        $(echo) (constituents.nmake) Building ${CONSTITUENT}.nmake
80        @set include=$(include)
81        @set lib=$(lib)
82        @$(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -without_cmt -out=$@ ${CONSTITUENT}
83!else
84$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(use_requirements) $(bin)${CONSTITUENT}.in
85        @set include=$(include)
86        @set lib=$(lib)
87        @if not "$?"=="$(${CONSTITUENT}_dependencies)" ((if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) Rebuilding ${CONSTITUENT}.nmake") & $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -without_cmt -out=$@ ${CONSTITUENT}) else (if not "$(cmtmsg)"=="" @echo "$(CMTMSGPREFIX)" "(constituents.nmake) ${CONSTITUENT}.nmake up-to-date")
88!endif
89
90!endif
91
92cmt_${CONSTITUENT}_${HASDEPENDENCIES} = 1
93
94!if defined (cmt_${CONSTITUENT}_has_dependencies)
95
96${CONSTITUENT}dependencies : $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs
97        @set include=$(include)
98        @set lib=$(lib)
99        @$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles dependencies tag=$(tag)
100
101${CONSTITUENT} :: ${CONSTITUENT}dependencies
102!else
103${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs
104!endif
105        $(echo) (constituents.nmake) Creating ${CONSTITUENT}$(lock_suffix)
106        @$(lock_command) ${CONSTITUENT}$(lock_suffix)
107        $(echo) (constituents.nmake) Starting ${CONSTITUENT}
108        @set include=$(include)
109        @set lib=$(lib)
110        @$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles ${CONSTITUENT} tag=$(tag) \
111        || ($(unlock_command) ${CONSTITUENT}$(lock_suffix) & exit 1)
112        @$(unlock_command) ${CONSTITUENT}$(lock_suffix)
113        $(echo) (constituents.nmake) ${CONSTITUENT} done
114
115clean :: ${CONSTITUENT}clean
116
117${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
118        $(echo) (constituents.nmake) Starting ${CONSTITUENT}clean
119        @set include=$(include)
120        @set lib=$(lib)
121        @-if exist $(cmt_local_${CONSTITUENT}_makefile) $(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles ${CONSTITUENT}clean tag=$(tag)
122        $(echo) (constituents.nmake) ${CONSTITUENT}clean done
123#       @$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles ${CONSTITUENT}clean tag=$(tag)
124
125install :: ${CONSTITUENT}install
126
127${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
128        $(echo) (constituents.nmake) Starting install ${CONSTITUENT}
129        @set include=$(include)
130        @set lib=$(lib)
131        @-$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles install tag=$(tag)
132        $(echo) (constituents.nmake) install ${CONSTITUENT} done
133
134uninstall :: ${CONSTITUENT}uninstall
135
136#${CONSTITUENT}uninstall :: $(cmt_local_${CONSTITUENT}_makefile)
137#${CONSTITUENT}uninstall :: $(cmt_local_tagfile_${CONSTITUENT})
138${CONSTITUENT}uninstall :: $(${CONSTITUENT}uninstall_dependencies)
139        $(echo) (constituents.nmake) Starting uninstall ${CONSTITUENT}
140        @set include=$(include)
141        @set lib=$(lib)
142        @-if exist $(cmt_local_${CONSTITUENT}_makefile) $(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
143#       @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
144#       @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
145#       @-$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
146        $(echo) (constituents.nmake) uninstall ${CONSTITUENT} done
147
148#-- end of constituent_lock ------
Note: See TracBrowser for help on using the repository browser.