From b86d2a13733ec960cf974b2e3afbab09e7296ba3 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Mon, 1 May 2017 19:26:10 +0100 Subject: Change the imports to help with development and testing. Remove an exception that is no longer needed. --- src/engine/SCons/Tool/DCommon.py | 1 + src/engine/SCons/Tool/dmd.py | 13 +++---------- src/engine/SCons/Tool/gdc.py | 6 +++--- src/engine/SCons/Tool/ldc.py | 11 ++++------- 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, ) -- cgit v0.12 From f24ede3177906a94d1163ad3e6d7b25ed55cfc28 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Sun, 21 May 2017 05:08:54 +0100 Subject: Revert the removal of the Fedora package exception, so as to follow the SCons deprecation cycle. --- src/engine/SCons/Tool/ldc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/engine/SCons/Tool/ldc.py b/src/engine/SCons/Tool/ldc.py index abd0dd3..215c3e7 100644 --- a/src/engine/SCons/Tool/ldc.py +++ b/src/engine/SCons/Tool/ldc.py @@ -104,6 +104,13 @@ def generate(env): env['DSHLINK'] = '$DC' env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos2-ldc') + + #### START DEPRECATION 2017-05-21 + # 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') + #### END DEPRECATION 2017-05-21 + env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l' -- cgit v0.12 From 90dbefb44ca9e863d8dc8e20783630aefe2a5760 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Sun, 21 May 2017 06:30:03 +0100 Subject: Update for latest D-related pull request. Remove some trainling whitespace. --- src/CHANGES.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 6894135..8bf5e90 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -14,11 +14,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER RELEASE VERSION/DATE TO BE FILLED IN LATER From Daniel Moody: - - Updated the QMTest/TestCmd.py so when using the + - Updated the QMTest/TestCmd.py so when using the preserve option, it will be able to print unicode directories. - Also updated test/scons-time/run/option/verbose.py that was not taking into account the output when PRESERVE was enabled - + From Gaurav Juvekar: - Fix issue #2910: Make --tree=all handle Unicode. (PR #427) - Fix issue #2788: Fix typo in documentation example for sconf. (PR #388) @@ -31,6 +31,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Russel Winder: - Reordered the default D tools from "dmd, gdc, ldc" to "dmd, ldc, gdc". - Add a ProgramAllAtOnce builder to the dmd, ldc, and gdc tools. (PR #448) + - Deprecate a file name exception for very old Fedora LDC installation. + - Remove some comments that haven't been relevant for years. + - Adjust the way a package is imported to make experimenting easier. From William Blevins: - Updated D language scanner support to latest: 2.071.1. (PR #1924) -- cgit v0.12 From b90a9fc6675650ce72f45fba4b07dc44d38eadcb Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Wed, 24 May 2017 05:34:26 +0100 Subject: Remove unnecessary lines from src/CHANGES.txt as requested. --- src/CHANGES.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 8bf5e90..cc4ee35 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -32,8 +32,6 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Reordered the default D tools from "dmd, gdc, ldc" to "dmd, ldc, gdc". - Add a ProgramAllAtOnce builder to the dmd, ldc, and gdc tools. (PR #448) - Deprecate a file name exception for very old Fedora LDC installation. - - Remove some comments that haven't been relevant for years. - - Adjust the way a package is imported to make experimenting easier. From William Blevins: - Updated D language scanner support to latest: 2.071.1. (PR #1924) -- cgit v0.12