1 # @file <%project_file%>
4 <%if(requires || avoids)%>
6 <%foreach(uniq(requires))%>
7 if BUILD_<%uc(require)%>
9 <%foreach(uniq(avoids))%>
10 if !BUILD_<%uc(avoid)%>
16 man_MANS += <%man_files%>
20 <%if(install_this_target)%>bin<%else%>noinst<%endif%>_SCRIPTS += <%script_files%>
23 <%foreach(custom_types)%>
24 <%foreach(custom_type->input_files)%>
25 <%if(custom_type->input_file->output_files)%>
28 <%foreach(output_file, sort(custom_type->input_file->output_files))%>
29 <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(output_file)%><%else%><%output_file%><%endif%><%fornotlast(" \\")%>
33 <%if(multiple(custom_type->input_file->output_files))%>
34 <%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<%keyname_used(custom_type->input_file, first)%> \
36 <%foreach(output_file, sort(custom_type->input_file->output_files))%>
37 <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(output_file)%><%else%><%output_file%><%endif%><%fornotlast(" \\")%>
40 <%if(multiple(custom_type->input_file->output_files))%>
41 <%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)%>/<%basenoextension(custom_type->input_file)%><%else%><%noextension(custom_type->input_file)%><%endif%>-stamp<%keyname_used(custom_type->input_file, second)%>
43 <%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<%keyname_used(custom_type->input_file, third)%>: $(srcdir)/<%custom_type->input_file%><%if(custom_type->input_file->dependencies)%><%foreach(custom_type->input_file->dependencies)%> <%scope(enter, escape, \\s)%><%custom_type->input_file->dependencie%><%scope(leave)%><%endfor%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> <%scope(enter, escape, \\s)%><%dep%><%scope(leave)%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%> <%scope(enter, escape, \\s)%><%custom_type->dependent%><%scope(leave)%><%endfor%><%endif%><%endif%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%> <%scope(enter, escape, \\s)%><%dirname(dep_lib)%>/lib<%libname_prefix%><%basename(dep_lib)%><%if(configurations)%><%lib_modifier%><%endif%>.la<%scope(leave)%><%endfor%><%else%><%foreach(custom_type->dependent_libs)%> <%scope(enter, escape, \\s)%><%dirname(custom_type->dependent_lib)%>/lib<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(configurations)%><%lib_modifier%><%endif%>.la<%scope(leave)%><%endfor%><%endif%><%endif%>
45 <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/lib<%libname_prefix%><%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)%><%foreach(custom_type->input_file->dependencies)%> <%scope(enter, escape, \\s)%><%custom_type->input_file->dependencie%><%scope(leave)%><%endfor%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> <%scope(enter, escape, \\s)%><%dep%><%scope(leave)%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%> <%scope(enter, escape, \\s)%><%custom_type->dependent%><%scope(leave)%><%endfor%><%endif%><%endif%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%> <%scope(enter, escape, \\s)%><%dirname(dep_lib)%>/lib<%libname_prefix%><%basename(dep_lib)%><%if(configurations)%><%lib_modifier%><%endif%>.la<%scope(leave)%><%endfor%><%else%><%foreach(custom_type->dependent_libs)%> <%scope(enter, escape, \\s)%><%dirname(custom_type->dependent_lib)%>/lib<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(configurations)%><%lib_modifier%><%endif%>.la<%scope(leave)%><%endfor%><%endif%><%endif%>
47 <%if(flag_overrides(custom_type->input_file, gendir))%>
48 mkdir -p <%flag_overrides(custom_type->input_file, gendir)%>
50 <%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%> <%if(custom_type->output_option)%>$(srcdir)/<%custom_type->input_file%> <%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%><%else%>$(srcdir)/<%custom_type->input_file%><%endif%>
51 <%if(flag_overrides(custom_type->input_file, postcommand))%>
52 <%foreach(custom_type->input_file)%>
53 <%flag_overrides(custom_type->input_file, postcommand)%>
56 <%if(custom_type->postcommand)%>
57 <%foreach(custom_type->input_file)%>
58 <%custom_type->postcommand%>
62 <%if(multiple(custom_type->input_file->output_files))%>
70 <%if(exename || sharedname || staticname)%>
73 <%if(configurations)%>
74 <%foreach(configurations)%>
76 <%if(install_this_target)%>bin<%else%>noinst<%endif%>_PROGRAMS += <%exename%><%lib_modifier%>
77 <%configuration%> : <%exename%><%lib_modifier%>
79 <%if(install_this_target)%>lib<%else%>noinst<%endif%>_LTLIBRARIES += lib<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%lib_modifier%>.la
80 <%configuration%> : lib<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%lib_modifier%>.la
85 <%if(install_this_target)%>bin<%else%>noinst<%endif%>_PROGRAMS += <%exename%>
87 <%if(install_this_target)%>lib<%else%>noinst<%endif%>_LTLIBRARIES += lib<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.la
91 <%if(includes || defines || common_defines || macros || need_staticflags || dynamicflags || compile_flags)%>
94 <%normalize(exename)%>_CPPFLAGS<%if(configurations)%>_COMMON<%endif%> = \
96 lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%if(!configurations)%>_la<%endif%>_CPPFLAGS<%if(configurations)%>_COMMON<%endif%> = \
99 -I<%include%><%if(defines || common_defines || macros || need_staticflags || dynamicflags || compile_flags && !configurations)%> \<%else%><%fornotlast(" \\")%><%endif%>
101 <%foreach(defines common_defines macros)%>
102 -D<%define%><%if(need_staticflags || dynamicflags || compile_flags && !configurations)%> \<%else%><%fornotlast(" \\")%><%endif%>
104 <%if(compile_flags && !configurations)%>
105 <%foreach(compile_flags)%>
106 <%compile_flag%><%if(need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
109 <%if(need_staticflags)%>
111 <%foreach(staticflags)%>
112 -D<%staticflag%><%fornotlast(" \\")%>
115 -D__NO_STATIC_FLAGS_AVAILABLE__
118 <%foreach(dynamicflags)%>
119 -D<%dynamicflag%><%fornotlast(" \\")%>
122 <%if(configurations)%>
124 <%foreach(configurations)%>
126 <%normalize(exename)%><%lib_modifier%>_CPPFLAGS = $(<%normalize(exename)%>_CPPFLAGS_COMMON)<%if(compile_flags)%> <%compile_flags%><%endif%>
128 lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_CPPFLAGS = $(lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_CPPFLAGS_COMMON)<%if(compile_flags)%> <%compile_flags%><%endif%>
136 <%normalize(exename)%>_SOURCES<%if(configurations)%>_COMMON<%endif%> = \
138 lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%if(!configurations)%>_la<%endif%>_SOURCES<%if(configurations)%>_COMMON<%endif%> = \
140 <%foreach(source_file, sort(source_files))%>
141 <%if(!flag_overrides(source_file, buildflags))%>
146 <%foreach(header_file, sort(header_files inline_files))%>
147 <%header_file%><%fornotlast(" \\")%>
150 <%if(configurations)%>
152 <%foreach(configurations)%>
154 <%normalize(exename)%><%lib_modifier%>_SOURCES = $(<%normalize(exename)%>_SOURCES_COMMON)
156 lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_SOURCES = $(lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_SOURCES_COMMON)
160 <%if(libpaths && contains(libpaths, \.\./))%>
162 <%foreach(libpaths)%>
163 <%if(contains(libpath, \.\./))%>
171 <%normalize(exename)%>_DEPENDENCIES<%if(configurations)%>_COMMON<%endif%> = \
173 lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%if(!configurations)%>_la<%endif%>_DEPENDENCIES<%if(configurations)%>_COMMON<%endif%> = \
175 <%foreach(libpaths)%><%if(contains(libpath, \.\./))%> <%libpath%><%endif%><%endfor%>
176 <%if(configurations)%>
178 <%foreach(configurations)%>
180 <%normalize(exename)%><%lib_modifier%>_DEPENDENCIES += $(<%normalize(exename)%>_DEPENDENCIES_COMMON)
182 lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_DEPENDENCIES += \
183 $(lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_DEPENDENCIES_COMMON)
189 <%if(linkflags || libpaths)%>
191 <%normalize(exename)%>_LDFLAGS<%if(configurations)%>_COMMON<%endif%> = \
192 <%linkflags%><%foreach(libpaths)%> -L<%libpath%><%endfor%>
193 <%if(configurations)%>
195 <%foreach(configurations)%>
196 <%normalize(exename)%><%lib_modifier%>_LDFLAGS = $(<%normalize(exename)%>_LDFLAGS_COMMON)
201 <%if(linkflags || libpaths || am_version && install_this_target || am_release && install_this_target)%>
203 lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%if(!configurations)%>_la<%endif%>_LDFLAGS<%if(configurations)%>_COMMON<%endif%> = \
204 <%if(am_version && install_this_target)%> -version-number <%am_version%><%else%><%if(am_release && install_this_target)%> -release <%am_release%><%endif%><%endif%><%if(linkflags)%> <%linkflags%><%endif%><%foreach(libpaths)%> -L<%libpath%><%endfor%>
205 <%if(configurations)%>
207 <%foreach(configurations)%>
208 lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_LDFLAGS = $(lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_LDFLAGS_COMMON)
214 <%if(configurations)%>
215 <%foreach(configurations)%>
217 <%if(libs || pure_libs || lit_libs)%>
219 <%normalize(exename)%><%lib_modifier%>_LDADD = \
221 lib<%libname_prefix%><%lib%><%lib_modifier%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
223 <%foreach(lit_libs)%>
224 -l<%lit_lib%><%if(use_lib_modifier_for_lit_libs)%><%lib_modifier%><%endif%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
226 <%foreach(pure_libs)%>
227 <%pure_lib%><%fornotlast(" \\")%>
231 <%if(install_this_target)%>
232 <%if(libs || pure_libs || lit_libs)%>
234 lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_LIBADD = \
236 lib<%libname_prefix%><%lib%><%lib_modifier%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
238 <%foreach(lit_libs)%>
239 -l<%lit_lib%><%if(use_lib_modifier_for_lit_libs)%><%lib_modifier%><%endif%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
241 <%foreach(pure_libs)%>
242 <%pure_lib%><%fornotlast(" \\")%>
250 <%if(libs || pure_libs || lit_libs)%>
252 <%normalize(exename)%>_LDADD = \
254 lib<%libname_prefix%><%lib%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
256 <%foreach(lit_libs)%>
257 -l<%lit_lib%><%if(use_lib_modifier_for_lit_libs)%><%lib_modifier%><%endif%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
259 <%foreach(pure_libs)%>
260 <%pure_lib%><%fornotlast(" \\")%>
264 <%if(install_this_target)%>
265 <%if(libs || pure_libs || lit_libs)%>
267 lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_LIBADD = \
269 lib<%libname_prefix%><%lib%><%lib_modifier%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
271 <%foreach(lit_libs)%>
272 -l<%lit_lib%><%if(use_lib_modifier_for_lit_libs)%><%lib_modifier%><%endif%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
274 <%foreach(pure_libs)%>
275 <%pure_lib%><%fornotlast(" \\")%>
283 <%if(header_files || inline_files || template_files || idl_files || pidl_files)%>
286 <%project_name%>_includedir = <%includedir%>
289 <%if(install_headers)%><%project_name%>_include<%else%>noinst<%endif%>_HEADERS += \
290 <%foreach(header, sort(header_files inline_files template_files idl_files pidl_files))%>
291 <%header%><%fornotlast(" \\")%>
295 <%if(pkgconfig_files)%>
298 <%foreach(pkgconfig_files)%>
299 <%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%>
303 <%foreach(pkgconfig_files)%>
304 <%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%>
306 <%foreach(pkgconfig_files)%>
308 <%basenoextension(pkgconfig_file)%>: ${top_builddir}/config.status ${srcdir}/<%pkgconfig_file%>
309 ${top_builddir}/config.status --file "$@":${srcdir}/<%pkgconfig_file%>
312 <%foreach(sort(source_files))%>
313 <%if(flag_overrides(source_file, buildflags))%>
315 <%if(configurations)%>
316 <%foreach(configurations)%>
317 <%if(exename)%><%normalize(exename)%><%lib_modifier%>_LDADD<%else%>lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la_LIBADD<%endif%> += lib<%normalize(source_file)%>_convenience<%forcount%><%lib_modifier%>.la
318 noinst_LTLIBRARIES += lib<%normalize(source_file)%>_convenience<%forcount%><%lib_modifier%>.la
319 lib<%normalize(source_file)%>_convenience<%forcount%><%lib_modifier%>_la_SOURCES = <%source_file%>
320 lib<%normalize(source_file)%>_convenience<%forcount%><%lib_modifier%>_la_CPPFLAGS = $(<%if(exename)%><%normalize(exename)%><%lib_modifier%><%else%>lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%><%lib_modifier%>_la<%endif%>_CPPFLAGS) <%flag_overrides(source_file, buildflags)%><%if(compile_flags)%> <%compile_flags%><%endif%>
323 <%if(exename)%><%normalize(exename)%>_LDADD<%else%>lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LIBADD<%endif%> += lib<%normalize(source_file)%>_convenience<%forcount%>.la
324 noinst_LTLIBRARIES += lib<%normalize(source_file)%>_convenience<%forcount%>.la
325 lib<%normalize(source_file)%>_convenience<%forcount%>_la_SOURCES = <%source_file%>
326 lib<%normalize(source_file)%>_convenience<%forcount%>_la_CPPFLAGS = $(<%if(exename)%><%normalize(exename)%><%else%>lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la<%endif%>_CPPFLAGS) <%flag_overrides(source_file, buildflags)%><%if(compile_flags)%> <%compile_flags%><%endif%>
337 <%if(avoids || requires)%>
339 <%foreach(reverse(uniq(avoids)))%>
340 endif !BUILD_<%uc(avoid)%>
342 <%foreach(reverse(uniq(requires)))%>
343 endif BUILD_<%uc(require)%>
346 <%if(pkgconfig_files || resource_files)%>
349 <%foreach(extra_dist, sort(pkgconfig_files resource_files))%>
350 <%extra_dist%><%fornotlast(" \\")%>