source: CMT/HEAD/mgr/fragments/constituent@ 628

Last change on this file since 628 was 628, checked in by rybkin, 13 years ago

See C.L. 499

  • Property svn:eol-style set to native
File size: 5.0 KB
RevLine 
[2]1#-- start of constituent ------
2
3cmt_${CONSTITUENT}_${HASTARGETTAG} = 1
4
[628]5#--------------------------------------
[2]6
7ifdef cmt_${CONSTITUENT}_has_target_tag
8
[434]9cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.make
[487]10cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.make
[2]11cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
12
13${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT}
14
[434]15else
[2]16
[434]17cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).make
[487]18cmt_final_setup_${CONSTITUENT} = $(bin)setup.make
[2]19cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
20
21endif
22
[588]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
[483]25ifdef STRUCTURED_OUTPUT
[487]26${CONSTITUENT}dirs :
[483]27 @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi
28 $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT}
29else
[487]30${CONSTITUENT}dirs : ;
[483]31endif
[487]32
[561]33ifdef cmt_${CONSTITUENT}_has_target_tag
[488]34
[492]35ifndef QUICK
[547]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}
[492]39else
[588]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 \
[547]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
[492]48endif
[2]49
[561]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
[588]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 \
[561]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
[547]69# $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
70
[487]71${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs ${CONSTITUENT}dirs
[441]72 $(echo) "(constituents.make) Starting ${CONSTITUENT}"
[588]73 @if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
74 $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \
75 fi
76# @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
[441]77 $(echo) "(constituents.make) ${CONSTITUENT} done"
[2]78
[628]79clean :: ${CONSTITUENT}clean ;
[2]80
[492]81${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
[441]82 $(echo) "(constituents.make) Starting ${CONSTITUENT}clean"
[492]83 @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
84 $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean; \
85 fi
[487]86 $(echo) "(constituents.make) ${CONSTITUENT}clean done"
[492]87# @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean
[2]88
89## /bin/rm -f $(cmt_local_${CONSTITUENT}_makefile) $(bin)${CONSTITUENT}_dependencies.make
90
[628]91install :: ${CONSTITUENT}install ;
[2]92
93${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
[441]94 $(echo) "(constituents.make) Starting install ${CONSTITUENT}"
[487]95 @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) install
[441]96 $(echo) "(constituents.make) install ${CONSTITUENT} done"
[2]97
[588]98uninstall : ${CONSTITUENT}uninstall
[2]99
[492]100$(foreach d,$(${CONSTITUENT}_dependencies),$(eval $(d)uninstall_dependencies += ${CONSTITUENT}uninstall))
101
[588]102${CONSTITUENT}uninstall : $(${CONSTITUENT}uninstall_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
[441]103 $(echo) "(constituents.make) Starting uninstall ${CONSTITUENT}"
[588]104 @if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
105 $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall; \
106 fi
107# @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall
[441]108 $(echo) "(constituents.make) uninstall ${CONSTITUENT} done"
[2]109
[628]110remove_library_links :: ${CONSTITUENT}uninstall ;
[588]111
[183]112ifndef PEDANTIC
[2]113.DEFAULT::
[441]114 $(echo) "(constituents.make) Starting $@ ${CONSTITUENT}"
115 $(echo) Using default action for $@
116 $(echo) "(constituents.make) $@ ${CONSTITUENT} done"
[183]117endif
[2]118
119#-- end of constituent ------
Note: See TracBrowser for help on using the repository browser.