source: CMT/v1r25-branch/mgr/fragments/constituent_lock @ 641

Last change on this file since 641 was 641, checked in by rybkin, 11 years ago

merge -r 630:631 HEAD mgr/fragments/nmake/constituent mgr/fragments/nmake/constituent_lock mgr/fragments/nmake/jar mgr/fragments/nmake/library mgr/fragments/nmake/library_no_static mgr/fragments/nmake/java mgr/fragments/constituent mgr/fragments/constituent_lock mgr/fragments/nmake/check_application mgr/cmt_dcc_version.sh

File size: 5.3 KB
Line 
1#-- start of constituent_lock ------
2
3cmt_${CONSTITUENT}_${HASTARGETTAG} = 1
4
5#--------------------------------------------------------
6
7ifdef cmt_${CONSTITUENT}_has_target_tag
8
9cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.make
10cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.make
11cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
12
13${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT}
14
15else
16
17cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).make
18cmt_final_setup_${CONSTITUENT} = $(bin)setup.make
19cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
20
21endif
22
23not_${CONSTITUENT}_dependencies = { n=0; for p in $?; do m=0; for d in $(${CONSTITUENT}_dependencies); do if [ $$p = $$d ]; then m=1; break; fi; done; if [ $$m -eq 0 ]; then n=1; break; fi; done; [ $$n -eq 1 ]; }
24
25ifdef STRUCTURED_OUTPUT
26${CONSTITUENT}dirs :
27        @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi
28        $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT}
29else
30${CONSTITUENT}dirs : ;
31endif
32
33ifdef cmt_${CONSTITUENT}_has_target_tag
34
35ifndef QUICK
36$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) build_library_links
37        $(echo) "(constituents.make) Building ${CONSTITUENT}.make"; \
38          $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
39else
40$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(cmt_build_library_linksstamp) $(use_requirements)
41        @if [ ! -f $@ ] || [ ! -f $(cmt_local_tagfile_${CONSTITUENT}) ] || \
42          [ ! -f $(cmt_final_setup_${CONSTITUENT}) ] || \
43          $(not_${CONSTITUENT}_dependencies) ; then \
44          test -z "$(cmtmsg)" || \
45          echo "$(CMTMSGPREFIX)" "(constituents.make) Building ${CONSTITUENT}.make"; \
46          $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \
47          fi
48endif
49
50else
51
52ifndef QUICK
53$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) build_library_links
54        $(echo) "(constituents.make) Building ${CONSTITUENT}.make"; \
55          $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -without_cmt -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
56else
57$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(cmt_build_library_linksstamp) $(bin)${CONSTITUENT}.in
58        @if [ ! -f $@ ] || [ ! -f $(cmt_local_tagfile_${CONSTITUENT}) ] || \
59          [ ! -f $(cmt_final_setup_${CONSTITUENT}) ] || \
60          $(not_${CONSTITUENT}_dependencies) ; then \
61          test -z "$(cmtmsg)" || \
62          echo "$(CMTMSGPREFIX)" "(constituents.make) Building ${CONSTITUENT}.make"; \
63          $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -without_cmt -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \
64          fi
65endif
66
67endif
68
69#         $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
70
71${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs ${CONSTITUENT}dirs
72        $(echo) "(constituents.make) Creating ${CONSTITUENT}${lock_suffix} and Starting ${CONSTITUENT}"
73        @${lock_command} ${CONSTITUENT}${lock_suffix} || exit $$?; \
74          retval=$$?; \
75          trap '${unlock_command} ${CONSTITUENT}${lock_suffix}; exit $${retval}' 1 2 15; \
76          if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
77          $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \
78          fi; \
79          retval=$$?; ${unlock_command} ${CONSTITUENT}${lock_suffix}; exit $${retval}
80        $(echo) "(constituents.make) ${CONSTITUENT} done"
81
82clean :: ${CONSTITUENT}clean
83
84${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
85        $(echo) "(constituents.make) Starting ${CONSTITUENT}clean"
86        @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
87          $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean; \
88        fi
89        $(echo) "(constituents.make) ${CONSTITUENT}clean done"
90#       @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean
91
92##        /bin/rm -f $(cmt_local_${CONSTITUENT}_makefile) $(bin)${CONSTITUENT}_dependencies.make
93
94install :: ${CONSTITUENT}install ;
95
96${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
97        $(echo) "(constituents.make) Starting $@"
98        @if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
99          $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) install; \
100          fi
101#       @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) install
102        $(echo) "(constituents.make) $@ done"
103
104uninstall : ${CONSTITUENT}uninstall
105
106$(foreach d,$(${CONSTITUENT}_dependencies),$(eval $(d)uninstall_dependencies += ${CONSTITUENT}uninstall))
107
108${CONSTITUENT}uninstall : $(${CONSTITUENT}uninstall_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
109        $(echo) "(constituents.make) Starting $@"
110        @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
111          $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall; \
112          fi
113#       @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall
114        $(echo) "(constituents.make) $@ done"
115
116remove_library_links :: ${CONSTITUENT}uninstall ;
117
118ifndef PEDANTIC
119.DEFAULT::
120        $(echo) "(constituents.make) Starting $@ ${CONSTITUENT}"
121        $(echo) Using default action for $@
122        $(echo) "(constituents.make) $@ ${CONSTITUENT} done"
123endif
124
125#-- end of constituent_lock ------
Note: See TracBrowser for help on using the repository browser.