107 |
bj |
1 |
# @file <%project_file%>
|
|
|
2 |
#
|
|
|
3 |
# $Id: automake.mpd 107 2005-09-02 16:42:23Z bj $
|
|
|
4 |
<%marker(top)%>
|
|
|
5 |
<%if(requires || avoids)%>
|
|
|
6 |
|
|
|
7 |
<%foreach(uniq(requires))%>
|
|
|
8 |
if BUILD_<%uc(require)%>
|
|
|
9 |
<%endfor%>
|
|
|
10 |
<%foreach(uniq(avoids))%>
|
|
|
11 |
if !BUILD_<%uc(avoid)%>
|
|
|
12 |
<%endfor%>
|
|
|
13 |
<%endif%>
|
|
|
14 |
<%marker(macros)%>
|
|
|
15 |
<%if(man_files)%>
|
|
|
16 |
|
|
|
17 |
man_MANS += <%man_files%>
|
|
|
18 |
<%endif%>
|
|
|
19 |
<%if(script_files)%>
|
|
|
20 |
|
|
|
21 |
<%if(install_this_target)%>bin<%else%>noinst<%endif%>_SCRIPTS += <%script_files%>
|
|
|
22 |
<%endif%>
|
|
|
23 |
<%if(custom_types)%>
|
|
|
24 |
|
|
|
25 |
<%foreach(custom_types)%>
|
|
|
26 |
<%foreach(custom_type->input_files)%>
|
|
|
27 |
<%if(custom_type->input_file->output_files)%>
|
|
|
28 |
BUILT_SOURCES += \
|
|
|
29 |
<%foreach(output_file, sort(custom_type->input_file->output_files))%>
|
|
|
30 |
<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(output_file)%><%else%><%output_file%><%endif%><%fornotlast(" \\")%>
|
|
|
31 |
<%endfor%>
|
|
|
32 |
|
|
|
33 |
CLEANFILES += \
|
|
|
34 |
<%if(multiple(custom_type->input_file->output_files))%>
|
|
|
35 |
<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basenoextension(custom_type->input_file)%><%else%><%noextension(custom_type->input_file)%><%endif%>-stamp \
|
|
|
36 |
<%endif%>
|
|
|
37 |
<%foreach(output_file, sort(custom_type->input_file->output_files))%>
|
|
|
38 |
<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(output_file)%><%else%><%output_file%><%endif%><%fornotlast(" \\")%>
|
|
|
39 |
<%endfor%>
|
|
|
40 |
|
|
|
41 |
<%if(multiple(custom_type->input_file->output_files))%>
|
|
|
42 |
<%foreach(output_file, sort(custom_type->input_file->output_files))%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(output_file)%><%else%><%output_file%><%endif%><%fornotlast(" ")%><%endfor%>: <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basenoextension(custom_type->input_file)%>-stamp
|
|
|
43 |
|
|
|
44 |
<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basenoextension(custom_type->input_file)%><%else%><%noextension(custom_type->input_file)%><%endif%>-stamp: $(srcdir)/<%custom_type->input_file%><%if(custom_type->input_file->dependencies)%> <%custom_type->input_file->dependencies%><%endif%>
|
|
|
45 |
<%else%>
|
|
|
46 |
<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>: $(srcdir)/<%custom_type->input_file%><%if(custom_type->input_file->dependencies)%> <%custom_type->input_file->dependencies%><%endif%>
|
|
|
47 |
<%endif%>
|
|
|
48 |
<%if(flag_overrides(custom_type->input_file, gendir))%>
|
|
|
49 |
mkdir -p <%flag_overrides(custom_type->input_file, gendir)%>
|
|
|
50 |
<%endif%>
|
|
|
51 |
<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(srcdir)/<%custom_type->input_file%><%if(custom_type->output_option)%> <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%endif%>
|
|
|
52 |
<%if(flag_overrides(custom_type->input_file, postcommand))%>
|
|
|
53 |
<%foreach(custom_type->input_file)%>
|
|
|
54 |
<%flag_overrides(custom_type->input_file, postcommand)%>
|
|
|
55 |
<%endfor%>
|
|
|
56 |
<%else%>
|
|
|
57 |
<%if(custom_type->postcommand)%>
|
|
|
58 |
<%foreach(custom_type->input_file)%>
|
|
|
59 |
<%custom_type->postcommand%>
|
|
|
60 |
<%endfor%>
|
|
|
61 |
<%endif%>
|
|
|
62 |
<%endif%>
|
|
|
63 |
<%if(multiple(custom_type->input_file->output_files))%>
|
|
|
64 |
@touch "$@"
|
|
|
65 |
<%endif%>
|
|
|
66 |
|
|
|
67 |
<%endif%>
|
|
|
68 |
<%endfor%>
|
|
|
69 |
<%endfor%>
|
|
|
70 |
<%endif%>
|
|
|
71 |
<%marker(local)%>
|
|
|
72 |
<%if(exename || sharedname || staticname)%>
|
|
|
73 |
<%if(source_files)%>
|
|
|
74 |
<%if(exename)%>
|
|
|
75 |
<%if(install_this_target)%>bin<%else%>noinst<%endif%>_PROGRAMS += <%exename%>
|
|
|
76 |
<%else%>
|
|
|
77 |
<%if(install_this_target)%>lib<%else%>noinst<%endif%>_LTLIBRARIES += lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.la
|
|
|
78 |
<%endif%>
|
|
|
79 |
<%endif%>
|
|
|
80 |
<%if(am_includes || defines || common_defines || macros || need_staticflags || dynamicflags || compile_flags)%>
|
|
|
81 |
|
|
|
82 |
<%if(exename)%>
|
|
|
83 |
<%normalize(exename)%>_CPPFLAGS = \
|
|
|
84 |
<%else%>
|
|
|
85 |
lib<%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_CPPFLAGS = \
|
|
|
86 |
<%endif%>
|
|
|
87 |
<%foreach(am_includes)%>
|
|
|
88 |
-I<%am_include%><%if(defines || common_defines || macros || need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
|
|
|
89 |
<%endfor%>
|
|
|
90 |
<%foreach(defines common_defines macros)%>
|
|
|
91 |
-D<%define%><%if(compile_flags || need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
|
|
|
92 |
<%endfor%>
|
|
|
93 |
<%if(compile_flags)%>
|
|
|
94 |
<%compile_flags%><%if(need_staticflags || dynamicflags)%> \<%endif%>
|
|
|
95 |
<%endif%>
|
|
|
96 |
<%if(need_staticflags)%>
|
|
|
97 |
<%if(staticflags)%>
|
|
|
98 |
<%foreach(staticflags)%>
|
|
|
99 |
-D<%staticflag%><%fornotlast(" \\")%>
|
|
|
100 |
<%endfor%>
|
|
|
101 |
<%else%>
|
|
|
102 |
-D__NO_STATIC_FLAGS_AVAILABLE__
|
|
|
103 |
<%endif%>
|
|
|
104 |
<%else%>
|
|
|
105 |
<%if(dynamicflags)%>
|
|
|
106 |
<%foreach(dynamicflags)%>
|
|
|
107 |
-D<%dynamicflag%><%fornotlast(" \\")%>
|
|
|
108 |
<%endfor%>
|
|
|
109 |
<%endif%>
|
|
|
110 |
<%endif%>
|
|
|
111 |
<%endif%>
|
|
|
112 |
<%if(source_files)%>
|
|
|
113 |
|
|
|
114 |
<%if(exename)%>
|
|
|
115 |
<%normalize(exename)%>_SOURCES = \
|
|
|
116 |
<%else%>
|
|
|
117 |
lib<%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_SOURCES = \
|
|
|
118 |
<%endif%>
|
|
|
119 |
<%foreach(source_files)%>
|
|
|
120 |
<%source_file%><%if(exename)%><%if(header_files || inline_files)%> \<%else%><%fornotlast(" \\")%><%endif%><%else%><%fornotlast(" \\")%><%endif%>
|
|
|
121 |
<%endfor%>
|
|
|
122 |
<%if(exename)%>
|
|
|
123 |
<%if(header_files || inline_files)%>
|
|
|
124 |
<%foreach(header_files inline_files)%>
|
|
|
125 |
<%header_file%><%fornotlast(" \\")%>
|
|
|
126 |
<%endfor%>
|
|
|
127 |
<%endif%>
|
|
|
128 |
<%endif%>
|
|
|
129 |
<%endif%>
|
|
|
130 |
<%if(exename)%>
|
|
|
131 |
<%if(linkflags)%>
|
|
|
132 |
|
|
|
133 |
<%normalize(exename)%>_LDFLAGS = \
|
|
|
134 |
<%linkflags%>
|
|
|
135 |
<%endif%>
|
|
|
136 |
<%else%>
|
|
|
137 |
<%if(linkflags || am_version && install_this_target)%>
|
|
|
138 |
|
|
|
139 |
lib<%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LDFLAGS = \
|
|
|
140 |
<%if(am_version && install_this_target)%> -version-number <%am_version%><%endif%><%if(linkflags)%> <%linkflags%><%endif%>
|
|
|
141 |
<%endif%>
|
|
|
142 |
<%endif%>
|
|
|
143 |
<%if(exename)%>
|
|
|
144 |
<%if(libs || pure_libs || lit_libs)%>
|
|
|
145 |
|
|
|
146 |
<%normalize(exename)%>_LDADD = \
|
|
|
147 |
<%foreach(libs)%> lib<%lib%>.la<%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>
|
|
|
148 |
<%endif%>
|
|
|
149 |
<%else%>
|
|
|
150 |
<%if(install_this_target)%>
|
|
|
151 |
<%if(libs || pure_libs || lit_libs)%>
|
|
|
152 |
|
|
|
153 |
lib<%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LIBADD = \
|
|
|
154 |
<%foreach(libs)%> lib<%lib%>.la<%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>
|
|
|
155 |
<%endif%>
|
|
|
156 |
<%endif%>
|
|
|
157 |
<%endif%>
|
|
|
158 |
<%if(!exename)%>
|
|
|
159 |
<%if(header_files || inline_files || template_files || idl_files || pidl_files)%>
|
|
|
160 |
|
|
|
161 |
<%if(includedir)%>
|
|
|
162 |
<%project_name%>_includedir = <%includedir%>
|
|
|
163 |
|
|
|
164 |
<%endif%>
|
|
|
165 |
<%if(install_headers)%><%project_name%>_include<%else%>noinst<%endif%>_HEADERS += \
|
|
|
166 |
<%foreach(header, sort(header_files inline_files template_files idl_files pidl_files))%>
|
|
|
167 |
<%header%><%fornotlast(" \\")%>
|
|
|
168 |
<%endfor%>
|
|
|
169 |
<%endif%>
|
|
|
170 |
<%endif%>
|
|
|
171 |
<%endif%>
|
|
|
172 |
<%if(pkgconfig_files)%>
|
|
|
173 |
|
|
|
174 |
pkgconfig_DATA += \
|
|
|
175 |
<%foreach(pkgconfig_files)%>
|
|
|
176 |
<%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%>
|
|
|
177 |
<%endfor%>
|
|
|
178 |
|
|
|
179 |
CLEANFILES += \
|
|
|
180 |
<%foreach(pkgconfig_files)%>
|
|
|
181 |
<%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%>
|
|
|
182 |
<%endfor%>
|
|
|
183 |
<%foreach(pkgconfig_files)%>
|
|
|
184 |
|
|
|
185 |
<%basenoextension(pkgconfig_file)%>: ${top_builddir}/config.status ${srcdir}/<%pkgconfig_file%>
|
|
|
186 |
${top_builddir}/config.status --file "$@":${srcdir}/<%pkgconfig_file%>
|
|
|
187 |
<%endfor%>
|
|
|
188 |
<%endif%>
|
|
|
189 |
<%if(postbuild)%>
|
|
|
190 |
|
|
|
191 |
all: __postbuild__
|
|
|
192 |
|
|
|
193 |
__postbuild__:
|
|
|
194 |
@<%eval(postbuild)%>
|
|
|
195 |
<%endif%>
|
|
|
196 |
<%if(avoids || requires)%>
|
|
|
197 |
|
|
|
198 |
<%foreach(reverse(uniq(avoids)))%>
|
|
|
199 |
endif !BUILD_<%uc(avoid)%>
|
|
|
200 |
<%endfor%>
|
|
|
201 |
<%foreach(reverse(uniq(requires)))%>
|
|
|
202 |
endif BUILD_<%uc(require)%>
|
|
|
203 |
<%endfor%>
|
|
|
204 |
<%endif%>
|
|
|
205 |
<%if(pkgconfig_files || resource_files)%>
|
|
|
206 |
|
|
|
207 |
EXTRA_DIST += \
|
|
|
208 |
<%foreach(extra_dist, sort(pkgconfig_files resource_files))%>
|
|
|
209 |
<%extra_dist%><%fornotlast(" \\")%>
|
|
|
210 |
<%endfor%>
|
|
|
211 |
|
|
|
212 |
<%endif%>
|
|
|
213 |
<%marker(bottom)%>
|