Subversion Repositories gelsvn

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
107 bj 1
# @file <%project_file%>
2
#
3
# $Id: automake.mpd 198 2005-12-15 11:30:53Z 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)%>
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%>
198 bj 93
<%foreach(compile_flags)%>
94
  <%compile_flags%><%if(need_staticflags || dynamicflags)%> \<%else%><%fornotlast(" \\")%><%endif%>
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))%>
107 bj 118
  <%source_file%><%if(exename)%><%if(header_files || inline_files)%> \<%else%><%fornotlast(" \\")%><%endif%><%else%><%fornotlast(" \\")%><%endif%>
119
<%endfor%>
120
<%if(exename)%>
198 bj 121
<%foreach(header_file, sort(header_files inline_files))%>
107 bj 122
  <%header_file%><%fornotlast(" \\")%>
123
<%endfor%>
124
<%endif%>
125
<%endif%>
126
<%if(exename)%>
127
<%if(linkflags)%>
128
 
129
<%normalize(exename)%>_LDFLAGS = \
130
 <%linkflags%>
131
<%endif%>
132
<%else%>
133
<%if(linkflags || am_version && install_this_target)%>
134
 
198 bj 135
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LDFLAGS = \
107 bj 136
<%if(am_version && install_this_target)%> -version-number <%am_version%><%endif%><%if(linkflags)%> <%linkflags%><%endif%>
137
<%endif%>
138
<%endif%>
139
<%if(exename)%>
140
<%if(libs || pure_libs || lit_libs)%>
141
 
142
<%normalize(exename)%>_LDADD = \
198 bj 143
<%foreach(libs)%>
144
  lib<%libname_prefix%><%lib%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
145
<%endfor%>
146
<%foreach(lit_libs)%>
147
  -l<%lit_lib%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
148
<%endfor%>
149
<%foreach(pure_libs)%>
150
  <%pure_lib%><%fornotlast(" \\")%>
151
<%endfor%>
107 bj 152
<%endif%>
153
<%else%>
154
<%if(install_this_target)%>
155
<%if(libs || pure_libs || lit_libs)%>
156
 
198 bj 157
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LIBADD = \
158
<%foreach(libs)%>
159
  lib<%libname_prefix%><%lib%>.la<%if(lit_libs || pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
160
<%endfor%>
161
<%foreach(lit_libs)%>
162
  -l<%lit_lib%><%if(pure_libs)%> \<%else%><%fornotlast(" \\")%><%endif%>
163
<%endfor%>
164
<%foreach(pure_libs)%>
165
  <%pure_lib%><%fornotlast(" \\")%>
166
<%endfor%>
107 bj 167
<%endif%>
168
<%endif%>
169
<%endif%>
170
<%if(!exename)%>
171
<%if(header_files || inline_files || template_files || idl_files || pidl_files)%>
172
 
173
<%if(includedir)%>
174
<%project_name%>_includedir = <%includedir%>
175
 
176
<%endif%>
177
<%if(install_headers)%><%project_name%>_include<%else%>noinst<%endif%>_HEADERS += \
178
<%foreach(header, sort(header_files inline_files template_files idl_files pidl_files))%>
179
  <%header%><%fornotlast(" \\")%>
180
<%endfor%>
181
<%endif%>
182
<%endif%>
183
<%endif%>
184
<%if(pkgconfig_files)%>
185
 
186
pkgconfig_DATA += \
187
<%foreach(pkgconfig_files)%>
188
  <%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%>
189
<%endfor%>
190
 
191
CLEANFILES += \
192
<%foreach(pkgconfig_files)%>
193
  <%basenoextension(pkgconfig_file)%><%fornotlast(" \\")%>
194
<%endfor%>
195
<%foreach(pkgconfig_files)%>
196
 
197
<%basenoextension(pkgconfig_file)%>: ${top_builddir}/config.status ${srcdir}/<%pkgconfig_file%>
198
	${top_builddir}/config.status --file "$@":${srcdir}/<%pkgconfig_file%>
199
<%endfor%>
200
<%endif%>
201
<%if(postbuild)%>
202
 
203
all: __postbuild__
204
 
205
__postbuild__:
206
	@<%eval(postbuild)%>
207
<%endif%>
208
<%if(avoids || requires)%>
209
 
210
<%foreach(reverse(uniq(avoids)))%>
211
endif !BUILD_<%uc(avoid)%>
212
<%endfor%>
213
<%foreach(reverse(uniq(requires)))%>
214
endif BUILD_<%uc(require)%>
215
<%endfor%>
216
<%endif%>
217
<%if(pkgconfig_files || resource_files)%>
218
 
219
EXTRA_DIST += \
220
<%foreach(extra_dist, sort(pkgconfig_files resource_files))%>
221
  <%extra_dist%><%fornotlast(" \\")%>
222
<%endfor%>
223
 
224
<%endif%>
225
<%marker(bottom)%>