org.guifications.plugins.buildsystem_rewrite: 97b2fc64deaf47b3feb802049fad3228c484b356
grim at guifications.org
grim at guifications.org
Sat Apr 26 18:25:07 CDT 2008
-----------------------------------------------------------------
Revision: 97b2fc64deaf47b3feb802049fad3228c484b356
Ancestor: b3eed1e39def9b86add0a464b7e1e5e7a1b3c9da
Author: grim at guifications.org
Date: 2008-04-26T23:22:14
Branch: org.guifications.plugins.buildsystem_rewrite
Modified files:
autogen.sh plugin_pack.py
ChangeLog:
Moved the config_file stuff to plugin_pack.py, updated autogen.sh accordingly
-----------------------------------------------------------------
This revision's diffstat output:
autogen.sh | 12 +-----------
plugin_pack.py | 26 +++++++++++++++++++-------
2 files changed, 20 insertions(+), 18 deletions(-)
-------------- next part --------------
============================================================
--- autogen.sh 0ba3b7ee3b2d8c0251364182c16e982778e22cc8
+++ autogen.sh 5d52dc74b7398b286e60595129a77a0c711bbc28
@@ -132,18 +132,8 @@ CONFIG_FILE="plugin_pack.m4"
###############################################################################
CONFIG_FILE="plugin_pack.m4"
-if [ -f ${CONFIG_FILE} ]
-then
- rm -f ${CONFIG_FILE}
-fi
-
echo -n "creating ${CONFIG_FILE} ..."
-printf "AC_CONFIG_FILES([\n" >> ${CONFIG_FILE}
-for DIR in `${PYTHON} plugin_pack.py dist_dirs`
-do
- printf "\t%s\n" ${DIR}/Makefile >> ${CONFIG_FILE}
-done
-printf "])\n" >> ${CONFIG_FILE}
+${PYTHON} plugin_pack.py config_file > ${CONFIG_FILE} 2>/dev/null
echo " done."
###############################################################################
============================================================
--- plugin_pack.py e4b0d4cfbbc9a9c8bbe0bb07b2e895624e94703c
+++ plugin_pack.py 8eda805254ae324fe8b266579968260298747ccd
@@ -155,6 +155,16 @@ class PluginPack:
def incomplete_plugins(self):
return self.list_type('incomplete')
+ def unique_dirs(self):
+ dirs = {}
+ for name in self.plugins.keys():
+ dirs[self.plugins[name].directory] = 1
+
+ dirs = dirs.keys()
+ dirs.sort()
+
+ return dirs
+
def help(self, args):
try:
cmd = self.commands[args[0]]
@@ -167,14 +177,16 @@ class PluginPack:
def dist_dirs(self, args):
"""Outputs a list of all plugin directories to included in the distribution"""
- dirs = {}
- for name in self.plugins.keys():
- dirs[self.plugins[name].directory] = 1
+ print string.join(self.unique_dirs(), ' ')
+ commands['dist_dirs'] = dist_dirs
- dirs = dirs.keys()
- dirs.sort()
- print string.join(dirs, ' ')
- commands['dist_dirs'] = dist_dirs
+ def config_file(self, args):
+ """Outputs the contents for the file to be m4_include()'d from configure"""
+ print "AC_CONFIG_FILES(["
+ for dir in self.unique_dirs():
+ print "\t%s/Makefile" % (dir)
+ print "])"
+ commands['config_file'] = config_file
def dependency_graph(self, args):
"""Outputs a graphviz script of dependencies"""
More information about the Plugins-commits
mailing list