summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2018-09-23 23:28:49 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2018-09-23 23:28:49 (GMT)
commit9d8ca555d5e95fde61fc3f43fa0fde632e487279 (patch)
treed01b6bbc2948cfc039b81271c7ac973d21367414
parent011eaa1d4944572faf60c6cc9bd56844fc1f2ed2 (diff)
downloadSCons-9d8ca555d5e95fde61fc3f43fa0fde632e487279.zip
SCons-9d8ca555d5e95fde61fc3f43fa0fde632e487279.tar.gz
SCons-9d8ca555d5e95fde61fc3f43fa0fde632e487279.tar.bz2
Fix Github issue #2580 - hash mark not properly handled in FRAMEWORKPATH
-rw-r--r--src/CHANGES.txt2
-rw-r--r--src/engine/SCons/Tool/applelink.py3
-rw-r--r--test/LINK/applelink.py70
3 files changed, 74 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 12df163..1461d62 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -47,6 +47,8 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
- Fixed issue causing stack trace when python Action function contains a unicode string when being
run with Python 2.7
- Add alternate path to QT install for Centos in qt tool: /usr/lib64/qt-3.3/bin
+ - Fix GH Issue #2580 - # in FRAMEWORKPATH doesn't get properly expanded. The # is left in the
+ command line.
From Andrew Featherstone
- Removed unused --warn options from the man page and source code.
diff --git a/src/engine/SCons/Tool/applelink.py b/src/engine/SCons/Tool/applelink.py
index c5f4376..65b569a 100644
--- a/src/engine/SCons/Tool/applelink.py
+++ b/src/engine/SCons/Tool/applelink.py
@@ -45,7 +45,8 @@ def generate(env):
link.generate(env)
env['FRAMEWORKPATHPREFIX'] = '-F'
- env['_FRAMEWORKPATH'] = '${_concat(FRAMEWORKPATHPREFIX, FRAMEWORKPATH, "", __env__)}'
+ env['_FRAMEWORKPATH'] = '${_concat(FRAMEWORKPATHPREFIX, FRAMEWORKPATH, "", __env__, RDirs)}'
+
env['_FRAMEWORKS'] = '${_concat("-framework ", FRAMEWORKS, "", __env__)}'
env['LINKCOM'] = env['LINKCOM'] + ' $_FRAMEWORKPATH $_FRAMEWORKS $FRAMEWORKSFLAGS'
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -dynamiclib')
diff --git a/test/LINK/applelink.py b/test/LINK/applelink.py
new file mode 100644
index 0000000..0d05d65
--- /dev/null
+++ b/test/LINK/applelink.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+import os
+
+import TestSCons
+
+_python_ = TestSCons._python_
+_exe = TestSCons._exe
+
+test = TestSCons.TestSCons()
+
+
+test.write('foo.c', r"""
+#include <stdio.h>
+#include <stdlib.h>
+int
+main(int argc, char *argv[])
+{
+ argv[argc++] = "--";
+ printf("foo.c\n");
+ exit (0);
+}
+""")
+
+# Test issue # 2580
+test.write('SConstruct', """
+DefaultEnvironment(tools=[])
+env = Environment()
+
+env.Object(
+ target = '#foo.o',
+ source = ['foo.c'],
+ FRAMEWORKS = ['Ogre'],
+ FRAMEWORKPATH = ['#frameworks']
+)
+""" % locals())
+
+test.run(arguments='-Q', stdout='gcc -o foo.o -c -Fframeworks foo.c\n')
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4: