~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to config/pandora-plugin.am

Added code necessary for building plugins dynamically.
Merged in changes from lifeless to allow autoreconf to work.
Touching plugin.ini files now triggers a rebuid - so config/autorun.sh is no
longer required to be run after touching those.
Removed the duplicate plugin names - also removed the issue that getting them
different would silently fail weirdly later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# plugin.scan: always the current list, generated every build so keep this
 
2
# lean.
 
3
.PHONY: .plugin.scan
 
4
.plugin.scan:
 
5
        @find ${srcdir}/plugin -name 'plugin.ini' | xargs -n1 dirname | xargs -n1 basename | sort -b -d > $@
 
6
 
 
7
# Plugins affect configure; so to prevent configure running twice in a tarball
 
8
# build (once up front, once with the right list of plugins, we ship the
 
9
# generated list of plugins and the housekeeping material for that list so it
 
10
# is likewise not updated.
 
11
EXTRA_DIST += \
 
12
        config/plugin-list.ac \
 
13
        config/plugin.list \
 
14
        config/plugin.stamp \
 
15
        config/register_plugins.py
 
16
 
 
17
# plugin.list: datestamp preserved list
 
18
${srcdir}/config/plugin.list: .plugin.scan
 
19
        @cmp -s $@ $< || (mv $< $@ ; echo "Changed plugin list" )
 
20
 
 
21
# Seed the list of plugin LDADDS which plugins may extend.
 
22
PANDORA_DYNAMIC_LDADDS=
 
23
# config/plugin-list.am: generated static include of per plugin makefiles
 
24
# to allow automake processing of each included file. The filename is
 
25
# pandora-plugin.am because plugins may supply their own plugin.am as an
 
26
# extension point.
 
27
include config/plugin-list.am
 
28
# Read from plugin.list; depend on plugin.stamp as register_plugins does the
 
29
# creation of the included pandora-plugin.am files.
 
30
${srcdir}/config/plugin-list.am: config/plugin.list config/plugin.stamp
 
31
        @echo Generating automake includes.
 
32
        @mv $@ $@.stamp
 
33
        @python config/register_plugins.py
 
34
        @cmp -s $@ ${@}.stamp || (rm ${@}.stamp ; echo "Changed plugin am list" )
 
35
        @test -f ${@}.stamp && mv ${@}.stamp ${@}
 
36
 
 
37
 
 
38
# config/plugin-list.ac: generated static include of per plugin m4 rules
 
39
# to allow options in 'configure'. 
 
40
${srcdir}/config/plugin-list.ac: config/plugin.list config/plugin.stamp
 
41
        @echo Generating autoconf includes.
 
42
        @mv $@ $@.stamp
 
43
        @python config/register_plugins.py
 
44
        @cmp -s $@ ${@}.stamp || (rm ${@}.stamp ; echo "Changed plugin ac list" )
 
45
        @test -f ${@}.stamp && mv ${@}.stamp ${@}
 
46
 
 
47
# rebuild configure when the list of plugins changes.
 
48
configure: ${srcdir}/config/plugin-list.ac
 
49
 
 
50
 
 
51
# plugin.stamp: graph dominator for creating all per pandora-plugin.ac/am
 
52
# files. This is invoked when the code to generate such files has altered.
 
53
${srcdir}/config/plugin.stamp: ${srcdir}/config/plugin.list ${srcdir}/config/register_plugins.py
 
54
        cd ${srcdir} && python config/register_plugins.py ${top_srcdir} ${top_builddir} > /dev/null
 
55
        touch ${srcdir}/config/plugin.stamp