Revision: 551
Author: allenb
Date: 2006-08-07 18:47:36 -0700 (Mon, 07 Aug 2006)
ViewCVS: http://svn.sourceforge.net/xml-cppdom/?rev=551&view=rev
Log Message:
-----------
Added new config file.
Added Paths:
-----------
trunk/cppdom-config
Added: trunk/cppdom-config
===================================================================
--- trunk/cppdom-config (rev 0)
+++ trunk/cppdom-config 2006-08-08 01:47:36 UTC (rev 551)
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+
+import os, sys
+from optparse import OptionParser
+
+parser = OptionParser(usage="%prog [OPTIONS]", description="Cppdom config option processor.")
+
+parser.add_option("--prefix",action="store_true",help="Print the installation prefix.")
+parser.add_option("--version",action="store_true",help="Print the installed CppDom's version number.")
+parser.add_option("--cxxflags",action="store_true",help="Pring the CppDom-specific flags for the C++ compiler.")
+parser.add_option("--libs",action="store_true",help="Pring the CppDom specific libraries.")
+parser.add_option("--all",action="store_true",help="Print all the flags used for compiling or linking.")
+
+(options, pos_args) = parser.parse_args()
+
+if 0 != len(pos_args):
+ parser.print_help()
+
+# Build up flags for flagpoll
+command_flags = " cppdom --concat"
+
+if options.prefix:
+ command_flags += " --get-prefix"
+elif options.version:
+ command_flags += " --modversion"
+elif options.cxxflags or options.libs:
+ if options.cxxflags:
+ command_flags += " --cflags"
+ if options.libs:
+ command_flags += " --libs"
+ if not options.all:
+ command_flags += " --no-deps"
+else:
+ parser.print_help()
+ sys.exit(1)
+
+command_line = "flagpoll " + command_flags
+
+#print "Command: ", command_line
+os.system(command_line)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|