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

Last change on this file since 561 was 561, checked in by rybkin, 15 years ago

See C.L. 444

  • Property svn:eol-style set to native
File size: 6.2 KB
RevLine 
[2]1#-- start of constituent ------
2
3cmt_${CONSTITUENT}_${HASTARGETTAG} = 1
4
5#--------------------------------------------------------
6
7ifdef cmt_${CONSTITUENT}_has_target_tag
8
[434]9#cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag)_${CONSTITUENT}.make
10cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.make
[487]11cmt_local_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}$$$$.make
12cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.make
13#cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}_${CONSTITUENT}setup.make
[2]14cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
15
16${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT}
17
[434]18#$(cmt_local_tagfile_${CONSTITUENT}) : $(cmt_lock_setup)
19ifndef QUICK
20$(cmt_local_tagfile_${CONSTITUENT}) ::
21else
22$(cmt_local_tagfile_${CONSTITUENT}) :
23endif
[487]24 $(echo) "(constituents.make) Rebuilding $@"; \
25 if test -f $(cmt_local_tagfile_${CONSTITUENT}); then /bin/rm -f $(cmt_local_tagfile_${CONSTITUENT}); fi ; \
26 $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build tag_makefile >>$(cmt_local_tagfile_${CONSTITUENT})
27 $(echo) "(constituents.make) Rebuilding $(cmt_final_setup_${CONSTITUENT})"; \
28 test ! -f $(cmt_local_setup_${CONSTITUENT}) || \rm -f $(cmt_local_setup_${CONSTITUENT}); \
29 trap '\rm -f $(cmt_local_setup_${CONSTITUENT})' 0 1 2 15; \
30 $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) show setup >$(cmt_local_setup_${CONSTITUENT}) && \
31 if [ -f $(cmt_final_setup_${CONSTITUENT}) ] && \
32 \cmp -s $(cmt_final_setup_${CONSTITUENT}) $(cmt_local_setup_${CONSTITUENT}); then \
33 \rm $(cmt_local_setup_${CONSTITUENT}); else \
34 \mv -f $(cmt_local_setup_${CONSTITUENT}) $(cmt_final_setup_${CONSTITUENT}); fi
[2]35
36else
37
[434]38#cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag).make
39cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).make
[487]40cmt_final_setup_${CONSTITUENT} = $(bin)setup.make
41#cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}setup.make
[2]42cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
43
44endif
45
[483]46ifdef STRUCTURED_OUTPUT
[487]47${CONSTITUENT}dirs :
[483]48 @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi
49 $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT}
50else
[487]51${CONSTITUENT}dirs : ;
[483]52endif
[487]53
54#ifndef QUICK
55#ifdef STRUCTURED_OUTPUT
56# ${CONSTITUENT}dirs ::
57# @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi
58# $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT}
59#
60#$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs ${CONSTITUENT}dirs
61#else
62#$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs
63#endif
64#else
65#$(cmt_local_${CONSTITUENT}_makefile) :: $(cmt_local_tagfile_${CONSTITUENT})
66#endif
67
[561]68ifdef cmt_${CONSTITUENT}_has_target_tag
[488]69
[492]70ifndef QUICK
[547]71$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) build_library_links
72 $(echo) "(constituents.make) Building ${CONSTITUENT}.make"; \
73 $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
[492]74else
[547]75$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies)
[548]76 if [ ! -f $@ ] || [ ! -f $(cmt_local_tagfile_${CONSTITUENT}) ] || \
77 [ ! -f $(cmt_final_setup_${CONSTITUENT}) ]; then \
[547]78 test -z "$(cmtmsg)" || \
79 echo "$(CMTMSGPREFIX)" "(constituents.make) Building ${CONSTITUENT}.make"; \
80 $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \
81 fi
[492]82endif
[2]83
[561]84else
85
86ifndef QUICK
87$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) build_library_links
88 $(echo) "(constituents.make) Building ${CONSTITUENT}.make"; \
89 $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -without_cmt -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
90else
91$(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies)
92 if [ ! -f $@ ] || [ ! -f $(cmt_local_tagfile_${CONSTITUENT}) ] || \
93 [ ! -f $(cmt_final_setup_${CONSTITUENT}) ]; then \
94 test -z "$(cmtmsg)" || \
95 echo "$(CMTMSGPREFIX)" "(constituents.make) Building ${CONSTITUENT}.make"; \
96 $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -without_cmt -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \
97 fi
98endif
99
100endif
101
[547]102# $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
103
[487]104${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs ${CONSTITUENT}dirs
[441]105 $(echo) "(constituents.make) Starting ${CONSTITUENT}"
[487]106 @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
[441]107 $(echo) "(constituents.make) ${CONSTITUENT} done"
[2]108
109clean :: ${CONSTITUENT}clean
110
[492]111${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
[441]112 $(echo) "(constituents.make) Starting ${CONSTITUENT}clean"
[492]113 @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
114 $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean; \
115 fi
[487]116 $(echo) "(constituents.make) ${CONSTITUENT}clean done"
[492]117# @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean
[2]118
119## /bin/rm -f $(cmt_local_${CONSTITUENT}_makefile) $(bin)${CONSTITUENT}_dependencies.make
120
121install :: ${CONSTITUENT}install
122
123${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
[441]124 $(echo) "(constituents.make) Starting install ${CONSTITUENT}"
[487]125 @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) install
[441]126 $(echo) "(constituents.make) install ${CONSTITUENT} done"
[2]127
128uninstall :: ${CONSTITUENT}uninstall
129
[492]130$(foreach d,$(${CONSTITUENT}_dependencies),$(eval $(d)uninstall_dependencies += ${CONSTITUENT}uninstall))
131
132${CONSTITUENT}uninstall :: $(${CONSTITUENT}uninstall_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
[441]133 $(echo) "(constituents.make) Starting uninstall ${CONSTITUENT}"
[487]134 @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall
[441]135 $(echo) "(constituents.make) uninstall ${CONSTITUENT} done"
[2]136
[183]137ifndef PEDANTIC
[2]138.DEFAULT::
[441]139 $(echo) "(constituents.make) Starting $@ ${CONSTITUENT}"
140 $(echo) Using default action for $@
141 $(echo) "(constituents.make) $@ ${CONSTITUENT} done"
[183]142endif
[2]143
144#-- end of constituent ------
Note: See TracBrowser for help on using the repository browser.