Changeset 122


Ignore:
Timestamp:
Jan 1, 2002, 8:39:04 PM (24 years ago)
Author:
dmik
Message:

env.cmd: Added a bunch of flags that alter the environment configuration for the various purposes of debugging (enhanced logging, debug LIBC DLLs and so on).

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalEnv.tpl.cmd

    r79 r122  
    5555G.LOG_FILE              = 'se.log' /* ScriptDir'se.log' */
    5656
     57/*
     58 * Advanced definitions
     59 * ----------------------------------------------------------------------------
     60 *
     61 * Used mostly for developing and debugging.
     62 */
     63
    5764/**
    58  * Generate include file dependencies for C/C++ sources.
     65 * Path to the debug version of kLIBC DLL (used with -l flag). Optional.
    5966 */
    60 call EnvSet 'INCREMENTAL_BUILD', 'true'
     67G.PATH_TOOL_KLIBC_DEBUG     = ''
     68
     69/**
     70 * Path to the log check version of kLIBC DLL (used with -L flag). Optional.
     71 */
     72G.PATH_TOOL_KLIBC_LOGCHK    = ''
    6173
    6274/**
  • trunk/env.cmd

    r80 r122  
    11/*
    22 * Script to set up the build environment for OpenJDK
     3 *
     4 * Best used with the SE script (see README for details).
    35 *
    46 * NOTE:
     
    2325UnderSE = EnvGet('SE_CMD_RUNNING') \== ''
    2426
    25 if (\UnderSE & EnvGet('OPENJDK_ENV_CMD_DONE') == 1) then do
    26     say
    27     say 'OpenJDK build environment is already set up.'
    28     exit 0
    29 end
     27if (\UnderSE) then do
     28    if (EnvGet('OPENJDK_ENV_CMD_DONE') == 1) then do
     29        say
     30        say 'OpenJDK build environment is already set up.'
     31        exit 0
     32    end
     33end
     34else do
     35    aArgs = EnvGet('SE_CMD_ARGS')
     36end
     37
     38/*
     39 * get flags
     40 */
     41aFlags = ''
     42if (left(aArgs, 1) == '-') then do
     43    parse var aArgs '-'aFlags aArgs
     44end
     45
     46if (verify(aFlags, 'Hh?', 'M')) then do
     47    say 'Flags for 'ScriptFile':'
     48    say ' -r    Start commands in release environment'
     49    say ' -l    Use debug version of LIBC DLL'
     50    say ' -L    Use log check version of LIBC DLL'
     51    say ' -j    Enable java launcher debug output'
     52    say ' -o    Enable Odin extended logging'
     53
     54    if (UnderSE) then call EnvSet 'SE_CMD_ARGS', 'exit'
     55    exit
     56end
     57
     58fRelease        = pos('r', aFlags) \= 0
     59fLibcDebug      = pos('l', aFlags) \= 0
     60fLibcLogChk     = pos('L', aFlags) \= 0
     61fJavaDebug      = pos('j', aFlags) \= 0
     62fOdinLog        = pos('o', aFlags) \= 0
     63
     64/* running make? */
     65fMake = word(aArgs, 1) == 'make'
    3066
    3167/*
     
    5288    cmdline
    5389    drop cmdline
     90end
     91
     92if (\fMake) then do
     93    if (G.PATH_TOOL_KLIBC_DEBUG \== '' && \fLibcDebug) then do
     94        address 'cmd' 'set LIBPATHSTRICT=T'
     95        call EnvAddFront 'BEGINLIBPATH', G.PATH_TOOL_KLIBC_DEBUG
     96        call EnvSet 'LIBC_STRICT_DISABLED', '1'
     97    end
     98    else
     99    if (G.PATH_TOOL_KLIBC_LOGCHK \== '' && \fLibcLogChk) then do
     100        address 'cmd' 'set LIBPATHSTRICT=T'
     101        call EnvAddFront 'BEGINLIBPATH', G.PATH_TOOL_KLIBC_LOGCHK
     102        call EnvSet 'LIBC_STRICT_DISABLED', '1'
     103    end
    54104end
    55105
     
    90140call EnvSetIfEmpty 'ALT_JDK_IMPORT_PATH', UnixSlashes(G.PATH_JDK_IMPORT)
    91141
     142/**
     143 * generate include file dependencies for C/C++ sources.
     144 */
     145call EnvSetIfEmpty 'INCREMENTAL_BUILD', 'true'
     146
     147if (fJavaDebug && \fMake) then call EnvSet '_JAVA_LAUNCHER_DEBUG', '1'
     148
    92149/*
    93150 * @todo temporarily disable some components
     
    97154call EnvSet 'BUILD_JAXWS', 'false'
    98155
     156/*
     157 * set up Odin32 runtime
     158 */
     159if (fRelease) then do
     160    call EnvAddFront 'PATH', G.PATH_LIB_ODIN32'\bin\Release;'G.PATH_LIB_ODIN32'\bin'
     161    call EnvAddFront 'BEGINLIBPATH', G.PATH_LIB_ODIN32'\bin\Release;'G.PATH_LIB_ODIN32'\bin'
     162end
     163else do
     164    call EnvAddFront 'PATH', G.PATH_LIB_ODIN32'\bin\Debug;'G.PATH_LIB_ODIN32'\bin'
     165    call EnvAddFront 'BEGINLIBPATH', G.PATH_LIB_ODIN32'\bin\Debug;'G.PATH_LIB_ODIN32'\bin'
     166end
     167
     168if (fOdinLog) then call EnvSet 'WIN32LOG_ENABLED', '1'
     169else call EnvSet 'WIN32LOG_ENABLED', ''
     170
     171/*
     172 * finally, start the command
     173 */
    99174if (\UnderSE) then do
    100175    /* final mark */
     
    123198else do
    124199    if (G.LOG_FILE \== '') then do
    125         /* instruct to copy all output to the log file */
    126         args = EnvGet('SE_CMD_ARGS')' 2>&1 | tee' G.LOG_FILE
    127         call EnvSet 'SE_CMD_ARGS', args
    128     end
     200        /* copy all output to the log file */
     201        aArgs = aArgs '2>&1 | tee' G.LOG_FILE
     202    end
     203    call EnvSet 'SE_CMD_ARGS', aArgs
    129204end
    130205
Note: See TracChangeset for help on using the changeset viewer.