Subversion Repositories gelsvn

Rev

Rev 198 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
107 bj 1
# @file <%project_file%>
2
#
3
# $Id: automake.mpd 217 2006-05-05 09:35:48Z 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
 
198 bj 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%><%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%>
107 bj 45
<%else%>
198 bj 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%><%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%>
107 bj 47
<%endif%>
48
<%if(flag_overrides(custom_type->input_file, gendir))%>
49
	mkdir -p <%flag_overrides(custom_type->input_file, gendir)%>
50
<%endif%>
198 bj 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%><%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%>
107 bj 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%>
198 bj 77
<%if(install_this_target)%>lib<%else%>noinst<%endif%>_LTLIBRARIES += lib<%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.la
107 bj 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%>
198 bj 85
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_CPPFLAGS = \
107 bj 86
<%endif%>
87
<%foreach(am_includes)%>
217 bj 88
  -I<%am_include%><%if(defines || common_defines || macros || compile_flags || need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
107 bj 89
<%endfor%>
90
<%foreach(defines common_defines macros)%>
91
  -D<%define%><%if(compile_flags || need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
92
<%endfor%>
198 bj 93
<%foreach(compile_flags)%>
217 bj 94
  <%compile_flag%><%if(need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
198 bj 95
<%endfor%>
107 bj 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
<%foreach(dynamicflags)%>
106
  -D<%dynamicflag%><%fornotlast(" \\")%>
107
<%endfor%>
108
<%endif%>
109
<%endif%>
110
<%if(source_files)%>
111
 
112
<%if(exename)%>
113
<%normalize(exename)%>_SOURCES = \
114
<%else%>
198 bj 115
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_SOURCES = \
107 bj 116
<%endif%>
198 bj 117
<%foreach(source_file, sort(source_files))%>
217 bj 118
<%if(!flag_overrides(source_file, buildflags))%>
119
  <%source_file%> \
120
<%endif%>
107 bj 121
<%endfor%>
122
<%if(exename)%>
198 bj 123
<%foreach(header_file, sort(header_files inline_files))%>
107 bj 124
  <%header_file%><%fornotlast(" \\")%>
125
<%endfor%>
126
<%endif%>
127
<%endif%>
128
<%if(exename)%>
129
<%if(linkflags)%>
130
 
131
<%normalize(exename)%>_LDFLAGS = \
132
 <%linkflags%>
133
<%endif%>
134
<%else%>
135
<%if(linkflags || am_version && install_this_target)%>
136
 
198 bj 137
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LDFLAGS = \
107 bj 138
<%if(am_version && install_this_target)%> -version-number <%am_version%><%endif%><%if(linkflags)%> <%linkflags%><%endif%>
139
<%endif%>
140
<%endif%>
141
<%if(exename)%>
142
<%if(libs || pure_libs || lit_libs)%>
143
 
144
<%normalize(exename)%>_LDADD = \
198 bj 145
<%foreach(libs)%>
146
  lib<%libname_prefix%><%lib%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
147
<%endfor%>
148
<%foreach(lit_libs)%>
149
  -l<%lit_lib%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
150
<%endfor%>
151
<%foreach(pure_libs)%>
152
  <%pure_lib%><%fornotlast(" \\")%>
153
<%endfor%>
107 bj 154
<%endif%>
155
<%else%>
156
<%if(install_this_target)%>
157
<%if(libs || pure_libs || lit_libs)%>
158
 
198 bj 159
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LIBADD = \
160
<%foreach(libs)%>
161
  lib<%libname_prefix%><%lib%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
162
<%endfor%>
163
<%foreach(lit_libs)%>
164
  -l<%lit_lib%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
165
<%endfor%>
166
<%foreach(pure_libs)%>
167
  <%pure_lib%><%fornotlast(" \\")%>
168
<%endfor%>
107 bj 169
<%endif%>
170
<%endif%>
171
<%endif%>
217 bj 172
<%endif%>
107 bj 173
<%if(!exename)%>
174
<%if(header_files || inline_files || template_files || idl_files || pidl_files)%>
175
 
176
<%if(includedir)%>
177
<%project_name%>_includedir = <%includedir%>
178
 
179
<%endif%>
180
<%if(install_headers)%><%project_name%>_include<%else%>noinst<%endif%>_HEADERS += \
181
<%foreach(header, sort(header_files inline_files template_files idl_files pidl_files))%>
182
  <%header%><%fornotlast(" \\")%>
183
<%endfor%>
184
<%endif%>
185
<%endif%>
186
<%if(pkgconfig_files)%>
187
 
188
pkgconfig_DATA += \
189
<%foreach(pkgconfig_files)%>
190
  <%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%>
191
<%endfor%>
192
 
193
CLEANFILES += \
194
<%foreach(pkgconfig_files)%>
195
  <%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%>
196
<%endfor%>
197
<%foreach(pkgconfig_files)%>
198
 
199
<%basenoextension(pkgconfig_file)%>: ${top_builddir}/config.status ${srcdir}/<%pkgconfig_file%>
200
	${top_builddir}/config.status --file "$@":${srcdir}/<%pkgconfig_file%>
201
<%endfor%>
202
<%endif%>
217 bj 203
<%foreach(sort(source_files))%>
204
<%if(flag_overrides(source_file, buildflags))%>
205
 
206
<%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
207
noinst_LTLIBRARIES += lib<%normalize(source_file)%>_convenience<%forcount%>.la
208
lib<%normalize(source_file)%>_convenience<%forcount%>_la_SOURCES = <%source_file%>
209
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)%>
210
<%endif%>
211
<%endfor%>
107 bj 212
<%if(postbuild)%>
213
 
214
all: __postbuild__
215
 
216
__postbuild__:
217
	@<%eval(postbuild)%>
218
<%endif%>
219
<%if(avoids || requires)%>
220
 
221
<%foreach(reverse(uniq(avoids)))%>
222
endif !BUILD_<%uc(avoid)%>
223
<%endfor%>
224
<%foreach(reverse(uniq(requires)))%>
225
endif BUILD_<%uc(require)%>
226
<%endfor%>
227
<%endif%>
228
<%if(pkgconfig_files || resource_files)%>
229
 
230
EXTRA_DIST += \
231
<%foreach(extra_dist, sort(pkgconfig_files resource_files))%>
232
  <%extra_dist%><%fornotlast(" \\")%>
233
<%endfor%>
234
 
235
<%endif%>
236
<%marker(bottom)%>