[synthclone] push by surfacep...@gmail.com - Add --qmake switch to configure to enable specification of location of... on 2013-09-15 23:41 GMT

2 views
Skip to first unread message

synth...@googlecode.com

unread,
Sep 15, 2013, 7:41:10 PM9/15/13
to synthclone-...@googlegroups.com
Revision: a0185657d65f
Author: Devin Anderson <surface...@gmail.com>
Date: Sun Sep 15 23:40:57 2013 UTC
Log: Add --qmake switch to configure to enable specification of
location of qmake executable.

http://code.google.com/p/synthclone/source/detail?r=a0185657d65f

Modified:
/configure

=======================================
--- /configure Wed Feb 20 06:24:29 2013 UTC
+++ /configure Sun Sep 15 23:40:57 2013 UTC
@@ -47,6 +47,8 @@
help="Install directory for synthclone plugins")
parser.add_option("--prefix", action="store", default=None,
dest="prefix",
help="Install prefix")
+ parser.add_option("--qmake", action="store", default="qmake",
dest="qmake",
+ help="location of Qt4 qmake executable")
parser.add_option("--skip-api-docs", action="store", default=0,
dest="skipAPIDocs", help="Don't build API
documentation",
type="int")
@@ -156,6 +158,8 @@
pluginDir = join("lib", "synthclone", "plugins")
pluginDir = abspath(join(execPrefix, pluginDir))

+ qmakeExecutable = options.qmake
+
# Write config.h
data = {
"majorVersion": MAJOR_VERSION,
@@ -167,7 +171,7 @@
join(getTemplatesDirectory(), "config.h"), data)

# Run `qmake`
- qmakeArgs = ["qmake", "-recursive"] + platformArgs + args + \
+ qmakeArgs = [qmakeExecutable, "-recursive"] + platformArgs + args + \
["MAJOR_VERSION=%d" % MAJOR_VERSION, "MINOR_VERSION=%d" %
MINOR_VERSION,
"REVISION=%d" % REVISION, "BUILDDIR=%s" % buildDir,
"MAKEDIR=%s" % makeDir, "PREFIX=%s" % prefix,
@@ -203,8 +207,14 @@
qmakeArgs.append("SKIP_TRIMMER_PLUGIN=1")
if options.skipZoneGenerator:
qmakeArgs.append("SKIP_ZONE_GENERATOR_PLUGIN=1")
- if call(qmakeArgs):
- parser.error("qmake returned an error")
+
+ try:
+ result = call(qmakeArgs)
+ except Exception, e:
+ parser.error("%s call failed: %s" % (qmakeExecutable, str(e)))
+ else:
+ if result:
+ parser.error("%s returned an error" % qmakeExecutable)

stdout.write("Configure successful. Run `make` to build, and "
"`make install` to install.\n")
Reply all
Reply to author
Forward
0 new messages