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 | cmt_local_setup = /tmp/CMT_${PACKAGE}setup$(cmt_lock_pid).make |
---|
19 | cmt_final_setup = /tmp/CMT_${PACKAGE}setup.make |
---|
20 | else |
---|
21 | cmt_local_tagfile = $(${PACKAGE}_tag).make |
---|
22 | cmt_local_setup = $(bin)${PACKAGE}setup$(cmt_lock_pid).make |
---|
23 | cmt_final_setup = $(bin)${PACKAGE}setup.make |
---|
24 | endif |
---|
25 | |
---|
26 | #-------------------------------------------------------- |
---|
27 | |
---|
28 | cmt_lock_setup = /tmp/lock$(cmt_lock_pid).make |
---|
29 | cmt_temp_tag = /tmp/tag$(cmt_lock_pid).make |
---|
30 | |
---|
31 | first :: $(cmt_local_tagfile) |
---|
32 | @echo $(cmt_local_tagfile) ok |
---|
33 | |
---|
34 | $(cmt_local_tagfile) : $(cmt_lock_setup) |
---|
35 | @/bin/echo "------> (constituents.make) Rebuilding setup.make $(cmt_local_tagfile)" |
---|
36 | @if test -f $(cmt_local_tagfile); then /bin/rm -f $(cmt_local_tagfile); fi |
---|
37 | @$(cmtexe) -quiet -tag=$(tags) build tag_makefile >$(cmt_temp_tag) |
---|
38 | @mv $(cmt_temp_tag) $(cmt_local_tagfile) |
---|
39 | @if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi |
---|
40 | @echo CMTCONFIG=$(CMTCONFIG) |
---|
41 | @if test -f $(cmt_local_setup); then /bin/rm -f $(cmt_local_setup); fi |
---|
42 | @trap '/bin/rm -f ${cmt_local_setup}' 0 1 2 15; \ |
---|
43 | $(cmtexe) -quiet -tag=$(tags) show setup >>$(cmt_local_setup); \ |
---|
44 | if test ! -f $(cmt_final_setup); then \ |
---|
45 | mv $(cmt_local_setup) $(cmt_final_setup); \ |
---|
46 | else \ |
---|
47 | if /usr/bin/diff $(cmt_local_setup) $(cmt_final_setup) >/dev/null ; then \ |
---|
48 | echo "$(cmt_final_setup) untouched "; \ |
---|
49 | else \ |
---|
50 | mv $(cmt_local_setup) $(cmt_final_setup); \ |
---|
51 | fi; \ |
---|
52 | fi |
---|
53 | @/bin/echo setup.make ok |
---|
54 | |
---|
55 | ## /bin/mv $(cmt_local_setup) $(cmt_final_setup); fi |
---|
56 | |
---|
57 | -include $(cmt_local_tagfile) |
---|
58 | |
---|
59 | config :: checkuses ##$(cmt_local_tagfile) |
---|
60 | @exit 0 |
---|
61 | |
---|
62 | env.make :: |
---|
63 | printenv >env.make.tmp; $(cmtexe) -quiet check files env.make.tmp env.make |
---|
64 | |
---|
65 | all :: build_library_links |
---|
66 | @echo "------> (constituents.make) all done" |
---|
67 | |
---|
68 | javadirs :: |
---|
69 | @if test ! -d $(javabin) ; then $(mkdir) -p $(javabin) ; fi |
---|
70 | |
---|
71 | srcdirs :: |
---|
72 | @if test ! -d $(src) ; then $(mkdir) -p $(src) ; fi |
---|
73 | |
---|
74 | dirs :: |
---|
75 | @if test ! -r requirements ; then echo "No requirements file" ; fi; \ |
---|
76 | if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi |
---|
77 | |
---|
78 | build_library_links : dirs requirements |
---|
79 | @echo "------> (constituents.make) Rebuilding library links"; \ |
---|
80 | if test ! -d $(bin) ; then $(mkdir) -p $(bin) ; fi; \ |
---|
81 | $(build_library_links) |
---|
82 | |
---|
83 | .DEFAULT :: |
---|
84 | @if test "$@" = "$(cmt_lock_setup)"; then \ |
---|
85 | /bin/rm -f $(cmt_lock_setup); \ |
---|
86 | touch $(cmt_lock_setup); \ |
---|
87 | fi |
---|
88 | |
---|
89 | #-- end of constituents_header ------ |
---|