1 | #-- start of constituent ------ |
---|
2 | |
---|
3 | cmt_${CONSTITUENT}_${HASTARGETTAG} = 1 |
---|
4 | |
---|
5 | #-------------------------------------------------------- |
---|
6 | |
---|
7 | ifdef cmt_${CONSTITUENT}_has_target_tag |
---|
8 | |
---|
9 | #cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag)_${CONSTITUENT}.make |
---|
10 | cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.make |
---|
11 | cmt_local_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}$$$$.make |
---|
12 | cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.make |
---|
13 | #cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}_${CONSTITUENT}setup.make |
---|
14 | cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make |
---|
15 | |
---|
16 | ${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT} |
---|
17 | |
---|
18 | #$(cmt_local_tagfile_${CONSTITUENT}) : $(cmt_lock_setup) |
---|
19 | ifndef QUICK |
---|
20 | $(cmt_local_tagfile_${CONSTITUENT}) :: |
---|
21 | else |
---|
22 | $(cmt_local_tagfile_${CONSTITUENT}) : |
---|
23 | endif |
---|
24 | $(echo) "(constituents.make) Rebuilding $@"; \ |
---|
25 | if test -f $(cmt_local_tagfile_${CONSTITUENT}); then /bin/rm -f $(cmt_local_tagfile_${CONSTITUENT}); fi ; \ |
---|
26 | $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build tag_makefile >>$(cmt_local_tagfile_${CONSTITUENT}) |
---|
27 | $(echo) "(constituents.make) Rebuilding $(cmt_final_setup_${CONSTITUENT})"; \ |
---|
28 | test ! -f $(cmt_local_setup_${CONSTITUENT}) || \rm -f $(cmt_local_setup_${CONSTITUENT}); \ |
---|
29 | trap '\rm -f $(cmt_local_setup_${CONSTITUENT})' 0 1 2 15; \ |
---|
30 | $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) show setup >$(cmt_local_setup_${CONSTITUENT}) && \ |
---|
31 | if [ -f $(cmt_final_setup_${CONSTITUENT}) ] && \ |
---|
32 | \cmp -s $(cmt_final_setup_${CONSTITUENT}) $(cmt_local_setup_${CONSTITUENT}); then \ |
---|
33 | \rm $(cmt_local_setup_${CONSTITUENT}); else \ |
---|
34 | \mv -f $(cmt_local_setup_${CONSTITUENT}) $(cmt_final_setup_${CONSTITUENT}); fi |
---|
35 | |
---|
36 | else |
---|
37 | |
---|
38 | #cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag).make |
---|
39 | cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).make |
---|
40 | cmt_final_setup_${CONSTITUENT} = $(bin)setup.make |
---|
41 | #cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}setup.make |
---|
42 | cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make |
---|
43 | |
---|
44 | endif |
---|
45 | |
---|
46 | ifdef STRUCTURED_OUTPUT |
---|
47 | ${CONSTITUENT}dirs : |
---|
48 | @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi |
---|
49 | $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT} |
---|
50 | else |
---|
51 | ${CONSTITUENT}dirs : ; |
---|
52 | endif |
---|
53 | |
---|
54 | #ifndef QUICK |
---|
55 | #ifdef STRUCTURED_OUTPUT |
---|
56 | # ${CONSTITUENT}dirs :: |
---|
57 | # @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi |
---|
58 | # $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT} |
---|
59 | # |
---|
60 | #$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs ${CONSTITUENT}dirs |
---|
61 | #else |
---|
62 | #$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs |
---|
63 | #endif |
---|
64 | #else |
---|
65 | #$(cmt_local_${CONSTITUENT}_makefile) :: $(cmt_local_tagfile_${CONSTITUENT}) |
---|
66 | #endif |
---|
67 | |
---|
68 | $(cmt_local_${CONSTITUENT}_makefile) : $(cmt_local_tagfile_${CONSTITUENT}) |
---|
69 | $(echo) "(constituents.make) Building ${CONSTITUENT}.make"; \ |
---|
70 | $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT} |
---|
71 | |
---|
72 | ifndef QUICK |
---|
73 | ${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) build_library_links dirs ${CONSTITUENT}dirs |
---|
74 | else |
---|
75 | ${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs ${CONSTITUENT}dirs |
---|
76 | endif |
---|
77 | $(echo) "(constituents.make) Starting ${CONSTITUENT}" |
---|
78 | @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT} |
---|
79 | $(echo) "(constituents.make) ${CONSTITUENT} done" |
---|
80 | |
---|
81 | clean :: ${CONSTITUENT}clean |
---|
82 | |
---|
83 | ${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) $(cmt_local_${CONSTITUENT}_makefile) |
---|
84 | $(echo) "(constituents.make) Starting ${CONSTITUENT}clean" |
---|
85 | @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean |
---|
86 | $(echo) "(constituents.make) ${CONSTITUENT}clean done" |
---|
87 | # @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ |
---|
88 | # $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) cmt_lock_pid=$${cmt_lock_pid} ${CONSTITUENT}clean; \ |
---|
89 | # fi |
---|
90 | |
---|
91 | ## /bin/rm -f $(cmt_local_${CONSTITUENT}_makefile) $(bin)${CONSTITUENT}_dependencies.make |
---|
92 | |
---|
93 | install :: ${CONSTITUENT}install |
---|
94 | |
---|
95 | ${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) |
---|
96 | $(echo) "(constituents.make) Starting install ${CONSTITUENT}" |
---|
97 | @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) install |
---|
98 | $(echo) "(constituents.make) install ${CONSTITUENT} done" |
---|
99 | |
---|
100 | uninstall :: ${CONSTITUENT}uninstall |
---|
101 | |
---|
102 | ${CONSTITUENT}uninstall :: $(cmt_local_${CONSTITUENT}_makefile) |
---|
103 | $(echo) "(constituents.make) Starting uninstall ${CONSTITUENT}" |
---|
104 | @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall |
---|
105 | $(echo) "(constituents.make) uninstall ${CONSTITUENT} done" |
---|
106 | |
---|
107 | ifndef PEDANTIC |
---|
108 | .DEFAULT:: |
---|
109 | $(echo) "(constituents.make) Starting $@ ${CONSTITUENT}" |
---|
110 | $(echo) Using default action for $@ |
---|
111 | $(echo) "(constituents.make) $@ ${CONSTITUENT} done" |
---|
112 | endif |
---|
113 | |
---|
114 | #-- end of constituent ------ |
---|