Changeset 9032 for trunk/tools


Ignore:
Timestamp:
Aug 20, 2002, 6:07:11 AM (23 years ago)
Author:
bird
Message:

Implemented make passes.
Corrected bad BUILD_NOCOLORS check.

Location:
trunk/tools/bin
Files:
3 edited

Legend:

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

    r6867 r9032  
    1 /* $Id: DoDirs.cmd,v 1.4 2001-09-30 00:24:35 bird Exp $
     1/* $Id: DoDirs.cmd,v 1.5 2002-08-20 04:07:11 bird Exp $
    22 *
    33 * Rexx script which executes a given command in each of the given
     
    1717 * Color config.
    1818 */
    19 if (  (value('BUILD_NOCOLOR',,'OS2ENVIRONMENT') = ''),
    20     & (value('SLKRUNS',,'OS2ENVIRONMENT') = '')) then
     19if ((getenv('BUILD_NOCOLORS') = '') & (getenv('SLKRUNS') = '')) then
    2120do
    2221    sClrMak = '[35;1m'
     
    3029    sClrRst = ''
    3130end
     31
     32
     33/*
     34 * Build Pass
     35 */
     36sPass = getenv('_BUILD_PASS');
     37if (sPass <> '') then
     38    sPass = 'Pass '||sPass||' - '
    3239
    3340
     
    6471        if (directory(sDir) <> '') then
    6572        do
    66             say sClrMak||'[Entering directory:' directory()']'||sClrRst;
     73            say sClrMak||'['||sPass||'Entering  Directory:' directory()||']'||sClrRst;
    6774            sCommand
    6875            if (rc <> 0) then
    6976            do
    70                 say sClrErr||'[Failed rc='rc' directory:' directory()']'||sClrRst;
     77                say sClrErr||'['||sPass||'Failed rc='rc' directory:' directory()||']'||sClrRst;
    7178                exit(rc);
    7279            end
    73             say sClrMak||'[Leaving  directory:' directory()']'||sClrRst;
     80            say sClrMak||'['||sPass||'Leaving   Directory:' directory()||']'||sClrRst;
    7481        end
    7582        else
    7683        do
    77             say sClrErr||'[Failed to change directory to' sDir']'||sClrRst;
     84            say sClrErr||'['||sPass||'Failed to change directory to' sDir||']'||sClrRst;
    7885            exit(267);                  /* ERROR_DIRECTORY */
    7986        end
     
    8996 */
    9097exit(0);
     98
     99
     100/**
     101 * Get environment variable value.
     102 * @returns Environment variable value if set.
     103 *          '' if not set.
     104 * @param   sVar    Variable name.
     105 */
     106getenv: procedure
     107parse arg sVar
     108return value(sVar,,'OS2ENVIRONMENT');
  • trunk/tools/bin/DoMakes.cmd

    r6867 r9032  
    1 /* $Id: DoMakes.cmd,v 1.1 2001-09-30 00:24:35 bird Exp $
     1/* $Id: DoMakes.cmd,v 1.2 2002-08-20 04:07:11 bird Exp $
    22 *
    33 * Rexx script which executes a given command with each of
     
    1616 * Color config.
    1717 */
    18 if (  (value('BUILD_NOCOLOR',,'OS2ENVIRONMENT') = ''),
    19     & (value('SLKRUNS',,'OS2ENVIRONMENT') = '')) then
     18if ((getenv('BUILD_NOCOLORS') = '') & (getenv('SLKRUNS') = '')) then
    2019do
    2120    sClrMak = '[35;1m'
     
    3029end
    3130
     31
     32/*
     33 * Build Pass
     34 */
     35sPass = getenv('_BUILD_PASS');
     36if (sPass <> '') then
     37    sPass = 'Pass '||sPass||' - '
    3238
    3339
     
    5561        if (sMakefile = ' ' | sMakefile = '') then/* If empty directory name iterate. */
    5662            iterate;
    57         say sClrMak||'[Processing Makefile:' sMakefile']'||sClrRst;
     63        say sClrMak||'['||sPass||'Processing Makefile:' sMakefile||']'||sClrRst;
    5864        sCommand '-f' sMakefile
    5965        if (rc <> 0) then
    6066        do
    61             say sClrErr||'[Failed rc='rc' makefile:' sMakefile']'||sClrRst;
     67            say sClrErr||'['||sPass||'Failed rc='rc' makefile:' sMakefile||']'||sClrRst;
    6268            exit(rc);
    6369        end
    64         say sClrMak||'[Successfully Processed Makefile:' sMakefile']'||sClrRst;
     70        say sClrMak||'['||sPass||'Completed  Makefile:' sMakefile||']'||sClrRst;
    6571    end
    6672    else
     
    7379 */
    7480exit(0);
     81
     82
     83/**
     84 * Get environment variable value.
     85 * @returns Environment variable value if set.
     86 *          '' if not set.
     87 * @param   sVar    Variable name.
     88 */
     89getenv: procedure
     90parse arg sVar
     91return value(sVar,,'OS2ENVIRONMENT');
     92
  • trunk/tools/bin/DoWithDirs.cmd

    r6867 r9032  
    1 /* $Id: DoWithDirs.cmd,v 1.12 2001-09-30 00:24:35 bird Exp $
     1/* $Id: DoWithDirs.cmd,v 1.13 2002-08-20 04:07:11 bird Exp $
    22 *
    33 * Syntax: dowithdirs.cmd [-e<list of excludes>] [-c] [-i] [-l] [-r] <cmd with args...>
     
    2424 * Color config.
    2525 */
    26 if (  (value('BUILD_NOCOLOR',,'OS2ENVIRONMENT') = ''),
    27     & (value('SLKRUNS',,'OS2ENVIRONMENT') = '')) then
     26if ((getenv('BUILD_NOCOLORS') = '') & (getenv('SLKRUNS') = '')) then
    2827do
    2928    sClrMak = '[35;1m'
     
    3736    sClrRst = ''
    3837end
     38
     39
     40/*
     41 * Build Pass
     42 */
     43sPass = getenv('_BUILD_PASS');
     44if (sPass <> '') then
     45    sPass = 'Pass '||sPass||' - '
    3946
    4047
     
    169176        do
    170177            /* exectute the command in the directory */
    171             say sClrMak||'[Entering directory:' asDirs.i']'||sClrRst;
     178            say sClrMak||'['||sPass||'Entering Directory: '||asDirs.i']'||sClrRst;
    172179            /* save old dir and enter the new dir. */
    173180            sOldDir = directory();
     
    183190                        /* restore old directory and return sucessfully */
    184191                        call directory sOldDir;
    185                         say '[ !Lock found, stops processing.]';
     192                        say sClrMak||'['||sPass||'!Lock found, stops processing.'||']'||sClrRst;
    186193                        exit(0);
    187194                    end
    188                     say sClrMak||'[ !Skipping ' || asDirs.i || ' - directory was locked.]'||sClrRst;
     195                    say sClrMak||'['||sPass||'!Skipping '||asDirs.i||' - Directory was locked.'||']'||sClrRst;
    189196                    fOK = 0;
    190197                end
     
    207214                    if (\fIgnoreFailure) then
    208215                    do
    209                         say sClrErr||'[ - rc = 'ret' ' || asDirs.i || ']'||sClrErr;
     216                        say sClrErr||'['||sPass||'rc = 'ret' '||asDirs.i||']'||sClrErr;
    210217                        exit(rc);
    211218                    end
    212                     say '[ - rc = 'ret' ' || asDirs.i || ']';
     219                    say sClrMak||'['||sPass||'rc = 'ret' '||asDirs.i||']'||sClrRst;
    213220                end
    214221            end
    215222
    216223            /* restore old directory */
    217             say sClrMak||'[Leaving  directory:' directory()']'||sClrRst;
     224            say sClrMak||'['||sPass||'Leaving  Directory:' directory()||']'||sClrRst;
    218225            call directory sOldDir;
    219226        end
     
    224231            if (rc <> 0) then
    225232            do
    226                 say '[ - rc = ' || rc']';
     233                say sClrErr||'['||sPass||'rc = '||rc||']'||sClrRst;
    227234                if (\fIgnoreFailure) then
    228235                    exit(rc);
     
    270277    return 0;
    271278
     279
     280/**
     281 * Get environment variable value.
     282 * @returns Environment variable value if set.
     283 *          '' if not set.
     284 * @param   sVar    Variable name.
     285 */
     286getenv: procedure
     287parse arg sVar
     288return value(sVar,,'OS2ENVIRONMENT');
     289
Note: See TracChangeset for help on using the changeset viewer.