source: CMT/v1r25-branch/mgr/fragments/constituent @ 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.1 KB
RevLine 
[2]1#-- start of constituent ------
2
3cmt_${CONSTITUENT}_${HASTARGETTAG} = 1
4
[638]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
[638]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
[638]91install :: ${CONSTITUENT}install ;
[2]92
93${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
[641]94        $(echo) "(constituents.make) Starting $@"
95        @if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
96          $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) install; \
97          fi
98#       @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) install
99        $(echo) "(constituents.make) $@ done"
[2]100
[588]101uninstall : ${CONSTITUENT}uninstall
[2]102
[492]103$(foreach d,$(${CONSTITUENT}_dependencies),$(eval $(d)uninstall_dependencies += ${CONSTITUENT}uninstall))
104
[588]105${CONSTITUENT}uninstall : $(${CONSTITUENT}uninstall_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
[641]106        $(echo) "(constituents.make) Starting $@"
107        @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
[588]108          $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall; \
109          fi
110#       @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall
[641]111        $(echo) "(constituents.make) $@ done"
[2]112
[638]113remove_library_links :: ${CONSTITUENT}uninstall ;
[588]114
[183]115ifndef PEDANTIC
[2]116.DEFAULT::
[441]117        $(echo) "(constituents.make) Starting $@ ${CONSTITUENT}"
118        $(echo) Using default action for $@
119        $(echo) "(constituents.make) $@ ${CONSTITUENT} done"
[183]120endif
[2]121
122#-- end of constituent ------
Note: See TracBrowser for help on using the repository browser.