[1] | 1 | |
---|
| 2 | $(bin)${CONSTITUENT}.make :: build_library_links dirs |
---|
| 3 | @echo "------> (constituents.make) Building ${CONSTITUENT}.make"; \ |
---|
| 4 | $(cmtexe) build constituent_makefile ${CONSTITUENT} -quiet -tag=$(tags); \ |
---|
| 5 | if test ! "$(bin)" = "./"; then /bin/mv -f ${CONSTITUENT}.make $(bin); fi |
---|
| 6 | |
---|
| 7 | #------------------------------------------------------------------------------------ |
---|
| 8 | # Create a lock file while building the constituent. keep sleeping while another |
---|
| 9 | # process builds this constituent. |
---|
| 10 | # This is only useful when the result of the build is in some shared directory |
---|
| 11 | # (eg for code generators) |
---|
| 12 | # |
---|
| 13 | ${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(bin)${CONSTITUENT}.make |
---|
| 14 | @a=`ls ${CONSTITUENT}_*.lock 2>/dev/null`; \ |
---|
| 15 | if test ! "$${a}" = ""; then \ |
---|
| 16 | echo "==> ${CONSTITUENT} being built, waiting for completion..."; \ |
---|
| 17 | while test -f $${a}; do \ |
---|
| 18 | sleep 1; \ |
---|
| 19 | done; \ |
---|
| 20 | echo finished; \ |
---|
| 21 | else \ |
---|
| 22 | lockfile=${CONSTITUENT}_$$$$.lock; \ |
---|
| 23 | trap '/bin/rm -f $${lockfile}; exit $${status}' 0 1 2 15; \ |
---|
| 24 | touch $${lockfile}; \ |
---|
| 25 | echo "------> (constituents.make) Starting ${CONSTITUENT}"; \ |
---|
| 26 | $(MAKE) -f $(bin)${CONSTITUENT}.make $(MAKEFLAGS) ${CONSTITUENT}; \ |
---|
| 27 | status=$$?; \ |
---|
| 28 | fi |
---|
| 29 | |
---|
| 30 | ${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(bin)${CONSTITUENT}.make |
---|
| 31 | @if test -f $(bin)${CONSTITUENT}.make; then \ |
---|
| 32 | echo "------> (constituents.make) Starting ${CONSTITUENT}clean"; \ |
---|
| 33 | $(MAKE) -f $(bin)${CONSTITUENT}.make $(MAKEFLAGS) ${CONSTITUENT}clean; \ |
---|
| 34 | /bin/rm -f $(bin)${CONSTITUENT}.make $(bin)${CONSTITUENT}_dependencies.make; \ |
---|
| 35 | fi; \ |
---|
| 36 | /bin/rm -f ${CONSTITUENT.stamp} |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | |
---|