132
132
VERSION=$(PANDORA_RELEASE_VERSION)
134
134
pkgplugindir=$(libdir)/drizzle/plugin
135
EXTRA_DIST = %(rel_path)s/plugin.ini
135
EXTRA_DIST = plugin.ini
138
138
if plugin['headers'] != "":
139
139
plugin_file.write("noinst_HEADERS = %(headers)s\n" % plugin)
140
140
if plugin['testsuite']:
141
141
if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
142
plugin_file.write("EXTRA_DIST += %(rel_path)s/%(testsuitedir)s\n" % plugin)
142
plugin_file.write("EXTRA_DIST += %(testsuitedir)s\n" % plugin)
143
143
plugin_file.write("""
144
144
pkgplugin_LTLIBRARIES=lib%(name)s_plugin.la
145
145
lib%(name)s_plugin_la_LDFLAGS=-module -avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
250
250
def expand_plugin_ini(plugin, plugin_dir):
251
251
if plugin_dir == ".":
252
plugin['rel_path']= plugin_dir
252
253
plugin['unconditional']=True
255
plugin['rel_path']= plugin_dir[len(top_srcdir)+len(os.path.sep):]
254
256
plugin['unconditional']=False
255
plugin['rel_path']= plugin_dir[len(top_srcdir)+len(os.path.sep):]
256
257
# TODO: determine path to plugin dir relative to top_srcdir... append it to
257
258
# source files if they don't already have it
258
259
if plugin['sources'] == "":
259
260
plugin['sources']="%s.cc" % plugin['name']
261
for src in plugin['sources'].split():
262
if not src.startswith(plugin['rel_path']):
263
src= os.path.join(plugin['rel_path'], src)
264
new_sources= "%s %s" % (new_sources, src)
265
if new_sources != "":
266
plugin['sources']= new_sources
262
if plugin_dir != ".":
263
for src in plugin['sources'].split():
264
if not src.startswith(plugin['rel_path']):
265
src= os.path.join(plugin['rel_path'], src)
266
new_sources= "%s %s" % (new_sources, src)
267
if new_sources != "":
268
plugin['sources']= new_sources
267
269
plugin['main_source']= plugin['sources'].split()[0]
270
for header in plugin['headers'].split():
271
if not header.startswith(plugin['rel_path']):
272
header= os.path.join(plugin['rel_path'], header)
273
new_headers= "%s %s" % (new_headers, header)
274
plugin['headers']= new_headers
271
if plugin_dir != ".":
273
for header in plugin['headers'].split():
274
if not header.startswith(plugin['rel_path']):
275
header= os.path.join(plugin['rel_path'], header)
276
new_headers= "%s %s" % (new_headers, header)
277
plugin['headers']= new_headers
276
279
# Make a yes/no version for autoconf help messages
277
280
if plugin['load_by_default']: