1 | #-- start of constituent_app_lib ------ |
---|
2 | |
---|
3 | cmt_${CONSTITUENT}_${HASTARGETTAG} = 1 |
---|
4 | cmt_${CONSTITUENT}_${HASPROTOTYPES} = 1 |
---|
5 | |
---|
6 | #-------------------------------------- |
---|
7 | |
---|
8 | ifdef cmt_${CONSTITUENT}_has_target_tag |
---|
9 | |
---|
10 | cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.make |
---|
11 | cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.make |
---|
12 | cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make |
---|
13 | |
---|
14 | ${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT} |
---|
15 | |
---|
16 | else |
---|
17 | |
---|
18 | cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).make |
---|
19 | cmt_final_setup_${CONSTITUENT} = $(bin)setup.make |
---|
20 | cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make |
---|
21 | |
---|
22 | endif |
---|
23 | |
---|
24 | not_${CONSTITUENT}compile_dependencies = { n=0; for p in $?; do m=0; for d in $(${CONSTITUENT}compile_dependencies); do if [ $$p = $$d ]; then m=1; break; fi; done; if [ $$m -eq 0 ]; then n=1; break; fi; done; [ $$n -eq 1 ]; } |
---|
25 | |
---|
26 | ifdef STRUCTURED_OUTPUT |
---|
27 | ${CONSTITUENT}dirs : |
---|
28 | @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi |
---|
29 | $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT} |
---|
30 | else |
---|
31 | ${CONSTITUENT}dirs : ; |
---|
32 | endif |
---|
33 | |
---|
34 | ifdef cmt_${CONSTITUENT}_has_target_tag |
---|
35 | |
---|
36 | ifndef QUICK |
---|
37 | $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}compile_dependencies) build_library_links |
---|
38 | $(echo) "(constituents.make) Building ${CONSTITUENT}.make"; \ |
---|
39 | $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT} |
---|
40 | else |
---|
41 | $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}compile_dependencies) $(cmt_build_library_linksstamp) $(use_requirements) |
---|
42 | @if [ ! -f $@ ] || [ ! -f $(cmt_local_tagfile_${CONSTITUENT}) ] || \ |
---|
43 | [ ! -f $(cmt_final_setup_${CONSTITUENT}) ] || \ |
---|
44 | $(not_${CONSTITUENT}compile_dependencies) ; then \ |
---|
45 | test -z "$(cmtmsg)" || \ |
---|
46 | echo "$(CMTMSGPREFIX)" "(constituents.make) Building ${CONSTITUENT}.make"; \ |
---|
47 | $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_config -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \ |
---|
48 | fi |
---|
49 | endif |
---|
50 | |
---|
51 | else |
---|
52 | |
---|
53 | ifndef QUICK |
---|
54 | $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}compile_dependencies) build_library_links |
---|
55 | $(echo) "(constituents.make) Building ${CONSTITUENT}.make"; \ |
---|
56 | $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -without_cmt -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT} |
---|
57 | else |
---|
58 | $(cmt_local_${CONSTITUENT}_makefile) : $(${CONSTITUENT}compile_dependencies) $(cmt_build_library_linksstamp) $(bin)${CONSTITUENT}.in |
---|
59 | @if [ ! -f $@ ] || [ ! -f $(cmt_local_tagfile_${CONSTITUENT}) ] || \ |
---|
60 | [ ! -f $(cmt_final_setup_${CONSTITUENT}) ] || \ |
---|
61 | $(not_${CONSTITUENT}compile_dependencies) ; then \ |
---|
62 | test -z "$(cmtmsg)" || \ |
---|
63 | echo "$(CMTMSGPREFIX)" "(constituents.make) Building ${CONSTITUENT}.make"; \ |
---|
64 | $(cmtexe) -f=$(bin)${CONSTITUENT}.in -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -without_cmt -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \ |
---|
65 | fi |
---|
66 | endif |
---|
67 | |
---|
68 | endif |
---|
69 | |
---|
70 | # $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT} |
---|
71 | |
---|
72 | ifdef cmt_${CONSTITUENT}_has_prototypes |
---|
73 | |
---|
74 | ${CONSTITUENT} :: ${CONSTITUENT}prototype ${CONSTITUENT}compile ${CONSTITUENT}install ; |
---|
75 | |
---|
76 | ${CONSTITUENT}prototype : $(${CONSTITUENT}prototype_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs ${CONSTITUENT}dirs |
---|
77 | $(echo) "(constituents.make) Starting $@" |
---|
78 | @if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ |
---|
79 | $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) $@; \ |
---|
80 | fi |
---|
81 | # @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) $@ |
---|
82 | $(echo) "(constituents.make) $@ done" |
---|
83 | |
---|
84 | ${CONSTITUENT}compile : ${CONSTITUENT}prototype |
---|
85 | |
---|
86 | else |
---|
87 | |
---|
88 | ${CONSTITUENT} :: ${CONSTITUENT}compile ${CONSTITUENT}install ; |
---|
89 | |
---|
90 | endif |
---|
91 | |
---|
92 | ${CONSTITUENT}compile : $(${CONSTITUENT}compile_dependencies) $(cmt_local_${CONSTITUENT}_makefile) dirs ${CONSTITUENT}dirs |
---|
93 | $(echo) "(constituents.make) Starting $@" |
---|
94 | @if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ |
---|
95 | $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) $@; \ |
---|
96 | fi |
---|
97 | # @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) $@ |
---|
98 | $(echo) "(constituents.make) $@ done" |
---|
99 | |
---|
100 | clean :: ${CONSTITUENT}clean ; |
---|
101 | |
---|
102 | ${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile) |
---|
103 | $(echo) "(constituents.make) Starting ${CONSTITUENT}clean" |
---|
104 | @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ |
---|
105 | $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean; \ |
---|
106 | fi |
---|
107 | $(echo) "(constituents.make) ${CONSTITUENT}clean done" |
---|
108 | # @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean |
---|
109 | |
---|
110 | ## /bin/rm -f $(cmt_local_${CONSTITUENT}_makefile) $(bin)${CONSTITUENT}_dependencies.make |
---|
111 | |
---|
112 | install :: ${CONSTITUENT}install ; |
---|
113 | |
---|
114 | ${CONSTITUENT}install :: ${CONSTITUENT}compile $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) |
---|
115 | $(echo) "(constituents.make) Starting install ${CONSTITUENT}" |
---|
116 | @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) $@ |
---|
117 | $(echo) "(constituents.make) install ${CONSTITUENT} done" |
---|
118 | |
---|
119 | uninstall : ${CONSTITUENT}uninstall |
---|
120 | |
---|
121 | $(foreach d,$(${CONSTITUENT}_dependencies),$(eval $(d)uninstall_dependencies += ${CONSTITUENT}uninstall)) |
---|
122 | |
---|
123 | ${CONSTITUENT}uninstall : $(${CONSTITUENT}uninstall_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile) |
---|
124 | $(echo) "(constituents.make) Starting uninstall ${CONSTITUENT}" |
---|
125 | @if test -f $(cmt_local_${CONSTITUENT}_makefile); then \ |
---|
126 | $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall; \ |
---|
127 | fi |
---|
128 | # @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall |
---|
129 | $(echo) "(constituents.make) uninstall ${CONSTITUENT} done" |
---|
130 | |
---|
131 | remove_library_links :: ${CONSTITUENT}uninstall ; |
---|
132 | |
---|
133 | ifndef PEDANTIC |
---|
134 | .DEFAULT:: |
---|
135 | $(echo) "(constituents.make) Starting $@ ${CONSTITUENT}" |
---|
136 | $(echo) Using default action for $@ |
---|
137 | $(echo) "(constituents.make) $@ ${CONSTITUENT} done" |
---|
138 | endif |
---|
139 | |
---|
140 | #-- end of constituent_app_lib ------ |
---|