drizzle
Profile
Search
 
Hosted by The Rackspace Cloud
Plugin Build System

Contents

Plugin Build System

The build system for plugins in Drizzle is implemented by a python script in the config/ directory which then creates and includes files directly into the root-level Makefile. The original plugin system from MySQL, which was implemented in m4, was replaced because it was trying to dynamically alter the build system from which it was being called.

From a plugin author's perspective, there are three potentially interesting files.

  1. plugin.ini
  2. plugin.ac
  3. plugin.am

Additionally, a plugin may provide an m4 directory which will slurped in to the configure script.

System Overview

register_plugins.py does a recursive search of the plugins/ directory for any plugin.ini files. Each plugin.ini file causes a set of predictable automake and autoconf stanzas to be generated in config/plugin.am and config/plugin.ac, which are in turn included by Makefile.am and configure.ac.

If the plugin author has any more specifically difficult configure or build steps that need to be performed, they may be placed in plugin.ac or plugin.am in the same dir as the plugin.ini file and the system will include them after the code generated for that plugin, so the files may assume certain things have been set.

plugin.ini

plugin.ini is a standard ini-file. Currently a single section, [plugin], is supported. It is intended to handle the common cases where plugins are mostly identical. There are a few edge cases where expressing what you want might become obtuse, but hey, that's how it goes.

The following can be set:

When Plugins Build

By default, drizzle always attempts to build all of the plugins that it can. There are two instances when it will not attempt to build a plugin:

Minimum set of plugins needed

  1. collation_dictionary
  2. drizzle_protocol
  3. heap
  4. innobase
  5. multi_thread
  6. myisam
  7. mysql_protocol
  8. registry_dictionary
  9. schema_dictionary
  10. session_dictionary
  11. signal_handler
  12. status_dictionary