summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2017-05-01 18:26:10 (GMT)
committerRussel Winder <russel@winder.org.uk>2017-05-01 18:26:10 (GMT)
commitb86d2a13733ec960cf974b2e3afbab09e7296ba3 (patch)
treea86c0d14e03f006db9f47dcb5a9fc071d4f0cd8b
parentfa879a1ea3230176d3bfa64212883dd29d6358b3 (diff)
downloadSCons-b86d2a13733ec960cf974b2e3afbab09e7296ba3.zip
SCons-b86d2a13733ec960cf974b2e3afbab09e7296ba3.tar.gz
SCons-b86d2a13733ec960cf974b2e3afbab09e7296ba3.tar.bz2
Change the imports to help with development and testing. Remove an exception that is no longer needed.
-rw-r--r--src/engine/SCons/Tool/DCommon.py1
-rw-r--r--src/engine/SCons/Tool/dmd.py13
-rw-r--r--src/engine/SCons/Tool/gdc.py6
-rw-r--r--src/engine/SCons/Tool/ldc.py11
4 files changed, 11 insertions, 20 deletions
diff --git a/src/engine/SCons/Tool/DCommon.py b/src/engine/SCons/Tool/DCommon.py
index c08f040..71c4d8d 100644
--- a/src/engine/SCons/Tool/DCommon.py
+++ b/src/engine/SCons/Tool/DCommon.py
@@ -7,6 +7,7 @@ Common code for the various D tools.
Coded by Russel Winder (russel@winder.org.uk)
2012-09-06
"""
+
#
# __COPYRIGHT__
#
diff --git a/src/engine/SCons/Tool/dmd.py b/src/engine/SCons/Tool/dmd.py
index 76e885b..64beea5 100644
--- a/src/engine/SCons/Tool/dmd.py
+++ b/src/engine/SCons/Tool/dmd.py
@@ -11,13 +11,6 @@ Originally coded by Andy Friesen (andy@ikagames.com)
Evolved by Russel Winder (russel@winder.org.uk)
2010-02-07 onwards
-There are a number of problems with this script at this point in time.
-The one that irritates the most is the Windows linker setup. The D
-linker doesn't have a way to add lib paths on the commandline, as far
-as I can see. You have to specify paths relative to the SConscript or
-use absolute paths. To hack around it, add '#/blah'. This will link
-blah.lib from the directory where SConstruct resides.
-
Compiler variables:
DC - The name of the D compiler to use. Defaults to dmd or gdmd,
whichever is found.
@@ -71,7 +64,7 @@ import SCons.Defaults
import SCons.Scanner.D
import SCons.Tool
-import SCons.Tool.DCommon
+import SCons.Tool.DCommon as DCommon
def generate(env):
@@ -98,7 +91,7 @@ def generate(env):
env['DDEBUG'] = []
if env['DC']:
- SCons.Tool.DCommon.addDPATHToEnv(env, env['DC'])
+ DCommon.addDPATHToEnv(env, env['DC'])
env['DINCPREFIX'] = '-I'
env['DINCSUFFIX'] = ''
@@ -155,7 +148,7 @@ def generate(env):
env['BUILDERS']['ProgramAllAtOnce'] = SCons.Builder.Builder(
action='$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -of$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS',
- emitter=SCons.Tool.DCommon.allAtOnceEmitter,
+ emitter=DCommon.allAtOnceEmitter,
)
diff --git a/src/engine/SCons/Tool/gdc.py b/src/engine/SCons/Tool/gdc.py
index 9433643..20903f7 100644
--- a/src/engine/SCons/Tool/gdc.py
+++ b/src/engine/SCons/Tool/gdc.py
@@ -54,7 +54,7 @@ import SCons.Action
import SCons.Defaults
import SCons.Tool
-import SCons.Tool.DCommon
+import SCons.Tool.DCommon as DCommon
def generate(env):
@@ -81,7 +81,7 @@ def generate(env):
env['DDEBUG'] = []
if env['DC']:
- SCons.Tool.DCommon.addDPATHToEnv(env, env['DC'])
+ DCommon.addDPATHToEnv(env, env['DC'])
env['DINCPREFIX'] = '-I'
env['DINCSUFFIX'] = ''
@@ -132,7 +132,7 @@ def generate(env):
env['BUILDERS']['ProgramAllAtOnce'] = SCons.Builder.Builder(
action='$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -o $TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS',
- emitter=SCons.Tool.DCommon.allAtOnceEmitter,
+ emitter=DCommon.allAtOnceEmitter,
)
diff --git a/src/engine/SCons/Tool/ldc.py b/src/engine/SCons/Tool/ldc.py
index d0585af..abd0dd3 100644
--- a/src/engine/SCons/Tool/ldc.py
+++ b/src/engine/SCons/Tool/ldc.py
@@ -3,7 +3,7 @@ from __future__ import print_function
"""SCons.Tool.ldc
Tool-specific initialization for the LDC compiler.
-(http://www.dsource.org/projects/ldc)
+(https://github.com/ldc-developers/ldc)
Developed by Russel Winder (russel@winder.org.uk)
2012-05-09 onwards
@@ -59,7 +59,7 @@ import SCons.Defaults
import SCons.Scanner.D
import SCons.Tool
-import SCons.Tool.DCommon
+import SCons.Tool.DCommon as DCommon
def generate(env):
@@ -86,7 +86,7 @@ def generate(env):
env['DDEBUG'] = []
if env['DC']:
- SCons.Tool.DCommon.addDPATHToEnv(env, env['DC'])
+ DCommon.addDPATHToEnv(env, env['DC'])
env['DINCPREFIX'] = '-I='
env['DINCSUFFIX'] = ''
@@ -104,9 +104,6 @@ def generate(env):
env['DSHLINK'] = '$DC'
env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos2-ldc')
- # Hack for Fedora the packages of which use the wrong name :-(
- if os.path.exists('/usr/lib64/libphobos-ldc.so') or os.path.exists('/usr/lib32/libphobos-ldc.so') or os.path.exists('/usr/lib/libphobos-ldc.so'):
- env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos-ldc')
env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l'
@@ -147,7 +144,7 @@ def generate(env):
env['BUILDERS']['ProgramAllAtOnce'] = SCons.Builder.Builder(
action='$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -of=$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS',
- emitter=SCons.Tool.DCommon.allAtOnceEmitter,
+ emitter=DCommon.allAtOnceEmitter,
)