[PD-dev] faster scons

Mathieu Bouchard matju at artengine.ca
Wed May 10 20:43:01 CEST 2006


On Mon, 8 May 2006, Tim Blechmann wrote:
> On Sun, 2006-05-07 at 23:03 -0400, Mathieu Bouchard wrote:
> > Is it possible to not make devel_0_39's SConscript redetect Tcl/Tk
> > every time it is run? It'd save a few seconds at each build and a
> > pageful of redundantly redundant redundancies.
> that's why it's cached ...
> 
> > Also I'm trying to figure out how to make "scons install" set the 
> > permissions a file, just like UNIX's "install -m". Any ideas?
> man scons | grep Chmod

My difficulty isn't in the RTFM, it's in getting Chmod to work once i've
RTFM. I haven't had a course in scons so I'm pretty much monkeying around.  
Do you know any good tutorials?


  installs.append([env.InstallAs(prefix + '/bin/desire', 'src/desire.tk'),
                           Chmod(prefix + '/bin/desire', 0755)])

scons: *** attempted to add a non-Node as source of install:
ActionCaller(env, target, source) is a <type 'instance'>, not a Node


  installs.append(env.InstallAs(prefix+'/bin/desire', 'src/desire.tk'))
  installs.append(Chmod(prefix+'/bin/desire', 0755))

(no error message, but silently ignored)


installs.append(env.Command(prefix+'/bin/desire','src/desire.tk',
	[env.InstallAs('$TARGET','$SOURCE'), Chmod('$TARGET',0755)]))

TypeError: Tried to lookup Dir '.' as a File.:
  File "SConstruct", line 59:
    [env.InstallAs('$TARGET','$SOURCE'), Chmod('$TARGET',0755)]))
(and then 10 more lines)


installs.append(env.Command(prefix+'/bin/desire','src/desire.tk',
	[env.InstallAs(prefix+'/bin/desire','src/desire.tk'), 
	 Chmod(prefix+'/bin/desire',0755)]))

sh: /home/matju/bin/desire: No such file or directory
scons: *** [/home/matju/bin/desire] Error 127


installs.append(env.Command(prefix+'/bin/desire','src/desire.tk',
	["install -m 755 $SOURCE $TARGET"]))

finally works, but it won't work with MSVC6.
At least I've learned to use -m and not --mode, for OSX-compat reasons.

 _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada




More information about the Pd-dev mailing list