[1] | 1 | |
---|
| 2 | include ${CMTROOT}/src/Makefile.core |
---|
| 3 | |
---|
| 4 | ifdef tag |
---|
| 5 | CMTEXTRATAGS = $(tag) |
---|
| 6 | else |
---|
| 7 | tag = $(CMTCONFIG) |
---|
| 8 | endif |
---|
| 9 | |
---|
| 10 | tags = $(CMTCONFIG),$(CMTEXTRATAGS) |
---|
| 11 | |
---|
| 12 | ${PACKAGE}_tag = $(tag) |
---|
| 13 | |
---|
| 14 | #-------------------------------------------------------- |
---|
| 15 | |
---|
| 16 | cmt_lock_setup = lock$(cmt_lock_pid).make |
---|
| 17 | cmt_setup_pid = $(bin)setup$(cmt_lock_pid).make |
---|
| 18 | |
---|
| 19 | first :: $(${PACKAGE}_tag).make |
---|
| 20 | @echo " ---> first: $(${PACKAGE}_tag).make ok" |
---|
| 21 | |
---|
| 22 | $(${PACKAGE}_tag).make : $(cmt_lock_setup) |
---|
| 23 | @echo "------> (constituents.make) Rebuilding setup.make $(${PACKAGE}_tag).make"; \ |
---|
| 24 | \ |
---|
| 25 | if test -f $(${PACKAGE}_tag).make; then /bin/rm -f $(${PACKAGE}_tag).make; fi; \ |
---|
| 26 | $(cmtexe) -quiet -tag=$(tags) build tag_makefile >t$(cmt_lock_pid); \ |
---|
| 27 | mv t$(cmt_lock_pid) $(${PACKAGE}_tag).make ; \ |
---|
| 28 | \ |
---|
| 29 | if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi; \ |
---|
| 30 | if test -f $(cmt_setup_pid); then /bin/rm -f $(cmt_setup_pid); fi; \ |
---|
| 31 | echo "----------> uses" >$(cmt_setup_pid); \ |
---|
| 32 | $(cmtexe) -quiet -tag=$(tags) show uses >>$(cmt_setup_pid); \ |
---|
| 33 | echo "----------> tags" >>$(cmt_setup_pid); \ |
---|
| 34 | $(cmtexe) -tag=$(tags) show tags >>$(cmt_setup_pid); \ |
---|
| 35 | echo "----------> CMTPATH" >>$(cmt_setup_pid); \ |
---|
| 36 | $(cmtexe) show path -tag=$(tags) -quiet >>$(cmt_setup_pid); \ |
---|
| 37 | /bin/mv $(cmt_setup_pid) $(bin)${PACKAGE}setup.make; \ |
---|
| 38 | /bin/echo setup.make ok |
---|
| 39 | |
---|
| 40 | -include $(${PACKAGE}_tag).make |
---|
| 41 | |
---|
| 42 | config :: checkuses ##$(${PACKAGE}_tag).make |
---|
| 43 | |
---|
| 44 | env.make :: |
---|
| 45 | printenv >env.make.tmp; $(cmtexe) -quiet check files env.make.tmp env.make |
---|
| 46 | |
---|
| 47 | all :: build_library_links |
---|
| 48 | |
---|
| 49 | javadirs :: |
---|
| 50 | @if test ! -d $(javabin) ; then $(mkdir) -p $(javabin) ; fi |
---|
| 51 | |
---|
| 52 | srcdirs :: |
---|
| 53 | @if test ! -d $(src) ; then $(mkdir) -p $(src) ; fi |
---|
| 54 | |
---|
| 55 | dirs :: |
---|
| 56 | @if test ! -r requirements ; then echo "No requirements file" ; fi; \ |
---|
| 57 | if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi |
---|
| 58 | |
---|
| 59 | build_library_links : dirs requirements |
---|
| 60 | @echo "------> (constituents.make) Rebuilding library links"; \ |
---|
| 61 | if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi; \ |
---|
| 62 | $(build_library_links) |
---|
| 63 | |
---|
| 64 | .DEFAULT : |
---|
| 65 | @if test "$@" = "$(cmt_lock_setup)"; then \ |
---|
| 66 | /bin/rm -f $(cmt_lock_setup); \ |
---|
| 67 | touch $(cmt_lock_setup); \ |
---|
| 68 | fi |
---|
| 69 | |
---|