1 | |
---|
2 | #-- start of constituents_header ------ |
---|
3 | |
---|
4 | include ${CMTROOT}/src/Makefile.core |
---|
5 | |
---|
6 | ifdef tag |
---|
7 | CMTEXTRATAGS = $(tag) |
---|
8 | else |
---|
9 | tag = $(CMTCONFIG) |
---|
10 | endif |
---|
11 | |
---|
12 | tags = $(tag),$(CMTEXTRATAGS) |
---|
13 | |
---|
14 | ${PACKAGE}_tag = $(tag) |
---|
15 | |
---|
16 | ifdef READONLY |
---|
17 | cmt_local_tagfile = /tmp/CMT_$(${PACKAGE}_tag).make$(cmt_lock_pid) |
---|
18 | else |
---|
19 | cmt_local_tagfile = $(${PACKAGE}_tag).make |
---|
20 | endif |
---|
21 | |
---|
22 | -include $(cmt_local_tagfile) |
---|
23 | |
---|
24 | ifdef READONLY |
---|
25 | cmt_local_setup = /tmp/CMT_${PACKAGE}setup$(cmt_lock_pid).make |
---|
26 | cmt_final_setup = /tmp/CMT_${PACKAGE}setup.make |
---|
27 | else |
---|
28 | cmt_local_setup = $(bin)${PACKAGE}setup$(cmt_lock_pid).make |
---|
29 | cmt_final_setup = $(bin)${PACKAGE}setup.make |
---|
30 | endif |
---|
31 | |
---|
32 | #-------------------------------------------------------- |
---|
33 | |
---|
34 | ##cmt_lock_setup = /tmp/lock$(cmt_lock_pid).make |
---|
35 | cmt_temp_tag = /tmp/tag$(cmt_lock_pid).make |
---|
36 | |
---|
37 | first :: $(cmt_local_tagfile) |
---|
38 | @echo $(cmt_local_tagfile) ok |
---|
39 | |
---|
40 | ## @bin=`$(cmtexe) -quiet show macro_value bin` |
---|
41 | |
---|
42 | $(cmt_local_tagfile) : ##$(cmt_lock_setup) |
---|
43 | @/bin/echo "------> (constituents.make) Rebuilding setup.make $(cmt_local_tagfile)" |
---|
44 | @if test -f $(cmt_local_tagfile); then /bin/rm -f $(cmt_local_tagfile); fi |
---|
45 | @$(cmtexe) -quiet -tag=$(tags) build tag_makefile >$(cmt_temp_tag) |
---|
46 | @mv $(cmt_temp_tag) $(cmt_local_tagfile) |
---|
47 | @bin=$(bin); \ |
---|
48 | if test ! -d $${bin} ; then $(mkdir) -p $${bin} ; fi; \ |
---|
49 | echo CMTCONFIG=$(CMTCONFIG); \ |
---|
50 | if test -f $(cmt_local_setup); then /bin/rm -f $(cmt_local_setup); fi; \ |
---|
51 | cmt_local_setup=$${bin}${PACKAGE}setup$(cmt_lock_pid).make; \ |
---|
52 | cmt_final_setup=$${bin}${PACKAGE}setup.make; \ |
---|
53 | trap '/bin/rm -f $${cmt_local_setup}' 0 1 2 15; \ |
---|
54 | $(cmtexe) -quiet -tag=$(tags) show setup >>$${cmt_local_setup}; \ |
---|
55 | if test ! -f $${cmt_final_setup}; then \ |
---|
56 | mv $${cmt_local_setup} $${cmt_final_setup}; \ |
---|
57 | else \ |
---|
58 | if /usr/bin/diff $${cmt_local_setup} $${cmt_final_setup} >/dev/null ; then \ |
---|
59 | echo "$${cmt_final_setup} untouched "; \ |
---|
60 | else \ |
---|
61 | mv $${cmt_local_setup} $${cmt_final_setup}; \ |
---|
62 | fi; \ |
---|
63 | fi |
---|
64 | @/bin/echo setup.make ok |
---|
65 | |
---|
66 | config :: ## checkuses |
---|
67 | @exit 0 |
---|
68 | |
---|
69 | env.make :: |
---|
70 | printenv >env.make.tmp; $(cmtexe) -quiet check files env.make.tmp env.make |
---|
71 | |
---|
72 | all :: build_library_links |
---|
73 | @echo "------> (constituents.make) all done" |
---|
74 | |
---|
75 | javadirs :: |
---|
76 | @if test ! -d $(javabin) ; then $(mkdir) -p $(javabin) ; fi |
---|
77 | |
---|
78 | srcdirs :: |
---|
79 | @if test ! -d $(src) ; then $(mkdir) -p $(src) ; fi |
---|
80 | |
---|
81 | dirs :: |
---|
82 | @if test ! -r requirements ; then echo "No requirements file" ; fi; \ |
---|
83 | if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi |
---|
84 | |
---|
85 | build_library_links : dirs requirements |
---|
86 | @echo "------> (constituents.make) Rebuilding library links"; \ |
---|
87 | if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi; \ |
---|
88 | $(build_library_links) |
---|
89 | |
---|
90 | .DEFAULT :: |
---|
91 | @echo "You should provide a target for this file $@" |
---|
92 | # @if test "$@" = "$(cmt_lock_setup)"; then \ |
---|
93 | # /bin/rm -f $(cmt_lock_setup); \ |
---|
94 | # touch $(cmt_lock_setup); \ |
---|
95 | # fi |
---|
96 | |
---|
97 | #-- end of constituents_header ------ |
---|