diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 263: build, doc: Fix man page creation and installation

Message ID 20130305132715.26028.97480.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

alexandros.frantzis@linaro.org March 5, 2013, 1:27 p.m. UTC
------------------------------------------------------------
revno: 263
committer: Alexandros Frantzis <alexandros.frantzis@canonical.com>
branch nick: trunk
timestamp: Tue 2013-03-05 15:23:30 +0200
message:
  build,doc: Fix man page creation and installation
modified:
  doc/wscript_build
  src/wscript_build
  wscript


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'doc/wscript_build'
--- doc/wscript_build	2012-08-07 12:04:04 +0000
+++ doc/wscript_build	2013-03-05 13:23:30 +0000
@@ -1,21 +1,12 @@ 
-if bld.env.USE_GL:
-    bld(
-        features = 'subst',
-        source = 'glmark2.1.in',
-        target = bld.path.find_or_declare('glmark2.1'),
-        APPNAME = 'GLMARK2',
-        appname = 'glmark2',
-        appversion = bld.env.GLMARK2_VERSION,
-        install_path = '${MANDIR}/man1'
-    )
-
-if bld.env.USE_GLESv2:
-    bld(
-        features = 'subst',
-        source = 'glmark2.1.in',
-        target = bld.path.find_or_declare('glmark2-es2.1'),
-        APPNAME = 'GLMARK2-ES2',
-        appname = 'glmark2-es2',
-        appversion = bld.env.GLMARK2_VERSION,
-        install_path = '${MANDIR}/man1'
-    )
+for name in bld.env.keys():
+    if name.startswith('FLAVOR_') and bld.env[name]:
+        target = bld.env[name]
+        bld(
+            features = 'subst',
+            source = 'glmark2.1.in',
+            target = bld.path.find_or_declare('%s.1' % target),
+            APPNAME = 'GLMARK2',
+            appname = target,
+            appversion = bld.env.GLMARK2_VERSION,
+            install_path = '${MANDIR}/man1'
+        )

=== modified file 'src/wscript_build'
--- src/wscript_build	2013-03-04 19:07:07 +0000
+++ src/wscript_build	2013-03-05 13:23:30 +0000
@@ -14,12 +14,6 @@ 
   'drm-gl' : ['canvas-generic.cpp', 'native-state-drm.cpp', 'gl-state-egl.cpp'],
   'drm-glesv2' : ['canvas-generic.cpp', 'native-state-drm.cpp', 'gl-state-egl.cpp']
 }
-flavor_target = {
-  'x11-gl' : 'glmark2',
-  'x11-glesv2' : 'glmark2-es2',
-  'drm-gl' : 'glmark2-drm',
-  'drm-glesv2' : 'glmark2-es2-drm'
-}
 flavor_uselibs = {
   'x11-gl' : ['x11', 'gl', 'matrix-gl'],
   'x11-glesv2' : ['x11', 'egl', 'glesv2', 'matrix-glesv2'],
@@ -40,10 +34,11 @@ 
 for name in bld.env.keys():
     if name.startswith('FLAVOR_') and bld.env[name]:
         flavor = name.replace('FLAVOR_', '').lower().replace('_', '-')
+        target = bld.env[name]
         bld(
             features     = ['cxx', 'cprogram'],
             source       = common_sources + flavor_sources[flavor],
-            target       = flavor_target[flavor],
+            target       = target,
             use          = common_uselibs + flavor_uselibs[flavor],
             lib          = ['m', 'jpeg', 'dl'],
             includes     = includes,

=== modified file 'wscript'
--- wscript	2013-03-04 19:07:07 +0000
+++ wscript	2013-03-05 13:23:30 +0000
@@ -11,8 +11,13 @@ 
 VERSION = '2012.12'
 APPNAME = 'glmark2'
 
-FLAVORS = ['x11-gl', 'x11-glesv2', 'drm-gl', 'drm-glesv2']
-FLAVORS_STR = ", ".join(FLAVORS)
+FLAVORS = {
+    'x11-gl' : 'glmark2',
+    'x11-glesv2' : 'glmark2-es2',
+    'drm-gl' : 'glmark2-drm',
+    'drm-glesv2' : 'glmark2-es2-drm'
+}
+FLAVORS_STR = ", ".join(FLAVORS.keys())
 
 def option_list_cb(option, opt, value, parser):
     value = value.split(',')
@@ -49,7 +54,7 @@ 
 def configure(ctx):
     # Special 'all' flavor
     if 'all' in Options.options.flavors:
-        Options.options.flavors = list(set(Options.options.flavors) | set(FLAVORS))
+        Options.options.flavors = list(set(Options.options.flavors) | set(FLAVORS.keys()))
         Options.options.flavors.remove('all')
 
     # Ensure the flavors are valid
@@ -61,7 +66,8 @@ 
         ctx.fatal('You need to select at least one flavor. Supported flavors are %s' % FLAVORS_STR)
 
     for flavor in FLAVORS:
-        ctx.env["FLAVOR_%s" % flavor.upper().replace('-','_')] = flavor in Options.options.flavors
+        if flavor in Options.options.flavors:
+            ctx.env["FLAVOR_%s" % flavor.upper().replace('-','_')] = FLAVORS[flavor]
 
     ctx.check_tool('gnu_dirs')
     ctx.check_tool('compiler_cc')