[429] | 1 | #-- start of constituent_lock ------ |
---|
| 2 | |
---|
| 3 | cmt_${CONSTITUENT}_${HASTARGETTAG} = 1 |
---|
| 4 | |
---|
| 5 | #-------------------------------------------------------- |
---|
| 6 | |
---|
| 7 | ifdef cmt_${CONSTITUENT}_has_target_tag |
---|
| 8 | |
---|
[434] | 9 | cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.make |
---|
[487] | 10 | cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.make |
---|
[429] | 11 | cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make |
---|
| 12 | |
---|
| 13 | ${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT} |
---|
| 14 | |
---|
[434] | 15 | else |
---|
[429] | 16 | |
---|
[434] | 17 | cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).make |
---|
[487] | 18 | cmt_final_setup_${CONSTITUENT} = $(bin)setup.make |
---|
[429] | 19 | cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make |
---|
| 20 | |
---|
| 21 | endif |
---|
| 22 | |
---|
[588] | 23 | not_${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] | 25 | ifdef 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} |
---|
| 29 | else |
---|
[487] | 30 | ${CONSTITUENT}dirs : ; |
---|
[483] | 31 | endif |
---|
[487] | 32 | |
---|
[561] | 33 | ifdef cmt_${CONSTITUENT}_has_target_tag |
---|
[488] | 34 | |
---|
[492] | 35 | ifndef 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] | 39 | else |
---|
[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] | 48 | endif |
---|
[429] | 49 | |
---|
[561] | 50 | else |
---|
| 51 | |
---|
| 52 | ifndef 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} |
---|
| 56 | else |
---|
[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 |
---|
| 65 | endif |
---|
| 66 | |
---|
| 67 | endif |
---|
| 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 |
---|
[447] | 72 | $(echo) "(constituents.make) Creating ${CONSTITUENT}${lock_suffix} and Starting ${CONSTITUENT}" |
---|
[466] | 73 | @${lock_command} ${CONSTITUENT}${lock_suffix} || exit $$?; \ |
---|
[447] | 74 | retval=$$?; \ |
---|
| 75 | trap '${unlock_command} ${CONSTITUENT}${lock_suffix}; exit $${retval}' 1 2 15; \ |
---|
[588] | 76 | if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ |
---|
[487] | 77 | $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \ |
---|
[588] | 78 | fi; \ |
---|
[447] | 79 | retval=$$?; ${unlock_command} ${CONSTITUENT}${lock_suffix}; exit $${retval} |
---|
[441] | 80 | $(echo) "(constituents.make) ${CONSTITUENT} done" |
---|
[429] | 81 | |
---|
| 82 | clean :: ${CONSTITUENT}clean |
---|
| 83 | |
---|
[492] | 84 | ${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile) |
---|
[441] | 85 | $(echo) "(constituents.make) Starting ${CONSTITUENT}clean" |
---|
[492] | 86 | @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ |
---|
| 87 | $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean; \ |
---|
| 88 | fi |
---|
[487] | 89 | $(echo) "(constituents.make) ${CONSTITUENT}clean done" |
---|
[492] | 90 | # @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean |
---|
[429] | 91 | |
---|
| 92 | ## /bin/rm -f $(cmt_local_${CONSTITUENT}_makefile) $(bin)${CONSTITUENT}_dependencies.make |
---|
| 93 | |
---|
[638] | 94 | install :: ${CONSTITUENT}install ; |
---|
[429] | 95 | |
---|
| 96 | ${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) |
---|
[641] | 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" |
---|
[429] | 103 | |
---|
[588] | 104 | uninstall : ${CONSTITUENT}uninstall |
---|
[429] | 105 | |
---|
[492] | 106 | $(foreach d,$(${CONSTITUENT}_dependencies),$(eval $(d)uninstall_dependencies += ${CONSTITUENT}uninstall)) |
---|
| 107 | |
---|
[588] | 108 | ${CONSTITUENT}uninstall : $(${CONSTITUENT}uninstall_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile) |
---|
[641] | 109 | $(echo) "(constituents.make) Starting $@" |
---|
| 110 | @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ |
---|
[588] | 111 | $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall; \ |
---|
| 112 | fi |
---|
| 113 | # @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall |
---|
[641] | 114 | $(echo) "(constituents.make) $@ done" |
---|
[429] | 115 | |
---|
[638] | 116 | remove_library_links :: ${CONSTITUENT}uninstall ; |
---|
[588] | 117 | |
---|
[429] | 118 | ifndef PEDANTIC |
---|
| 119 | .DEFAULT:: |
---|
[441] | 120 | $(echo) "(constituents.make) Starting $@ ${CONSTITUENT}" |
---|
| 121 | $(echo) Using default action for $@ |
---|
| 122 | $(echo) "(constituents.make) $@ ${CONSTITUENT} done" |
---|
[429] | 123 | endif |
---|
| 124 | |
---|
| 125 | #-- end of constituent_lock ------ |
---|