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

Last change on this file since 547 was 547, checked in by rybkin, 14 years ago

See C.L. 432

File size: 5.7 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 "$(QUICK)" == "" || !exist ($(cmt_local_${CONSTITUENT}_makefile)) || !exist ($(cmt_local_tagfile_${CONSTITUENT})) || !exist ($(cmt_final_setup_${CONSTITUENT}))
61$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies)
62        $(echo) (constituents.nmake) Building ${CONSTITUENT}.nmake
63        @set include=$(include)
64        @set lib=$(lib)
65        @$(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$@ ${CONSTITUENT}
66#       @$(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -out=$@ ${CONSTITUENT}
67#       $(echo) (constituents.nmake) ${CONSTITUENT}.nmake done
68!else
69$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) ;
70!endif
71
72cmt_${CONSTITUENT}_${HASDEPENDENCIES} = 1
73
74!if defined (cmt_${CONSTITUENT}_has_dependencies)
75
76${CONSTITUENT}dependencies : $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs
77        @set include=$(include)
78        @set lib=$(lib)
79        @$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles dependencies tag=$(tag)
80
81${CONSTITUENT} :: ${CONSTITUENT}dependencies
82!else
83${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs
84!endif
85        $(echo) (constituents.nmake) Creating ${CONSTITUENT}$(lock_suffix)
86        @$(lock_command) ${CONSTITUENT}$(lock_suffix)
87        $(echo) (constituents.nmake) Starting ${CONSTITUENT}
88        @set include=$(include)
89        @set lib=$(lib)
90        @$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles ${CONSTITUENT} tag=$(tag) \
91        || ($(unlock_command) ${CONSTITUENT}$(lock_suffix) & exit 1)
92        @$(unlock_command) ${CONSTITUENT}$(lock_suffix)
93        $(echo) (constituents.nmake) ${CONSTITUENT} done
94
95clean :: ${CONSTITUENT}clean
96
97${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
98        $(echo) (constituents.nmake) Starting ${CONSTITUENT}clean
99        @set include=$(include)
100        @set lib=$(lib)
101        @-if exist $(cmt_local_${CONSTITUENT}_makefile) $(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles ${CONSTITUENT}clean tag=$(tag)
102        $(echo) (constituents.nmake) ${CONSTITUENT}clean done
103#       @$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles ${CONSTITUENT}clean tag=$(tag)
104
105install :: ${CONSTITUENT}install
106
107${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
108        $(echo) (constituents.nmake) Starting install ${CONSTITUENT}
109        @set include=$(include)
110        @set lib=$(lib)
111        @-$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles install tag=$(tag)
112        $(echo) (constituents.nmake) install ${CONSTITUENT} done
113
114uninstall :: ${CONSTITUENT}uninstall
115
116#${CONSTITUENT}uninstall :: $(cmt_local_${CONSTITUENT}_makefile)
117#${CONSTITUENT}uninstall :: $(cmt_local_tagfile_${CONSTITUENT})
118${CONSTITUENT}uninstall ::
119        $(echo) (constituents.nmake) Starting uninstall ${CONSTITUENT}
120        @set include=$(include)
121        @set lib=$(lib)
122        @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
123#       @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
124        @-$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
125        $(echo) (constituents.nmake) uninstall ${CONSTITUENT} done
126
127#-- end of constituent_lock ------
Note: See TracBrowser for help on using the repository browser.