qLc@sdZdZddlZddlZddlZddlZddlZddlZdZ ia ia dZ dZ dS(sSCons.Tool.dmd Tool-specific initialization for the Digital Mars D compiler. (http://digitalmars.com/d) Coded by Andy Friesen (andy@ikagames.com) 15 November 2003 There are a number of problems with this script at this point in time. The one that irritates me 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. DPATH - List of paths to search for import modules. DVERSIONS - List of version tags to enable when compiling. DDEBUG - List of debug tags to enable when compiling. Linker related variables: LIBS - List of library files to link in. DLINK - Name of the linker to use. Defaults to dmd or gdmd. DLINKFLAGS - List of linker flags. Lib tool variables: DLIB - Name of the lib tool to use. Defaults to lib. DLIBFLAGS - List of flags to pass to the lib tool. LIBS - Same as for the linker. (libraries to pull into the .lib) s;src/engine/SCons/Tool/dmd.py 5023 2010/06/14 22:05:46 sconsiNcCs^|s dSxM|D]E}|jrtjjt|jdd}|dkrVdSqqWdS(Niis.d(tsourcestostpathtsplitexttstr(tsourcetstext((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.pytisDDs  #  c Csxtjj|\}}tjjdd}|jd||jd||jdtjj|jdtjj|j ddg}||d} yt| |d?$DLINK -of$TARGET $SOURCES $DFLAGS $DLINKFLAGS $_DLINKLIBFLAGStDLINKCOMtlibtDLIBs5$DLIB $_DLIBFLAGS -c $TARGET $SOURCES $_DLINKLIBFLAGStDLIBCOMsV$( ${_concat(DLIBLINKPREFIX, LIBS, DLIBLINKSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)t_DLINKLIBFLAGSsD$( ${_concat(DLIBFLAGPREFIX, DLIBFLAGS, DLIBFLAGSUFFIX, __env__)} $)t _DLIBFLAGSt DLINKFLAGStDLIBLINKPREFIXs.libtDLIBLINKSUFFIXtDLIBFLAGPREFIXtDLIBFLAGSUFFIXtDLINKFLAGPREFIXtDLINKFLAGSUFFIXtLINKCOMt SMART_LINKCOMcSst|rdS|SdS(Ns $DLINKCOM(R(Rttargettenvt for_signaturet defaultLinker((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.pyt _smartLinks tARCOMt SMART_ARCOMcSst|rdS|SdS(Ns$DLIBCOM(R(RR2R3R4t defaultLib((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.pyt _smartLibs s $SMART_ARCOM s$SMART_LINKCOM cSst|ry|d}Wntk r3g}nXd|krd|kr|dkrn|jddgq|dkr|jddgqnd|kr|jddgnd|kr|jddgqn|S(NtLIBStphobostgphobosR R tpthreadtm(RtKeyErrortAppend(RR2R3R4R5tdctlibs((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.pyR6s       (tSConstTooltcreateObjBuilderstActiont add_actiont add_emittertDefaultstStaticObjectEmittertSharedObjectEmittertDetecttWhereIstrindexRRtisdirRAtcreateStaticLibBuildertgett smart_linkR@t smart_lib( R3t static_objt shared_objtDActionRBtdmd_pathtxt phobosDirtlinkcomR6tarcomR:((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.pytgenerateSs                                       cCs|jddgS(NR R (RM(R3((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.pytexistss(t__doc__t __revision__Rt SCons.ActionRDt SCons.BuildertSCons.DefaultstSCons.Scanner.Dt SCons.ToolRRSRTR]R^(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.pyt s