source: CMT/HEAD/mgr/fragments/constituent_lock @ 441

Last change on this file since 441 was 441, checked in by rybkin, 16 years ago

See C.L. 345

File size: 4.2 KB
Line 
1#-- start of constituent_lock ------
2
3cmt_${CONSTITUENT}_${HASTARGETTAG} = 1
4
5#--------------------------------------------------------
6
7ifdef cmt_${CONSTITUENT}_has_target_tag
8
9ifdef READONLY
10cmt_local_tagfile_${CONSTITUENT} = /tmp/CMT_$(${PACKAGE}_tag)_${CONSTITUENT}.make$(cmt_lock_pid)
11cmt_final_setup_${CONSTITUENT} = /tmp/CMT_${PACKAGE}_${CONSTITUENT}setup.make
12cmt_local_${CONSTITUENT}_makefile = /tmp/CMT_${CONSTITUENT}$(cmt_lock_pid).make
13else
14#cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag)_${CONSTITUENT}.make
15cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.make
16cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}_${CONSTITUENT}setup.make
17cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
18endif
19
20${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT}
21
22#$(cmt_local_tagfile_${CONSTITUENT}) : $(cmt_lock_setup)
23ifndef QUICK
24$(cmt_local_tagfile_${CONSTITUENT}) ::
25else
26$(cmt_local_tagfile_${CONSTITUENT}) :
27endif
28        $(echo) "(constituents.make) Rebuilding setup.make $(cmt_local_tagfile_${CONSTITUENT})"
29        @if test -f $(cmt_local_tagfile_${CONSTITUENT}); then /bin/rm -f $(cmt_local_tagfile_${CONSTITUENT}); fi ; \
30          $(cmtexe) -quiet -tag=$(tags) $(${CONSTITUENT}_extratags) build tag_makefile >>$(cmt_local_tagfile_${CONSTITUENT}); \
31          if test -f $(cmt_final_setup_${CONSTITUENT}); then /bin/rm -f $(cmt_final_setup_${CONSTITUENT}); fi; \
32          $(cmtexe) -quiet -tag=$(tags) $(${CONSTITUENT}_extratags) show setup >>$(cmt_final_setup_${CONSTITUENT})
33        $(echo) setup.make ok
34
35else
36
37ifdef READONLY
38cmt_local_tagfile_${CONSTITUENT} = /tmp/CMT_$(${PACKAGE}_tag).make$(cmt_lock_pid)
39cmt_final_setup_${CONSTITUENT} = /tmp/CMT_${PACKAGE}setup.make
40cmt_local_${CONSTITUENT}_makefile = /tmp/CMT_${CONSTITUENT}$(cmt_lock_pid).make
41else
42#cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag).make
43cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).make
44cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}setup.make
45cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
46endif
47
48endif
49
50ifndef QUICK
51$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs
52else
53$(cmt_local_${CONSTITUENT}_makefile) :: $(cmt_local_tagfile_${CONSTITUENT})
54endif
55        $(echo) "(constituents.make) Building ${CONSTITUENT}.make"; \
56          $(cmtexe) -quiet -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
57
58${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
59        $(echo) "(constituents.make) Creating ${CONSTITUENT}${lock_suffix}"
60        @${lock_command} ${CONSTITUENT}${lock_suffix}
61        $(echo) "(constituents.make) Starting ${CONSTITUENT}"
62        @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) cmt_lock_pid=$${cmt_lock_pid} ${CONSTITUENT}; \
63        retval=$$?; ${unlock_command} ${CONSTITUENT}${lock_suffix}; exit $${retval}
64        $(echo) "(constituents.make) ${CONSTITUENT} done"
65
66clean :: ${CONSTITUENT}clean
67
68${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
69        $(echo) "(constituents.make) Starting ${CONSTITUENT}clean"
70        @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
71          $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) cmt_lock_pid=$${cmt_lock_pid} ${CONSTITUENT}clean; \
72        fi
73
74##        /bin/rm -f $(cmt_local_${CONSTITUENT}_makefile) $(bin)${CONSTITUENT}_dependencies.make
75
76install :: ${CONSTITUENT}install
77
78${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
79        $(echo) "(constituents.make) Starting install ${CONSTITUENT}"
80        @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) cmt_lock_pid=$${cmt_lock_pid} install
81        $(echo) "(constituents.make) install ${CONSTITUENT} done"
82
83uninstall :: ${CONSTITUENT}uninstall
84
85${CONSTITUENT}uninstall :: $(cmt_local_${CONSTITUENT}_makefile)
86        $(echo) "(constituents.make) Starting uninstall ${CONSTITUENT}"
87        @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) cmt_lock_pid=$${cmt_lock_pid} uninstall
88        $(echo) "(constituents.make) uninstall ${CONSTITUENT} done"
89
90ifndef PEDANTIC
91.DEFAULT::
92        $(echo) "(constituents.make) Starting $@ ${CONSTITUENT}"
93        $(echo) Using default action for $@
94        $(echo) "(constituents.make) $@ ${CONSTITUENT} done"
95endif
96
97
98#-- end of constituent_lock ------
Note: See TracBrowser for help on using the repository browser.