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

Last change on this file since 492 was 492, checked in by rybkin, 15 years ago

See C.L. 387

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