Rev 198 | Go to most recent revision | Blame | Last modification | View Log | RSS feed
# @file <%project_file%>
#
# $Id: automake.mpd 217 2006-05-05 09:35:48Z bj $
<%marker(top)%>
<%if(requires || avoids)%>
<%foreach(uniq(requires))%>
if BUILD_<%uc(require)%>
<%endfor%>
<%foreach(uniq(avoids))%>
if !BUILD_<%uc(avoid)%>
<%endfor%>
<%endif%>
<%marker(macros)%>
<%if(man_files)%>
man_MANS += <%man_files%>
<%endif%>
<%if(script_files)%>
<%if(install_this_target)%>bin<%else%>noinst<%endif%>_SCRIPTS += <%script_files%>
<%endif%>
<%if(custom_types)%>
<%foreach(custom_types)%>
<%foreach(custom_type->input_files)%>
<%if(custom_type->input_file->output_files)%>
BUILT_SOURCES += \
<%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%>
CLEANFILES += \
<%if(multiple(custom_type->input_file->output_files))%>
<%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 \
<%endif%>
<%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(multiple(custom_type->input_file->output_files))%>
<%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
<%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%><%if(flag_overrides(custom_type->input_file, dependent))%> <%flag_overrides(custom_type->input_file, dependent)%><%else%><%if(custom_type->dependent)%> <%custom_type->dependent%><%endif%><%endif%>
<%else%>
<%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%><%if(flag_overrides(custom_type->input_file, dependent))%> <%flag_overrides(custom_type->input_file, dependent)%><%else%><%if(custom_type->dependent)%> <%custom_type->dependent%><%endif%><%endif%>
<%endif%>
<%if(flag_overrides(custom_type->input_file, gendir))%>
mkdir -p <%flag_overrides(custom_type->input_file, gendir)%>
<%endif%>
<%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)%> <%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%> $(srcdir)/<%custom_type->input_file%>
<%if(flag_overrides(custom_type->input_file, postcommand))%>
<%foreach(custom_type->input_file)%>
<%flag_overrides(custom_type->input_file, postcommand)%>
<%endfor%>
<%else%>
<%if(custom_type->postcommand)%>
<%foreach(custom_type->input_file)%>
<%custom_type->postcommand%>
<%endfor%>
<%endif%>
<%endif%>
<%if(multiple(custom_type->input_file->output_files))%>
@touch "$@"
<%endif%>
<%endif%>
<%endfor%>
<%endfor%>
<%endif%>
<%marker(local)%>
<%if(exename || sharedname || staticname)%>
<%if(source_files)%>
<%if(exename)%>
<%if(install_this_target)%>bin<%else%>noinst<%endif%>_PROGRAMS += <%exename%>
<%else%>
<%if(install_this_target)%>lib<%else%>noinst<%endif%>_LTLIBRARIES += lib<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.la
<%endif%>
<%endif%>
<%if(am_includes || defines || common_defines || macros || need_staticflags || dynamicflags || compile_flags)%>
<%if(exename)%>
<%normalize(exename)%>_CPPFLAGS = \
<%else%>
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_CPPFLAGS = \
<%endif%>
<%foreach(am_includes)%>
-I<%am_include%><%if(defines || common_defines || macros || compile_flags || need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
<%endfor%>
<%foreach(defines common_defines macros)%>
-D<%define%><%if(compile_flags || need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
<%endfor%>
<%foreach(compile_flags)%>
<%compile_flag%><%if(need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
<%endfor%>
<%if(need_staticflags)%>
<%if(staticflags)%>
<%foreach(staticflags)%>
-D<%staticflag%><%fornotlast(" \\")%>
<%endfor%>
<%else%>
-D__NO_STATIC_FLAGS_AVAILABLE__
<%endif%>
<%else%>
<%foreach(dynamicflags)%>
-D<%dynamicflag%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%endif%>
<%if(source_files)%>
<%if(exename)%>
<%normalize(exename)%>_SOURCES = \
<%else%>
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_SOURCES = \
<%endif%>
<%foreach(source_file, sort(source_files))%>
<%if(!flag_overrides(source_file, buildflags))%>
<%source_file%> \
<%endif%>
<%endfor%>
<%if(exename)%>
<%foreach(header_file, sort(header_files inline_files))%>
<%header_file%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%endif%>
<%if(exename)%>
<%if(linkflags)%>
<%normalize(exename)%>_LDFLAGS = \
<%linkflags%>
<%endif%>
<%else%>
<%if(linkflags || am_version && install_this_target)%>
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LDFLAGS = \
<%if(am_version && install_this_target)%> -version-number <%am_version%><%endif%><%if(linkflags)%> <%linkflags%><%endif%>
<%endif%>
<%endif%>
<%if(exename)%>
<%if(libs || pure_libs || lit_libs)%>
<%normalize(exename)%>_LDADD = \
<%foreach(libs)%>
lib<%libname_prefix%><%lib%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
<%endfor%>
<%foreach(lit_libs)%>
-l<%lit_lib%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
<%endfor%>
<%foreach(pure_libs)%>
<%pure_lib%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%else%>
<%if(install_this_target)%>
<%if(libs || pure_libs || lit_libs)%>
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LIBADD = \
<%foreach(libs)%>
lib<%libname_prefix%><%lib%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
<%endfor%>
<%foreach(lit_libs)%>
-l<%lit_lib%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
<%endfor%>
<%foreach(pure_libs)%>
<%pure_lib%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%endif%>
<%endif%>
<%endif%>
<%if(!exename)%>
<%if(header_files || inline_files || template_files || idl_files || pidl_files)%>
<%if(includedir)%>
<%project_name%>_includedir = <%includedir%>
<%endif%>
<%if(install_headers)%><%project_name%>_include<%else%>noinst<%endif%>_HEADERS += \
<%foreach(header, sort(header_files inline_files template_files idl_files pidl_files))%>
<%header%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%endif%>
<%if(pkgconfig_files)%>
pkgconfig_DATA += \
<%foreach(pkgconfig_files)%>
<%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%>
<%endfor%>
CLEANFILES += \
<%foreach(pkgconfig_files)%>
<%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%>
<%endfor%>
<%foreach(pkgconfig_files)%>
<%basenoextension(pkgconfig_file)%>: ${top_builddir}/config.status ${srcdir}/<%pkgconfig_file%>
${top_builddir}/config.status --file "$@":${srcdir}/<%pkgconfig_file%>
<%endfor%>
<%endif%>
<%foreach(sort(source_files))%>
<%if(flag_overrides(source_file, buildflags))%>
<%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
noinst_LTLIBRARIES += lib<%normalize(source_file)%>_convenience<%forcount%>.la
lib<%normalize(source_file)%>_convenience<%forcount%>_la_SOURCES = <%source_file%>
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)%>
<%endif%>
<%endfor%>
<%if(postbuild)%>
all: __postbuild__
__postbuild__:
@<%eval(postbuild)%>
<%endif%>
<%if(avoids || requires)%>
<%foreach(reverse(uniq(avoids)))%>
endif !BUILD_<%uc(avoid)%>
<%endfor%>
<%foreach(reverse(uniq(requires)))%>
endif BUILD_<%uc(require)%>
<%endfor%>
<%endif%>
<%if(pkgconfig_files || resource_files)%>
EXTRA_DIST += \
<%foreach(extra_dist, sort(pkgconfig_files resource_files))%>
<%extra_dist%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%marker(bottom)%>