scons

Visual Studio Solution to SCONS?

Is there any tool that can convert a large and complex* Visual Studio 2005 (or 2008) Solution into a SCons project? * Lots of projects and multiple configurations on multiple platforms/compilers ...

Using scons to perform validation

My company is switching from make to scons. Part of our make process is to call xmllint on a number of xml files to validate them against a schema. I've got the following in my SConstruct: import os; Env = DefaultEnvironment() pwd = Dir('.').path xmlValidator = Builder(action = 'xmllint --noout --schema '+pwd+'/path/schema.xsd '+pwd+...

scons - how to run something /after/ all targets have been built

I've recently picked up scons to implement a multi-platform build framework for a medium sized C++ project. The build generates a bunch of unit-tests which should be invoked at the end of it all. How does one achieve that sort of thing? For example in my top level sconstruct, I have subdirs=['list', 'of', 'my', 'subprojects'] for subd...

Building an iPhone application from the command line, without xcodebuild

It is possible to build an iPhone application manually, without using xcodebuild nor an Xcode project? The idea is to build the application using SCons without creating an Xcode project. I know there is the codesign command line tool, that I could use, but before I start reverse engineering the Xcode build process, I was wondering if an...

Why does Scons care that my target is read-only, and how can I convince it to ignore it?

I'm trying to put together a debug build of a particularly difficult project layout. One of the things I need to do is to copy recently built DLLs over existing DLLs that are under Source Safe's control, and are therefore read-only. I was hoping to use Scons to manage this, but Scons errors out if your target is read-only. Part of my ...

Expressing an SConscript's Own Dependencies

I have an SCons project set up as follows: Project/ SConstruct # "SConscript('stuff/SConscript', variant_dir = 'build') stuff/ SConscript # "import configuration" configuration/ __init__.py Thing.py When building, the SConscript is copied to the build directory, but the "configuration" ...

Determining Build Directory from SConscript

I have an SConscript which is being copied to a build directory (variant_dir = ...) for construction. As a workaround for not being able to express dependencies, I'm trying to copy some additional files into the build directory. How do I determine what the current build directory is, within an SConscript? For instance, in the following...

scons hierarchcal builds: propagating builders

Hi All, I need to be able to tune a construction environment so that I can either build a static or a shared objects in lower levels. Currently, I came up with the following approach: top-level SConstruct: if build_shared: env.Replace(ObjectBuilder = env.SharedObject) env.Replace(LibraryBuilder = env.SharedLibrary) else: e...

Build automation by using platform specific project files or by using project generators?

There are some build systems that are able to generate platform specific project files like Visual Studio sln,vcproj,vcxproj files or XCode xcodeproj projects under OS X. One of them is CMake but I found out that the support for this is quite limited, buggy and that is very hard to keep it updated with newer versions (like VS 2010). A...

How can I set options in SConstruct for C compiler depending on compiler type?

I need to set additional options for C compiler, e.g. add flag to turn all warnings ON, depending on the type of the compiler. E.g. for MSVC I should use env.Append(CPPFLAGS = "/Wall") but for mingw (gcc) I need to use: env.Append(CCFLAGS = "-Wall") How can I do this in scons way? ...

Bundling an scons based source.

We are using SCons for all our build need, and we would like to distribute a library in open source. Now most softwares uses ./configure, make and make install as build mechanism, we were wondering how we should bundle our library. We have the following solutions: Just bundle like the way it is, requiring scons to build. Add a dummy ...

scons: overriding build options for one file

Easy question but I don't know the answer. Let's say I have a scons build where my CCFLAGS includes -O1. I have one file needsOptimization.cpp where I would like to override the -O1 with -O2 instead. How could I do this in scons? update: this is what I ended up doing based on bialix's answer: in my SConscript file: Import('env'); ...

JAVA_HOME variable under OSX... what is it exactly?

I've been trying to build evaldictator on OSX. Unfortunately I have little to no idea of what ant or scons actually do. My main question is when I do something like export JAVA_HOME='/lab/speech/java/jdk1.5.0_06' what am I doing. Thanks in advance ...

Reason for Make's Popularity vs. Alternatives

What forces are at work keeping crufty old Make (with or without makefile generator tools) prominent as a build tool? Is it deficiencies in alternatives that keep them from being widely adopted, or insufficient publicity, or does something about Make keep it in place? Despite Make's many weaknesses and difficulties dealing with large ...

Test framework for component testing

I am looking for a test framework that suit my requirements. Following are the steps that I need to perform during automated testing: SetUp (There are some input files, that needs to be read or copied into some specific folders.) Execute (Run the stand alone) Tear Down (Clean up to bring the system in its old state) Apart from this I...

Can you use scons to build PHP extensions?

The standard way of writing PHP extensions is to use autoconf/automake alongside a script called phpize, which seems to generate your autoconf configuration based on a template that's specific to your PHP environment. This let's it build the PHP extension for the right version of PHP, etc. autoconf and the m4 language that is used to c...

How to locate a compiler in a path with a version number in it?

I'm trying to design an SConstruct file for an embedded system project. The compiler on my machine is at "C:\Program Files\IAR Systems\Embedded Workbench 5.4\arm\bin" I would like the build system to try to locate the toolchain even if there is another verison of Embedded Workbench installed, or if the user has chosen to install it elsew...

SCons less verbose ?

Hello, I want to remove from the SCons log the long compiling/linking commands. I followed what is written on this page : http://stackoverflow.com/questions/890142/what-do-you-do-to-make-compiler-lines-shorter Here is exactly what I did : AddOption("--verbose", action="store_true", dest="verbose_flag", default=False, help=...

CDT, SCons, and debug with attach

Hello, I am new to development in Eclipse/CDT, and not very experienced with gcc/gdb. My project (a shared library) is built in Eclipse by using SCons. The generated .so is at the end of the SCons script copied to an other place (maybe it's an important point). My application is so a plug-in that the user must load in the host applica...

scons does not find LaTeX DVI builder

I installed MacTex-2009 (from http://www.tug.org/mactex/2009/) and scons (1.2.0) on my iMac running Snow Leopard. Then I tested the installation with a trivial SConstruct file: env = Environment() dvi = env.DVI(target="hello.dvi",source="hello.tex") and an obvious LaTeX "hello.tex" file. When I execute "scons", I get: ...