org.guifications.plugins.buildsystem_rewrite: bc06cadef80fc4204ca22190a9a9d784547b6f66

grim at guifications.org grim at guifications.org
Wed Apr 30 21:50:10 CDT 2008


-----------------------------------------------------------------
Revision: bc06cadef80fc4204ca22190a9a9d784547b6f66
Ancestor: 318af87d622349e4c34f04ae2968134b537c4df0
Author: grim at guifications.org
Date: 2008-05-01T01:57:41
Branch: org.guifications.plugins.buildsystem_rewrite

Modified files:
        Makefile.am configure.ac plugin_pack.py

ChangeLog: 

I give you a working buildsystem, the output from configure needs some work yet though... but i want this checked in...


-----------------------------------------------------------------
This revision's diffstat output:
 Makefile.am    |    2 +-
 configure.ac   |   18 +++++++++---------
 plugin_pack.py |   38 +++++++++++++++++++++++++++++++++++---
 3 files changed, 45 insertions(+), 13 deletions(-)
-------------- next part --------------
============================================================
--- Makefile.am	6eec6aabc462202eb4ce21c73adfef84def25c46
+++ Makefile.am	de46154cdf16e99934117ae6c67d01b5b493ef8e
@@ -29,7 +29,7 @@ DIST_SUBDIRS = common doc po $(PP_DIST_D
 
 DIST_SUBDIRS = common doc po $(PP_DIST_DIRS)
 
-SUBDIRS = common doc $(PO_DIR) $(PP_PURPLE_BUILD) $(PP_PIDGIN_BUILD) $(PP_FINCH_BUILD)
+SUBDIRS = common doc $(PO_DIR) $(PP_BUILD_DIRS)
 
 DISTCLEANFILES=\
 	pp_config.h \
============================================================
--- configure.ac	7d77ea63df971f97ac9d5e61f018a9be96e5072c
+++ configure.ac	7c0fb927181b8265c11b273a2883548480cf60df
@@ -77,7 +77,7 @@ AM_CONDITIONAL(HAVE_PURPLE, true)
 
 HAVE_PURPLE="yes"
 AM_CONDITIONAL(HAVE_PURPLE, true)
-DEPENDENCIES="$DEPENDENCIES purple"
+DEPENDENCIES="$DEPENDENCIES,purple"
 
 if test x"$prefix" = x"NONE" ; then
 	PURPLE_LIBDIR=`pkg-config --variable=libdir purple`
@@ -119,7 +119,7 @@ PKG_CHECK_MODULES(PIDGIN, pidgin,
 	AC_DEFINE(HAVE_PIDGIN, 1, [Define if we've found pidgin.])
 	HAVE_PIDGIN="yes"
 	AM_CONDITIONAL(HAVE_PIDGIN, true)
-	DEPENDENCIES="$DEPENDENCIES pidgin"
+	DEPENDENCIES="$DEPENDENCIES,pidgin"
 ], [
 	AC_MSG_RESULT([no])
 	HAVE_PIDGIN="no"
@@ -159,7 +159,7 @@ PKG_CHECK_MODULES(FINCH, finch,
 	AC_DEFINE(HAVE_FINCH, 1, [Define if we've found finch.])
 	HAVE_FINCH="yes"
 	AM_CONDITIONAL(HAVE_FINCH, true)
-	DEPENDENCIES="$DEPENDENCIES finch"
+	DEPENDENCIES="$DEPENDENCIES,finch"
 ], [
 	AC_MSG_RESULT([no])
 	HAVE_FINCH="no"
@@ -228,7 +228,7 @@ if test x"$HAVE_TALKFILTERS" = x"yes"; t
 	AC_CHECK_LIB(talkfilters, gtf_filter_count, TALKFILTERS_LIBS="-ltalkfilters")
 	AC_SUBST(TALKFILTERS_LIBS)
 
-	DEPENDENCIES="$DEPENDENCIES talkfilters"
+	DEPENDENCIES="$DEPENDENCIES,talkfilters"
 fi
 
 dnl #######################################################################
@@ -267,7 +267,7 @@ if test x"$BUILD_SWITCH_SPELL" = x"yes" 
 AM_CONDITIONAL(BUILD_SWITCH_SPELL, test x"$BUILD_SWITCH_SPELL" = x"yes")
 
 if test x"$BUILD_SWITCH_SPELL" = x"yes" ; then
-	DEPENDENCIES="$DEPENDENCIES gtkspell aspell"
+	DEPENDENCIES="$DEPENDENCIES,gtkspell,aspell"
 fi
 
 dnl #######################################################################
@@ -297,7 +297,7 @@ if test x"$XMMS_CONFIG" != x"no" ; then
 	if test x"$HAVE_XMMS" = x"yes" ; then
 		AC_MSG_RESULT([yes])
 
-		DEPENDENCIES="$DEPENDENCIES xmms"
+		DEPENDENCIES="$DEPENDENCIES,xmms"
 	else
 		AC_MSG_RESULT([no])
 	fi
@@ -370,7 +370,7 @@ if test x"$HAVE_PURPLE" = x"yes" ; then
 		echo Purple plugins to be built.......: none
 	else
 		echo Purple plugins to be built.......:
-		echo $PP_PURPLE_BUILD | xargs -n 4 echo "	"
+		echo $PP_PURPLE_BUILD
 	fi
 fi
 echo;
@@ -383,7 +383,7 @@ if test x"$HAVE_PIDGIN" = x"yes" ; then
 		echo Pidgin plugins to be built.......: none
 	else
 		echo Pidgin plugins to be built.......:
-		echo $PP_PIDGIN_BUILD | xargs -n 4 echo "	"
+		echo $PP_PIDGIN_BUILD
 	fi
 fi
 echo;
@@ -396,7 +396,7 @@ if test x"$HAVE_FINCH" = x"yes" ; then
 		echo Finch plugins to be built........: none - THIS IS NORMAL
 	else
 		echo Finch plugins to be built........:
-		echo $PP_FINCH_BUILD | xargs -n 4 echo "	"
+		echo $PP_FINCH_BUILD
 	fi
 fi
 echo;
============================================================
--- plugin_pack.py	9a1a43af9dab9f2180cac3154bfcf00653361c6b
+++ plugin_pack.py	0314e915d44bc6d66ad737f9be434f21a915c67e
@@ -201,10 +201,11 @@ class PluginPack:
 	commands['dist_dirs'] = dist_dirs
 
 	def build_dirs(self, args):
+		"""Displays a list of the plugins that can be built"""
 		if len(args) != 2:
-			print 'build_dirs expects 2 arguments:'
-			print '\ta comma separated list of dependencies'
-			print '\ta comma separated list of plugins to build'
+			print >> sys.stderr, 'build_dirs expects 2 arguments:'
+			print >> sys.stderr, '\ta comma separated list of dependencies'
+			print >> sys.stderr, '\ta comma separated list of plugins to build'
 			sys.exit(1)
 
 		# store the external depedencies
@@ -291,6 +292,12 @@ class PluginPack:
 		"""Outputs the contents for the file to be m4_include()'d from configure"""
 		uniqdirs = self.unique_dirs()
 
+		# add our --with-plugins option
+		print 'AC_ARG_WITH(plugins,'
+		print '            AC_HELP_STRING([--with-plugins], [what plugins to build]),'
+		print '            ,WITH_PLUGINS=all)'
+
+		# determine and add our output files
 		print 'PP_DIST_DIRS="%s"' % (string.join(uniqdirs, ' '))
 		print 'AC_SUBST(PP_DIST_DIRS)'
 		print
@@ -298,6 +305,17 @@ class PluginPack:
 		for dir in uniqdirs:
 			print '\t%s/Makefile' % (dir)
 		print '])'
+		print
+
+		# setup a second call to determine the plugins to be built
+		print 'PP_BUILD=`$PYTHON $srcdir/plugin_pack.py build_dirs $DEPENDENCIES $WITH_PLUGINS`'
+		print
+		print 'PP_BUILD_DIRS=`echo $PP_BUILD | sed \'s/,/\ /g\'`'
+		print 'AC_SUBST(PP_BUILD_DIRS)'
+		print
+		print 'PP_PURPLE_BUILD=`$PYTHON $srcdir/plugin_pack.py -p show_names $PP_BUILD`'
+		print 'PP_PIDGIN_BUILD=`$PYTHON $srcdir/plugin_pack.py -P show_names $PP_BUILD`'
+		print 'PP_FINCH_BUILD=`$PYTHON $srcdir/plugin_pack.py -f show_names $PP_BUILD`'
 	commands['config_file'] = config_file
 
 	def dependency_graph(self, args):
@@ -359,6 +377,20 @@ class PluginPack:
 		print '}'
 	commands['dependency_graph'] = dependency_graph
 
+	def show_names(self, args):
+		"""Displays the names of the given comma separated list of provides"""
+
+		names = []
+
+		provides = args[0].split(',')
+		for provide in provides:
+			if provide in self.plugins:
+				names.append(self.plugins[provide].name)
+
+		print string.join(names, ', ')
+
+	commands['show_names'] = show_names
+
 	def info(self, args):
 		"""Displays all information about the given plugins"""
 		for p in args:


More information about the Plugins-commits mailing list