.IP YACCFLAGS
General options passed to the parser generator.
+If $YACCFLAGS contains a \-d option,
+SCons assumes that the call will also create a .h file
+(if the yacc source file ends in a .y suffix)
+or a .hpp file
+(if the yacc source file ends in a .yy suffix)
.IP ZIP
The zip compression and file packaging utility.
.ES
env = Environment()
-env.['BUILDERS]['PDFBuilder'] = bld
+env['BUILDERS]['PDFBuilder'] = bld
.EE
.SS Defining Your Own Scanner Object
- When the input yacc file ends in .yy and the -d flag is specified,
recognize that a .hpp file (not a .h file) will be created.
+ - Make builder prefixes work correctly when deducing a target
+ from a source file name in another directory.
+
+ - Documentation fixes: typo in the man page.
+
RELEASE 0.90 - Wed, 25 Jun 2003 14:24:52 -0500
if target is None:
s = source[0]
if isinstance(s, SCons.Node.Node):
- s = os.path.split(str(s))[1]
- target = [ pre + os.path.splitext(s)[0] + suf ]
+ s = str(s)
+ dir, s = os.path.split(s)
+ target = pre + os.path.splitext(s)[0] + suf
+ if dir:
+ target = [ os.path.join(dir, target) ]
else:
target = adjustixes(target, pre, suf)
tgt = builder(env, source = 'src3')
assert tgt.path == 'libsrc3', \
"Target has unexpected name: %s" % tgt.path
- tgt = builder(env, target = 'lib/tgt4', source = 'lib/src4')
- assert tgt.path == os.path.join('lib', 'libtgt4'), \
+ tgt = builder(env, source = 'lib/src4')
+ assert tgt.path == os.path.join('lib', 'libsrc4'), \
+ "Target has unexpected name: %s" % tgt.path
+ tgt = builder(env, target = 'lib/tgt5', source = 'lib/src5')
+ assert tgt.path == os.path.join('lib', 'libtgt5'), \
"Target has unexpected name: %s" % tgt.path
def test_src_suffix(self):