summaryrefslogtreecommitdiff
path: root/templates/automake.mpd
blob: 2a272d561e447cd06d9082e791a61daf2f6a1c18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# @file <%project_file%>
#
# $Id$
<%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%>
<%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%>
<%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%> $(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%>
<%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<%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<%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_CPPFLAGS = \
<%endif%>
<%foreach(am_includes)%>
  -I<%am_include%><%if(defines || common_defines || macros || need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
<%endfor%>
<%foreach(defines common_defines macros)%>
  -D<%define%><%if(compile_flags || need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
<%endfor%>
<%if(compile_flags)%>
<%compile_flags%><%if(need_staticflags || dynamicflags)%> \<%endif%>
<%endif%>
<%if(need_staticflags)%>
<%if(staticflags)%>
<%foreach(staticflags)%>
  -D<%staticflag%><%fornotlast(" \\")%>
<%endfor%>
<%else%>
  -D__NO_STATIC_FLAGS_AVAILABLE__
<%endif%>
<%else%>
<%if(dynamicflags)%>
<%foreach(dynamicflags)%>
  -D<%dynamicflag%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%endif%>
<%endif%>
<%if(source_files)%>

<%if(exename)%>
<%normalize(exename)%>_SOURCES = \
<%else%>
lib<%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_SOURCES = \
<%endif%>
<%foreach(source_files)%>
  <%source_file%><%if(exename)%><%if(header_files || inline_files)%> \<%else%><%fornotlast(" \\")%><%endif%><%else%><%fornotlast(" \\")%><%endif%>
<%endfor%>
<%if(exename)%>
<%if(header_files || inline_files)%>
<%foreach(header_files inline_files)%>
  <%header_file%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%endif%>
<%endif%>
<%if(exename)%>
<%if(linkflags)%>

<%normalize(exename)%>_LDFLAGS = \
 <%linkflags%>
<%endif%>
<%else%>
<%if(linkflags || am_version && install_this_target)%>

lib<%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<%lib%>.la<%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>
<%endif%>
<%else%>
<%if(install_this_target)%>
<%if(libs || pure_libs || lit_libs)%>

lib<%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LIBADD = \
 <%foreach(libs)%> lib<%lib%>.la<%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>
<%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%>
<%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%>
<%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)%>