[Scons-users] Shared library in bin subdirectory
LRN
lrn1986 at gmail.com
Fri Dec 28 02:26:23 EST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 27.12.2012 22:18, William Deegan wrote:
> LRN,
>
> On Dec 27, 2012, at 12:28 AM, LRN wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>
>> On 26.12.2012 22:47, Bill Deegan wrote:
>>> On Wed, Dec 26, 2012 at 8:05 AM, LRN wrote:
>>>
>>>> Here's what i do:
>>>>
>>>> prefix = ARGUMENTS.get ('prefix', None) destdir =
>>>> ARGUMENTS.get ('destdir', None) if prefix == None: prefix =
>>>> '/usr/local'
>>>>
>>>> foo = env.SharedLibrary (target = "foo", source = ["foo.c"],
>>>> SHLIBPREFIX = 'lib', LIBSUFFIX='.dll.a') if destdir is not
>>>> None: destprefix = destdir + prefix env.Install
>>>> (os.path.join (destprefix, 'bin'), [foo])
>>>> env.Alias('install', destprefix)
>>>>
>>>> And when i do `scons prefix=/ destdir=c:/bar install', i end
>>>> up having libfoo.dll.a import library in c:/bar/bin/
>>>> directory instead of c:/bar/lib. How do i make SharedLibrary
>>>> or Install put the import library into /lib subdirectory?
>>>>
>>>
>>> Here's your problem: env.Install (os.path.join (destprefix,
>>> 'bin'), [foo])
>>>
>>> Change 'bin' to 'lib'...
>> Thank you for your quick response.
>>
>> I've tried that, and it works - libfoo.dll.a is installed into
>> /lib subdir!
>>
>> However, a completely unrelated problem has cropped up: Now when
>> i do `scons prefix=/ destdir=c:/bar install', i end up having
>> libfoo.dll shared library in c:/bar/lib/ directory instead of
>> c:/bar/bin. How do i make SharedLibrary or Install put the
>> shared library into /bin subdirectory?
>>
>
> Any builder only specifies 1 target dir. If you want to have the
> output(s) go to more than one, then you'll have to use
> env.Install() to do so.
>
And how do i do that? According to the man,
> Installs one or more source files or directories in the specified
> target, which must be a directory. The names of the specified
> source files or directories remain the same within the destination
> directory. env.Install('/usr/local/bin', source = ['foo', 'bar'])
only one directory is passed to Install. And even if it accepted two
directories, i wouldn't want to have .dll and .dll.a in BOTH /bin and
/lib subdirs.
So, how do i put .dll in /bin and .dll.a. in /lib?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQEcBAEBAgAGBQJQ3UmbAAoJEOs4Jb6SI2CwpcoH/0m7yb2Si4EYdyayZY0e0ctW
oo1HhfAnUxiN3OfU6Vdd/K46OG4qv4ZbrwyMzoShxVKYVPinkCpe+BDxVdkvOvWh
Sw1PT67l9pKtN71gkmoi8OLEzeVTCFtJRVz5BnIGw0jdCCwojMOx0+g6vIPDm6xt
SfccF/GpcI+4aUd89idoPFUUae1EpXOesQjvxL1fhdGPOoTCS8DQ0W7w82W+INZp
prKgWGDXhj+fJ3oeRv6h4HvyexhcP7kK2hR4EFsCkn/kgsGHA5OplxvWpI9/Iafe
m/RbTokwYt0T8n66obbzSqWbrVF8cCp4D+vfIP0EpG8RyTAz/n0/0IQfmR3J4yY=
=chXR
-----END PGP SIGNATURE-----
More information about the Scons-users
mailing list