source: CMT/v1r25-branch/mgr/fragments/nmake/constituent_lock @ 666

Last change on this file since 666 was 666, checked in by rybkin, 10 years ago

merge -r 664:665 HEAD

File size: 5.6 KB
Line 
1#-- start of constituent_lock ------
2
3cmt_${CONSTITUENT}_${HASTARGETTAG} = 1
4cmt_${CONSTITUENT}_${HASDEPENDENCIES} = 1
5
6#----------------------------------------
7
8!if defined (cmt_${CONSTITUENT}_has_target_tag)
9
10cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.nmake
11cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.nmake
12cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.nmake
13
14${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT}
15
16!else
17
18cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).nmake
19cmt_final_setup_${CONSTITUENT} = $(bin)setup.nmake
20cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.nmake
21
22!endif
23
24!if defined (cmt_${CONSTITUENT}_has_target_tag)
25
26!if "$(QUICK)" == "" || !exist ($(cmt_local_${CONSTITUENT}_makefile)) || !exist ($(cmt_local_tagfile_${CONSTITUENT})) || !exist ($(cmt_final_setup_${CONSTITUENT}))
27$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) dirs
28        $(echo) (constituents.nmake) Building ${CONSTITUENT}.nmake
29        @set include=$(include)
30        @set lib=$(lib)
31        @$(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$@ ${CONSTITUENT}
32!else
33$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(use_requirements)
34        @set include=$(include)
35        @set lib=$(lib)
36        @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")
37!endif
38
39!else
40
41!if "$(QUICK)" == "" || !exist ($(cmt_local_${CONSTITUENT}_makefile)) || !exist ($(cmt_local_tagfile_${CONSTITUENT})) || !exist ($(cmt_final_setup_${CONSTITUENT}))
42$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) dirs
43        $(echo) (constituents.nmake) Building ${CONSTITUENT}.nmake
44        @set include=$(include)
45        @set lib=$(lib)
46        @$(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -without_cmt -out=$@ ${CONSTITUENT}
47!else
48$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(use_requirements) $(bin)${CONSTITUENT}.in
49        @set include=$(include)
50        @set lib=$(lib)
51        @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")
52!endif
53
54!endif
55
56
57!if defined (cmt_${CONSTITUENT}_has_dependencies)
58
59${CONSTITUENT}dependencies : $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs
60        @set include=$(include)
61        @set lib=$(lib)
62        @$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles dependencies tag=$(tag)
63
64${CONSTITUENT} :: ${CONSTITUENT}dependencies
65!else
66${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs
67!endif
68        $(echo) (constituents.nmake) Creating ${CONSTITUENT}$(lock_suffix)
69        @$(lock_command) ${CONSTITUENT}$(lock_suffix)
70        $(echo) (constituents.nmake) Starting ${CONSTITUENT}
71        @set include=$(include)
72        @set lib=$(lib)
73        @$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles ${CONSTITUENT} tag=$(tag) \
74        || ($(unlock_command) ${CONSTITUENT}$(lock_suffix) & exit 1)
75        @$(unlock_command) ${CONSTITUENT}$(lock_suffix)
76        $(echo) (constituents.nmake) ${CONSTITUENT} done
77
78clean :: ${CONSTITUENT}clean ;
79
80${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
81        $(echo) (constituents.nmake) Starting $@
82        @set include=$(include)
83        @set lib=$(lib)
84        @-if exist $(cmt_local_${CONSTITUENT}_makefile) $(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles $@ tag=$(tag)
85        $(echo) (constituents.nmake) $@ done
86#       @$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles ${CONSTITUENT}clean tag=$(tag)
87
88install :: ${CONSTITUENT}install ;
89
90${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
91        $(echo) (constituents.nmake) Starting $@
92        @set include=$(include)
93        @set lib=$(lib)
94        @$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles install tag=$(tag)
95        $(echo) (constituents.nmake) $@ done
96
97uninstall :: ${CONSTITUENT}uninstall ;
98
99${CONSTITUENT}uninstall :: $(${CONSTITUENT}uninstall_dependencies)
100        $(echo) (constituents.nmake) Starting $@
101        @set include=$(include)
102        @set lib=$(lib)
103        @-if exist $(cmt_local_${CONSTITUENT}_makefile) $(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
104#       @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
105#       @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
106#       @-$(MAKE) /nologo /f $(cmt_local_${CONSTITUENT}_makefile) /$(MAKEFLAGS) bin=$(bin) build_strategy=keep_makefiles uninstall tag=$(tag)
107        $(echo) (constituents.nmake) $@ done
108
109#-- end of constituent_lock ------
Note: See TracBrowser for help on using the repository browser.