Changeset 10247 for trunk/tools


Ignore:
Timestamp:
Sep 14, 2003, 8:50:59 PM (22 years ago)
Author:
bird
Message:

GCC versioning.
Global config in ETC. Optional special config possible for legacy support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bin/buildenv.cmd

    r10142 r10247  
    1 /* $Id: buildenv.cmd,v 1.50 2003-06-12 00:45:33 bird Exp $
     1/* $Id: buildenv.cmd,v 1.51 2003-09-14 18:50:59 bird Exp $
    22 *
    33 * This is the master tools environment script. It contains environment
     
    2727     * Version
    2828     */
    29     sVersion = '1.0.21 [2003-06-11]';
     29    sVersion = '1.1.0 [2003-09-14]';
    3030
    3131    /*
     
    9999     * Configuration - sorted please!
    100100     */
    101     parse source . . sPathFile .
    102     sPathFile = sPathFile||'.paths';
    103101    aPath.0 = 0;
    104102
     
    229227                do j = 1 to aCfg.0
    230228                    say left(aCfg.j.sId, 15) '-' left(aCfg.j.sGrp, 8) '-' aCfg.j.sDesc
     229                    sPath = PathQuery(aCfg.j.sId, aCfg.j.sId, 'quietisconfig');
     230                    if (sPath <> '') then
     231                        say '    'sPath;
    231232                end
    232233            end
     
    234235                do j = 1 to aCfg.0
    235236                    if (CfgIsConfigured(j)) then
     237                    do
    236238                        say left(aCfg.j.sId, 15) '-' left(aCfg.j.sGrp, 8) '-' aCfg.j.sDesc
     239                        sPath = PathQuery(aCfg.j.sId, aCfg.j.sId, 'quietisconfig');
     240                        if (sPath <> '') then
     241                            say '    'sPath;
     242                    end
    237243                end
    238244            end
     
    360366 * @param   sToolId      Tool id.
    361367 */
    362 CfgDesc: procedure expose aCfg. aPath. sPathFile
     368CfgDesc: procedure expose aCfg. aPath.
    363369    parse arg sToolId
    364370    do i = 1 to aCfg.0
     
    375381 * @param   sToolId      Tool id.
    376382 */
    377 CfgLookup: procedure expose aCfg. aPath. sPathFile
     383CfgLookup: procedure expose aCfg. aPath.
    378384    parse arg sToolId
    379385    iTool = 1;
     
    392398 * @param   fRM     If set we'll uninstall the tool from the environment.
    393399 */
    394 CfgInstallUninstall: procedure expose aCfg. aPath. sPathFile
     400CfgInstallUninstall: procedure expose aCfg. aPath.
    395401    parse arg iTool, fRM
    396402
     
    447453 * @param   fForced     If set, we'll force a reconfiguration of the tool.
    448454 */
    449 CfgConfigure: procedure expose aCfg. aPath. sPathFile
     455CfgConfigure: procedure expose aCfg. aPath.
    450456    parse arg iTool, fForced
    451457
     
    515521 * @param   fCleanup    If set we'll clean properly.
    516522 */
    517 CfgVerify: procedure expose aCfg. aPath. sPathFile
     523CfgVerify: procedure expose aCfg. aPath.
    518524    parse arg iTool, fQuiet, fCleanup
    519525
     
    571577 * @param   fQuiet  If set we'll to a quiet verify.
    572578 */
    573 CfgIsConfigured: procedure expose aCfg. aPath. sPathFile
     579CfgIsConfigured: procedure expose aCfg. aPath.
    574580    parse arg iTool
    575581
     
    593599 *          FALSE if file doesn't exists.
    594600 */
    595 CfgVerifyFile: procedure expose aCfg. aPath. sPathFile
     601CfgVerifyFile: procedure expose aCfg. aPath.
    596602    parse arg sFile, fQuiet, fOptional
    597603    if (fOptional = '') then fOptional = 0;
     
    614620 *          FALSE if file doesn't exists.
    615621 */
    616 CfgVerifyDir: procedure expose aCfg. aPath. sPathFile
     622CfgVerifyDir: procedure expose aCfg. aPath.
    617623    parse arg sDir, fQuiet
    618624    rc = SysFileTree(sDir, 'sDirs', 'DO');
     
    633639 * @param   sPathId     Program identifier. (lowercase!)
    634640 */
    635 PathQuery: procedure expose aCfg. aPath. sPathFile
     641PathQuery: procedure expose aCfg. aPath.
    636642    parse arg sPathId, sToolId, sOperation, fOptional
    637643
     
    698704
    699705/**
     706 * Determins the full name of the path file to use.
     707 * @returns Path to the pathfile to use. The file may not exist.
     708 */
     709PathGetFile: procedure
     710
     711    /*
     712     * Project Specific?
     713     */
     714    parse source . . sPathFile .
     715    sPathFile = sPathFile||'.paths';
     716    if (FileExists(sPathFile)) then
     717        return sPathFile;
     718
     719    /*
     720     * ETC?
     721     */
     722    sEtc = EnvGet('ETC');
     723    if (sEtc <> '') then
     724        return sEtc||'\BuildEnv.cfg';
     725return sPathFile;
     726
     727
     728/**
    700729 * Reads the path file into the 'aPath.' stem.
    701730 */
    702 PathRead: procedure expose aCfg. aPath. sPathFile
     731PathRead: procedure expose aCfg. aPath.
    703732
    704733    i = 1;                              /* Path index */
    705734    iLine = 0;                          /* Line # in file */
     735
     736
     737    sPathFile = PathGetFile();
    706738
    707739    /*
     
    745777 * Writes the path file from what's in the 'aPath.' stem.
    746778 */
    747 PathWrite: procedure expose aCfg. aPath. sPathFile
     779PathWrite: procedure expose aCfg. aPath.
     780
     781    sPathFile = PathGetFile();
    748782    call SysFileDelete(sPathFile);
    749783    do i = 1 to aPath.0
     
    765799 * @param   sPathId     The id of the path to remove.
    766800 */
    767 PathRemove: procedure expose aCfg. aPath. sPathFile
     801PathRemove: procedure expose aCfg. aPath.
    768802    parse arg sPathId
    769803
     
    800834 * @param   sNewPath    Path.
    801835 */
    802 PathSet: procedure expose aCfg. aPath. sPathFile
     836PathSet: procedure expose aCfg. aPath.
    803837parse arg sPathId, sNewPath
    804838
     
    828862 * Fills 'aPath.' with default settings overwriting anything in the table.
    829863 */
    830 PathSetDefault: procedure expose aCfg. aPath. sPathFile
     864PathSetDefault: procedure expose aCfg. aPath.
    831865    i = 1;
    832866
     
    849883        aPath.i.sPId = 'gcc303';                    aPath.i.sPath = 'f:\GCC\v3.0.3beta_os2\emx';    i = i + 1;
    850884        aPath.i.sPId = 'gcc321';                    aPath.i.sPath = 'f:\GCC\v3.2.1beta_os2\emx';    i = i + 1;
    851         aPath.i.sPId = 'gcc322';                    aPath.i.sPath = 'f:\GCC\v3.2.2alpha1_os2\usr';  i = i + 1;
     885        aPath.i.sPId = 'gcc322';                    aPath.i.sPath = 'f:\GCC\v3.2.2beta2_os2\usr';   i = i + 1;
    852886        aPath.i.sPId = 'home';                      aPath.i.sPath = 'e:\user\kso';                  i = i + 1;
    853887        aPath.i.sPId = 'icatgam';                   aPath.i.sPath = 'f:\Icat\v4.0.6rc1_os2';        i = i + 1;
     
    10071041 * @param   sToolId     The tool Id.
    10081042 */
    1009 PathConfig: procedure expose aCfg. aPath. sPathFile
     1043PathConfig: procedure expose aCfg. aPath.
    10101044    parse arg sOperation, sPathId, sToolId
    10111045
     
    15241558 * Concurrent Versions System (CVS)
    15251559 */
    1526 CVS: procedure expose aCfg. aPath. sPathFile
     1560CVS: procedure expose aCfg. aPath.
    15271561    parse arg sToolId,sOperation,fRM,fQuiet
    15281562
     
    15721606 * EMX
    15731607 */
    1574 EMX: procedure expose aCfg. aPath. sPathFile
     1608EMX: procedure expose aCfg. aPath.
    15751609    parse arg sToolId,sOperation,fRM,fQuiet
    15761610
     
    16501684 * EMX PGCC - must be installed on to the ordinar EMX.
    16511685 */
    1652 EMXPGCC: procedure expose aCfg. aPath. sPathFile
     1686EMXPGCC: procedure expose aCfg. aPath.
    16531687    parse arg sToolId,sOperation,fRM,fQuiet
    16541688
     
    17161750 * FreeType v1.3.1 EMX release.
    17171751 */
    1718 FreeTypeEMX: procedure expose aCfg. aPath. sPathFile
     1752FreeTypeEMX: procedure expose aCfg. aPath.
    17191753    parse arg sToolId,sOperation,fRM,fQuiet
    17201754    sPathFreeType = PathQuery('freetypeemx', sToolId, sOperation);
     
    17481782 * IBM DB2 v5.2
    17491783 */
    1750 db2v52: procedure expose aCfg. aPath. sPathFile
     1784db2v52: procedure expose aCfg. aPath.
    17511785    parse arg sToolId,sOperation,fRM,fQuiet
    17521786    sPathDB2   = PathQuery('db2v52', sToolId, sOperation);
     
    17961830 *  Device Driver Kit (DDK) base.
    17971831 */
    1798 DDK: procedure expose aCfg. aPath. sPathFile
     1832DDK: procedure expose aCfg. aPath.
    17991833    parse arg sToolId,sOperation,fRM,fQuiet
    18001834
     
    18271861 *  Device Driver Kit (DDK) base.
    18281862 */
    1829 DDKBase: procedure expose aCfg. aPath. sPathFile
     1863DDKBase: procedure expose aCfg. aPath.
    18301864    parse arg sToolId,sOperation,fRM,fQuiet
    18311865
     
    18931927 *  Device Driver Kit (DDK) Video.
    18941928 */
    1895 DDKVideo: procedure expose aCfg. aPath. sPathFile
     1929DDKVideo: procedure expose aCfg. aPath.
    18961930    parse arg sToolId,sOperation,fRM,fQuiet
    18971931
     
    19561990 * Doxygen v1.2.11.1 for OS/2.
    19571991 */
    1958 DoxyGen: procedure expose aCfg. aPath. sPathFile
     1992DoxyGen: procedure expose aCfg. aPath.
    19591993    parse arg sToolId,sOperation,fRM,fQuiet
    19601994
     
    19892023 * Note! make .lib of every .a! in 4OS2: for /R %i in (*.a) do if not exist %@NAME[%i].lib emxomf %i
    19902024 */
    1991 GCC3xx: procedure expose aCfg. aPath. sPathFile
     2025GCC3xx: procedure expose aCfg. aPath.
    19922026    parse arg sToolId,sOperation,fRM,fQuiet,sPathId
    19932027
     
    20822116 * Note! make .lib of every .a! in 4OS2: for /R %i in (*.a) do if not exist %@NAME[%i].lib emxomf %i
    20832117 */
    2084 GCC322plus: procedure expose aCfg. aPath. sPathFile
     2118GCC322plus: procedure expose aCfg. aPath.
    20852119    parse arg sToolId,sOperation,fRM,fQuiet,sPathId
    20862120
     
    21192153    call EnvAddFront fRM, 'C_INCLUDE_PATH',     sGCCForw'/include;'
    21202154    call EnvAddFront fRM, 'C_INCLUDE_PATH',     sGCCForw'/lib/gcc-lib/'sTrgt'/'sVer'/include;'
     2155    call EnvAddFront fRM, 'C_INCLUDE_PATH',     sGCCForw'/lib/gcc-lib/'sTrgt'/'sVer'/include;'
    21212156    call EnvAddFront fRM, 'CPLUS_INCLUDE_PATH', sGCCForw'/include;'
    2122     call EnvAddFront fRM, 'C_INCLUDE_PATH',     sGCCForw'/lib/gcc-lib/'sTrgt'/'sVer'/include;'
    21232157    call EnvAddFront fRM, 'CPLUS_INCLUDE_PATH', sGCCForw'/include/c++/'sVer'/backward;'
    21242158    call EnvAddFront fRM, 'CPLUS_INCLUDE_PATH', sGCCForw'/include/c++/'sVer'/'sTrgt';'
     
    21292163    /* is this used? */
    21302164    call EnvSet      fRM, 'PROTODIR',           sGCCForw'/include/c++/gen'
    2131     call EnvSet      fRM, 'EMXOMFLD_LINKER',    'ILINK -nofree -STUB:'sGCCBack'\bin\os2stub.bin '
    21322165
    21332166    /*
     
    21762209 * ICAT Debugger
    21772210 */
    2178 ICATGam: procedure expose aCfg. aPath. sPathFile
     2211ICATGam: procedure expose aCfg. aPath.
    21792212    parse arg sToolId,sOperation,fRM,fQuiet
    21802213    sPathICAT   = PathQuery('icatgam', sToolId, sOperation);
     
    22112244 * ICAT Debugger
    22122245 */
    2213 ICATGam406RC1: procedure expose aCfg. aPath. sPathFile
     2246ICATGam406RC1: procedure expose aCfg. aPath.
    22142247    parse arg sToolId,sOperation,fRM,fQuiet
    22152248    sPathICAT   = PathQuery('icatgam406rc1', sToolId, sOperation);
     
    22472280 * ICAT Debugger for PE images.
    22482281 */
    2249 ICATPe: procedure expose aCfg. aPath. sPathFile
     2282ICATPe: procedure expose aCfg. aPath.
    22502283    parse arg sToolId,sOperation,fRM,fQuiet
    22512284    sPathICAT   = PathQuery('icatgam', sToolId, sOperation);
     
    22912324 * Interactive Disassembler (IDA) v3.80a
    22922325 */
    2293 IDA38: procedure expose aCfg. aPath. sPathFile
     2326IDA38: procedure expose aCfg. aPath.
    22942327    parse arg sToolId,sOperation,fRM,fQuiet
    22952328    /*
     
    23272360 * Interactive Disassembler (IDA) v4.01
    23282361 */
    2329 IDA40: procedure expose aCfg. aPath. sPathFile
     2362IDA40: procedure expose aCfg. aPath.
    23302363    parse arg sToolId,sOperation,fRM,fQuiet
    23312364    /*
     
    23632396 * Interactive Disassembler (IDA) v4.14
    23642397 */
    2365 IDA414: procedure expose aCfg. aPath. sPathFile
     2398IDA414: procedure expose aCfg. aPath.
    23662399    parse arg sToolId,sOperation,fRM,fQuiet
    23672400    /*
     
    23992432 * Interactive Disassembler (IDA) Plugin SDK (v5.0?)
    24002433 */
    2401 IDASDK: procedure expose aCfg. aPath. sPathFile
     2434IDASDK: procedure expose aCfg. aPath.
    24022435    parse arg sToolId,sOperation,fRM,fQuiet
    24032436    /*
     
    24422475 * Interactive Disassembler (IDA) Plugin SDK (v5.0?)
    24432476 */
    2444 IDASDK: procedure expose aCfg. aPath. sPathFile
     2477IDASDK: procedure expose aCfg. aPath.
    24452478    parse arg sToolId,sOperation,fRM,fQuiet
    24462479    /*
     
    24852518 * JAVA v1.3.1 (latest)
    24862519 */
    2487 Java131: procedure expose aCfg. aPath. sPathFile
     2520Java131: procedure expose aCfg. aPath.
    24882521    parse arg sToolId,sOperation,fRM,fQuiet
    24892522    /*
     
    25402573 * (lib) JPEG v6b port.
    25412574 */
    2542 JPEG: procedure expose aCfg. aPath. sPathFile
     2575JPEG: procedure expose aCfg. aPath.
    25432576    parse arg sToolId,sOperation,fRM,fQuiet
    25442577    sPathJPEG = PathQuery('jpeg', sToolId, sOperation);
     
    25762609 * Mode commandline.
    25772610 */
    2578 Mode: procedure expose aCfg. aPath. sPathFile
     2611Mode: procedure expose aCfg. aPath.
    25792612    parse arg sToolId,sOperation,fRM,fQuiet,cols,rows
    25802613
     
    25982631 * Microsoft C v6.0a 16-bit
    25992632 */
    2600 MSCV6_16: procedure expose aCfg. aPath. sPathFile
     2633MSCV6_16: procedure expose aCfg. aPath.
    26012634    parse arg sToolId,sOperation,fRM,fQuiet
    26022635
     
    26482681 * Microsoft C v6.0a 32-bit
    26492682 */
    2650 MSCV6_32: procedure expose aCfg. aPath. sPathFile
     2683MSCV6_32: procedure expose aCfg. aPath.
    26512684    parse arg sToolId,sOperation,fRM,fQuiet
    26522685
     
    26922725 * Microsoft C v7.0 16-bit with OS/2 support.
    26932726 */
    2694 MSCV7_16: procedure expose aCfg. aPath. sPathFile
     2727MSCV7_16: procedure expose aCfg. aPath.
    26952728    parse arg sToolId,sOperation,fRM,fQuiet
    26962729
     
    27482781 * mySQL Database system
    27492782 */
    2750 mySQL: procedure expose aCfg. aPath. sPathFile
     2783mySQL: procedure expose aCfg. aPath.
    27512784    parse arg sToolId,sOperation,fRM,fQuiet
    27522785
     
    27932826 * NASM - NetWide Assembler (all versions)
    27942827 */
    2795 NASM: procedure expose aCfg. aPath. sPathFile
     2828NASM: procedure expose aCfg. aPath.
    27962829    parse arg sToolId,sOperation,fRM,fQuiet,sPathId
    27972830
     
    28352868 * NetQOS2 - help subsystem++ for VAC 3.6.5 and VAC 4.0
    28362869 */
    2837 NetQOS2: procedure expose aCfg. aPath. sPathFile
     2870NetQOS2: procedure expose aCfg. aPath.
    28382871    parse arg sToolId,sOperation,fRM,fQuiet
    28392872    sPathNetQOS2 = PathQuery('netqos2', sToolId, sOperation);
     
    28772910 * Odin32 testcase setup.
    28782911 */
    2879 Odin32Testcase: procedure expose aCfg. aPath. sPathFile
     2912Odin32Testcase: procedure expose aCfg. aPath.
    28802913    parse arg sToolId,sOperation,fRM,fQuiet
    28812914    if (  PathQuery('testcase_drive_unused', sToolId, sOperation) = '',
     
    29102943 * PERL 5005_53 or 5.004_55
    29112944 */
    2912 Perl50xxx: procedure expose aCfg. aPath. sPathFile
     2945Perl50xxx: procedure expose aCfg. aPath.
    29132946    parse arg sToolId,sOperation,fRM,fQuiet
    29142947
     
    29622995 * PERL v5.8.0
    29632996 */
    2964 Perl580: procedure expose aCfg. aPath. sPathFile
     2997Perl580: procedure expose aCfg. aPath.
    29652998    parse arg sToolId,sOperation,fRM,fQuiet
    29662999
     
    30073040 * Python/2 v1.5.2
    30083041 */
    3009 Python: procedure expose aCfg. aPath. sPathFile
     3042Python: procedure expose aCfg. aPath.
    30103043    parse arg sToolId,sOperation,fRM,fQuiet
    30113044
     
    30463079 * OS/2 Programmers Toolkit v4.0 (CSD1/4)
    30473080 */
    3048 Toolkit40: procedure expose aCfg. aPath. sPathFile
     3081Toolkit40: procedure expose aCfg. aPath.
    30493082    parse arg sToolId,sOperation,fRM,fQuiet
    30503083
     
    31443177 * OS/2 Programmers Toolkit v4.5
    31453178 */
    3146 Toolkit45: procedure expose aCfg. aPath. sPathFile
     3179Toolkit45: procedure expose aCfg. aPath.
    31473180    parse arg sToolId,sOperation,fRM,fQuiet
    31483181
     
    32323265 * OS/2 Programmers Toolkit v4.5.1
    32333266 */
    3234 Toolkit451: procedure expose aCfg. aPath. sPathFile
     3267Toolkit451: procedure expose aCfg. aPath.
    32353268    parse arg sToolId,sOperation,fRM,fQuiet
    32363269
     
    33293362 * OS/2 Programmers Toolkit v4.5.2
    33303363 */
    3331 Toolkit452: procedure expose aCfg. aPath. sPathFile
     3364Toolkit452: procedure expose aCfg. aPath.
    33323365    parse arg sToolId,sOperation,fRM,fQuiet
    33333366
     
    34303463 * This will envolve into an full UNIX like environment some day perhaps...
    34313464 */
    3432 Unix: procedure expose aCfg. aPath. sPathFile
     3465Unix: procedure expose aCfg. aPath.
    34333466    parse arg sToolId,sOperation,fRM,fQuiet
    34343467
     
    34883521 * IBM Visual Age for C++ v3.08 for OS/2
    34893522 */
    3490 VAC308: procedure expose aCfg. aPath. sPathFile
     3523VAC308: procedure expose aCfg. aPath.
    34913524    parse arg sToolId,sOperation,fRM,fQuiet
    34923525
     
    36073640 * Visual Age / C and C++ tools v3.6.5 for OS/2
    36083641 */
    3609 VAC365: procedure expose aCfg. aPath. sPathFile
     3642VAC365: procedure expose aCfg. aPath.
    36103643    parse arg sToolId,sOperation,fRM,fQuiet
    36113644
     
    36833716 * Visual Age for C++ v4.0 for OS/2
    36843717 */
    3685 VAC40: procedure expose aCfg. aPath. sPathFile
     3718VAC40: procedure expose aCfg. aPath.
    36863719    parse arg sToolId,sOperation,fRM,fQuiet
    36873720
     
    37593792 * WarpIn
    37603793 */
    3761 WarpIn: procedure expose aCfg. aPath. sPathFile
     3794WarpIn: procedure expose aCfg. aPath.
    37623795    parse arg sToolId,sOperation,fRM,fQuiet
    37633796
     
    37983831 * WatCom C/C++ v11.0
    37993832 */
    3800 WatComC11: procedure expose aCfg. aPath. sPathFile
     3833WatComC11: procedure expose aCfg. aPath.
    38013834    parse arg sToolId,sOperation,fRM,fQuiet, iBits
    38023835
     
    38673900 * WatCom C/C++ v11.0c
    38683901 */
    3869 WatComC11c: procedure expose aCfg. aPath. sPathFile
     3902WatComC11c: procedure expose aCfg. aPath.
    38703903    parse arg sToolId,sOperation,fRM,fQuiet, iBits
    38713904
Note: See TracChangeset for help on using the changeset viewer.