[Scons-users] Scons fails to install a directory when using variants

Fabrice Triboix fabrice.triboix at v-nova.com
Sat Dec 12 02:52:19 EST 2015


Dear All,


I can use the `Install()` builder to install a directory, provided I don't use a variant.

Example without a variant (works fine):

    $ mkdir -p test/src/doc
    $ cd test
    $ echo "SConscript('src/SConscript', exports={'dst': '/tmp'})" > SConstruct
    $ echo xyz > src/doc/file
    $ echo "Import('dst')" > src/SConscript
    $ echo "Install(dst, 'doc')" >> src/SConscript
    $ scons /tmp
    scons: Reading SConscript files ...
    scons: done reading SConscript files.
    scons: Building targets ...
    Install directory: "src/doc" as "/tmp/doc"
    scons: done building targets.
    $ scons --version
    SCons by Steven Knight et al.:
        script: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
        engine: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
        engine path: ['/usr/lib/scons/SCons']
    Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation

Example with a variant (does not work):

    $ echo "SConscript('src/SConscript', variant_dir='build', duplicate=0, exports={'dst': '/tmp'})" > SConstruct
    $ scons /tmp
    scons: Reading SConscript files ...
    scons: done reading SConscript files.
    scons: Building targets ...
    Install file: "build/doc" as "/tmp/doc"
    scons: *** [/tmp/doc] build/doc: No such file or directory
    scons: building terminated because of errors.

This appears to be a very odd behaviour... For my current project, I want to be able to install a directory tree (typically documentation), but using variants.

Also, please note I tried with scons-2.4.1 and I have exactly the same problem.

Could anyone help me? Many thanks in advance!

  Fabrice

Company registration number: 08121803
Place of registration: England

This email and any attachments are sent in strictest confidence for the sole use of the addressee
and may contain legally privileged, confidential, and proprietary data. If you are not the intended
recipient, please advise the sender by replying promptly to this email and then delete and destroy
this email and any attachments without any further use, copying or forwarding.

Please consider your environmental responsibility before printing this e-mail


More information about the Scons-users mailing list