#-- start of constituent_lock ------ cmt_${CONSTITUENT}_${HASTARGETTAG} = 1 #-------------------------------------------------------- ifdef cmt_${CONSTITUENT}_has_target_tag #cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag)_${CONSTITUENT}.make cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.make cmt_local_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}$$$$.make cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.make #cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}_${CONSTITUENT}setup.make cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make ${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT} #$(cmt_local_tagfile_${CONSTITUENT}) : $(cmt_lock_setup) ifndef QUICK $(cmt_local_tagfile_${CONSTITUENT}) :: else $(cmt_local_tagfile_${CONSTITUENT}) : endif $(echo) "(constituents.make) Rebuilding $@"; \ if test -f $(cmt_local_tagfile_${CONSTITUENT}); then /bin/rm -f $(cmt_local_tagfile_${CONSTITUENT}); fi ; \ $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build tag_makefile >>$(cmt_local_tagfile_${CONSTITUENT}) $(echo) "(constituents.make) Rebuilding $(cmt_final_setup_${CONSTITUENT})"; \ test ! -f $(cmt_local_setup_${CONSTITUENT}) || \rm -f $(cmt_local_setup_${CONSTITUENT}); \ trap '\rm -f $(cmt_local_setup_${CONSTITUENT})' 0 1 2 15; \ $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) show setup >$(cmt_local_setup_${CONSTITUENT}) && \ if [ -f $(cmt_final_setup_${CONSTITUENT}) ] && \ \cmp -s $(cmt_final_setup_${CONSTITUENT}) $(cmt_local_setup_${CONSTITUENT}); then \ \rm $(cmt_local_setup_${CONSTITUENT}); else \ \mv -f $(cmt_local_setup_${CONSTITUENT}) $(cmt_final_setup_${CONSTITUENT}); fi else #cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag).make cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).make cmt_final_setup_${CONSTITUENT} = $(bin)setup.make #cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}setup.make cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make endif 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 ]; } ifdef STRUCTURED_OUTPUT ${CONSTITUENT}dirs : @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT} else ${CONSTITUENT}dirs : ; endif #ifndef QUICK #ifdef STRUCTURED_OUTPUT # ${CONSTITUENT}dirs :: # @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi # $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT} # #$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs ${CONSTITUENT}dirs #else #$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs #endif #else #$(cmt_local_${CONSTITUENT}_makefile) :: $(cmt_local_tagfile_${CONSTITUENT}) #endif ifdef cmt_${CONSTITUENT}_has_target_tag ifndef QUICK $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) build_library_links $(echo) "(constituents.make) Building ${CONSTITUENT}.make"; \ $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT} else $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(cmt_build_library_linksstamp) $(use_requirements) @if [ ! -f $@ ] || [ ! -f $(cmt_local_tagfile_${CONSTITUENT}) ] || \ [ ! -f $(cmt_final_setup_${CONSTITUENT}) ] || \ $(not_${CONSTITUENT}_dependencies) ; then \ test -z "$(cmtmsg)" || \ echo "$(CMTMSGPREFIX)" "(constituents.make) Building ${CONSTITUENT}.make"; \ $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \ fi endif else ifndef QUICK $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) build_library_links $(echo) "(constituents.make) Building ${CONSTITUENT}.make"; \ $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -without_cmt -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT} else $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}_dependencies) $(cmt_build_library_linksstamp) $(bin)${CONSTITUENT}.in @if [ ! -f $@ ] || [ ! -f $(cmt_local_tagfile_${CONSTITUENT}) ] || \ [ ! -f $(cmt_final_setup_${CONSTITUENT}) ] || \ $(not_${CONSTITUENT}_dependencies) ; then \ test -z "$(cmtmsg)" || \ echo "$(CMTMSGPREFIX)" "(constituents.make) Building ${CONSTITUENT}.make"; \ $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -without_cmt -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \ fi endif endif # $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT} ${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs ${CONSTITUENT}dirs $(echo) "(constituents.make) Creating ${CONSTITUENT}${lock_suffix} and Starting ${CONSTITUENT}" @${lock_command} ${CONSTITUENT}${lock_suffix} || exit $$?; \ retval=$$?; \ trap '${unlock_command} ${CONSTITUENT}${lock_suffix}; exit $${retval}' 1 2 15; \ if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \ fi; \ retval=$$?; ${unlock_command} ${CONSTITUENT}${lock_suffix}; exit $${retval} $(echo) "(constituents.make) ${CONSTITUENT} done" clean :: ${CONSTITUENT}clean ${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile) $(echo) "(constituents.make) Starting ${CONSTITUENT}clean" @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean; \ fi $(echo) "(constituents.make) ${CONSTITUENT}clean done" # @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean ## /bin/rm -f $(cmt_local_${CONSTITUENT}_makefile) $(bin)${CONSTITUENT}_dependencies.make install :: ${CONSTITUENT}install ${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) $(echo) "(constituents.make) Starting install ${CONSTITUENT}" @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) install $(echo) "(constituents.make) install ${CONSTITUENT} done" uninstall : ${CONSTITUENT}uninstall $(foreach d,$(${CONSTITUENT}_dependencies),$(eval $(d)uninstall_dependencies += ${CONSTITUENT}uninstall)) ${CONSTITUENT}uninstall : $(${CONSTITUENT}uninstall_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile) $(echo) "(constituents.make) Starting uninstall ${CONSTITUENT}" @if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall; \ fi # @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall $(echo) "(constituents.make) uninstall ${CONSTITUENT} done" remove_library_links :: ${CONSTITUENT}uninstall ifndef PEDANTIC .DEFAULT:: $(echo) "(constituents.make) Starting $@ ${CONSTITUENT}" $(echo) Using default action for $@ $(echo) "(constituents.make) $@ ${CONSTITUENT} done" endif #-- end of constituent_lock ------