Boost logo

Boost-Commit :

From: grafikrobot_at_[hidden]
Date: 2007-11-24 12:37:45


Author: grafik
Date: 2007-11-24 12:37:45 EST (Sat, 24 Nov 2007)
New Revision: 41335
URL: http://svn.boost.org/trac/boost/changeset/41335

Log:
Refactor some common rules. Have the OSG example run the text example.
Text files modified:
   sandbox/tools/build_extensions/example/osg/build.jam | 40 +++++++++++++++++++++++++++++++---------
   sandbox/tools/build_extensions/ext/extension.jam | 17 +++++++++++++++++
   sandbox/tools/build_extensions/ext/osg.jam | 13 -------------
   sandbox/tools/build_extensions/ext/tecla.jam | 12 ------------
   sandbox/tools/build_extensions/ext/wxwidgets.jam | 5 -----
   5 files changed, 48 insertions(+), 39 deletions(-)

Modified: sandbox/tools/build_extensions/example/osg/build.jam
==============================================================================
--- sandbox/tools/build_extensions/example/osg/build.jam (original)
+++ sandbox/tools/build_extensions/example/osg/build.jam 2007-11-24 12:37:45 EST (Sat, 24 Nov 2007)
@@ -10,13 +10,35 @@
 using libtiff : 3.8.2 : $(PACKAGES)/tiff-3.8.2 ;
 using osg : 2.2 : $(PACKAGES)/OpenSceneGraph-2.2.0 ;
 
-import stage ;
+import testing ;
 
-install stage-lib
- : /ext/osg
- : <location>$(STAGE_ROOT)/lib <install-dependencies>on <install-type>LIB
- ;
-install stage-bin
- : /ext/osg
- : <location>$(STAGE_ROOT)/lib <install-dependencies>on <install-type>EXE
- ;
+local rule osg-example ( name subdir ? : args * : src * )
+{
+ dir ?= $(LOCATION(osg-2.2))/examples/$(name) ;
+ return [
+ run-fail
+ [ glob $(dir)/*.cpp ]
+ /ext/osg//openthreads
+ /ext/osg//osg
+ /ext/osg//osgDB
+ /ext/osg//osgUtil
+ /ext/osg//osgGA
+ /ext/osg//osgViewer
+ /ext/osg//osgText
+ $(src)
+ : $(args)
+ :
+ :
+ : $(name) ] ;
+}
+
+#~ osg-example osgcamera ;
+#~ osg-example osgcompositeviewer : : /ext/osg//osgFX ;
+#~ osg-example osglight ;
+#~ osg-example osglogo ;
+#~ osg-example osgparticleeffects : --screen 1 : /ext/osg//osgParticle ;
+#~ osg-example osgshadow : --screen 1 : /ext/osg//osgShadow ;
+#~ osg-example osgteapot ;
+#~ osg-example osgterrain : --screen 1 : /ext/osg//osgTerrain ;
+osg-example osgtext : --screen 1 ;
+#~ osg-example osgvertexprogram : --screen 1 ;

Modified: sandbox/tools/build_extensions/ext/extension.jam
==============================================================================
--- sandbox/tools/build_extensions/ext/extension.jam (original)
+++ sandbox/tools/build_extensions/ext/extension.jam 2007-11-24 12:37:45 EST (Sat, 24 Nov 2007)
@@ -71,6 +71,19 @@
                 <base> <toolset> <threading> <runtime> <version:$(__extension__)-version>
                 : $(name) : $(type) : $(property-set) ] ;
         }
+
+
+ rule when-file ( file : yes * : no * )
+ {
+ if [ path.exists [ path.make $(file) ] ]
+ {
+ return $(yes) ;
+ }
+ else
+ {
+ return $(no) ;
+ }
+ }
     }
 }
 
@@ -106,6 +119,10 @@
         <$(extension)-location>$(location)
         ;
     feature.compose <$(extension)-version>$(version) : $(requirements) ;
+
+ local user-mod = [ CALLER_MODULE 2 ] ;
+ modules.poke $(user-mod) : LOCATION($(extension)-$(version)) : $(location) ;
+
     return
         $(requirements)
         <tag>@default-tag

Modified: sandbox/tools/build_extensions/ext/osg.jam
==============================================================================
--- sandbox/tools/build_extensions/ext/osg.jam (original)
+++ sandbox/tools/build_extensions/ext/osg.jam 2007-11-24 12:37:45 EST (Sat, 24 Nov 2007)
@@ -42,19 +42,6 @@
     
     location,$(version) = $(location) ;
     
- local rule conditional ( condition + : requirements * )
- {
- condition = $(condition:J=,) ;
- if [ MATCH (:) : $(condition) ]
- {
- return $(condition)$(requirements) ;
- }
- else
- {
- return $(condition):$(requirements) ;
- }
- }
-
     alias gl
         :
         :

Modified: sandbox/tools/build_extensions/ext/tecla.jam
==============================================================================
--- sandbox/tools/build_extensions/ext/tecla.jam (original)
+++ sandbox/tools/build_extensions/ext/tecla.jam 2007-11-24 12:37:45 EST (Sat, 24 Nov 2007)
@@ -17,18 +17,6 @@
 
 extension.declare tecla ;
 
-local rule when-file ( file : yes : no * )
-{
- if [ path.exists [ path.make $(file) ] ]
- {
- return $(yes) ;
- }
- else
- {
- return $(no) ;
- }
-}
-
 rule init ( version ? : location : options * )
 {
     version ?= default ;

Modified: sandbox/tools/build_extensions/ext/wxwidgets.jam
==============================================================================
--- sandbox/tools/build_extensions/ext/wxwidgets.jam (original)
+++ sandbox/tools/build_extensions/ext/wxwidgets.jam 2007-11-24 12:37:45 EST (Sat, 24 Nov 2007)
@@ -1098,11 +1098,6 @@
             <wx-platform>win32:<wx-toolkit>msw
             ;
     }
-
- rule conditional ( condition + : requirements * )
- {
- return $(condition:J=,):$(requirements) ;
- }
 }
 
 rule bakefile_jam ( targets * : sources * : properties * )


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk