Changeset 3304


Ignore:
Timestamp:
May 6, 2007, 2:19:22 AM (18 years ago)
Author:
bird
Message:

Use out/.../dist as UNIXROOT.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/env.cmd

    r3292 r3304  
    135135
    136136    /*
    137      * Figure where the UNIXROOT is.
    138      *
    139      * The UNIXROOT is one or our parent directories, it is where all the
    140      * unix/gnu tools are installed. It is also where you will install
    141      * the packages that we compiler. If not specified we will got hunting
    142      * for it...
     137     * Figure where the output directory is.
     138     * (kBuild actually decides this, so kee it in sync.)
     139     */
     140    sPathOut  = sPathRoot'\out\'sBuildTarget'.'sBuildArch'\'sBuildType
     141    sPathOutF = sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sBuildType
     142
     143    /*
     144     * Use out/.../dist as UNIXROOT if not specified or in the env.
    143145     */
    144146    if (sPathUnix = '') then
    145     do
    146         sPathUnix = ToDosSlash(sPathRoot);
    147         do while (1)
    148             say 'sPathUnix='sPathUnix
    149             if (DirExists(sPathUnix'\usr\bin')) then
    150                 leave;
    151 
    152             /* next */
    153             sTmp = filespec('drive', sPathUnix)||strip(filespec('path', sPathUnix), 'T', '\');
    154             if (sTmp = sPathUnix) then
    155             do
    156                 say 'error: cannot find a suitable unix root directory. Use the --unixroot <path> option.'
    157                 exit(12)
    158             end
    159             if (length(sTmp) == 2) then
    160                 sTmp = sTmp||'\';
    161             sPathUnix = sTmp;
    162         end
    163         say 'info: detected unix root at '''sPathUnix'''.';
    164     end
     147        sPathUnix = sPathOut'\dist';
     148    say 'info: unix root at '''sPathUnix'''.';
    165149    sPathUnix = ToDosSlash(FixPath(sPathUnix));
    166150    sPathUnixF = ToUnixSlash(sPathUnix);
    167151    sPathUnixFD= ToUnixSlash(filespec('path', sPathUnix)||filespec('name', sPathUnix));
    168     if (ToLower(sPathUnixF) <> substr(ToLower(sPathRootF), 1, length(sPathUnixF))) then
    169         say 'warning: the source tree is not under the unix root.';
    170 
    171     /*
    172      * Figure where the output directory is.
    173      * (kBuild actually decides this, so kee it in sync.)
    174      */
    175     sPathOut  = sPathRoot'\out\'sBuildTarget'.'sBuildArch'\'sBuildType
    176     sPathOutF = sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sBuildType
    177152
    178153    /*
Note: See TracChangeset for help on using the changeset viewer.