Ignore:
Timestamp:
Aug 15, 2013, 10:33:17 AM (12 years ago)
Author:
Herwig Bauernfeind
Message:

build.cmd 0.3.13

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.5.x/source3/build.cmd

    r778 r787  
    1717/* version 0.3.8 from 09.11.2012 Silvan (eliminated the 2nd brand function) */
    1818/* version 0.3.9 from 12.11.2012 Silvan (never use ksh, now using sh) */
    19 /* version 0.3.10 from 12.11.2012 Herwig (make libc switching really optional) */
    20 /* version 0.3.11 from 15.11.2012 Silvan (python also in unixroot) */
     19/* version 0.3.10 from 15.11.2012 Silvan (python also in unixroot) */
     20/* version 0.3.11 from 15.11.2012 Herwig (make libc switching really optional) */
    2121/* version 0.3.12 from 30.11.2012 Silvan (maintained by) */
     22/* version 0.3.13 from 15.08.2013 Herwig (create build_anomalies.log, codepages
     23                                          to ZIP, libc065 switching) */
    2224                                         
    2325/* load the sysfuncs if not already loaded */
     
    2931
    3032/* init the version string (don't forget to change) */
    31 version = "0.3.12"
    32 version_date = "30.11.2012"
    33 
    34 /* number of make jobs to execute at the same time */
    35 jobs = "2"
     33version = "0.3.13"
     34version_date = "15.08.2013"
    3635
    3736'@echo off'
     
    5554    say "      ALL   - do just everything"
    5655    say "Deprecated options:"
    57     say "      064   - link against libc064.dll (default)"
     56    say "      065   - link against libc065.dll (default)"
     57    say "      064   - link against libc064.dll"
    5858    say "      064x  - link against libc064x.dll"
    5959    say "      063   - link against libc063.dll"
     
    6767end
    6868
    69 options = 'build.options'
     69logFile   = 'build.log'
     70options   = 'build.options'
    7071cacheFile = 'build.cache'
    7172
    7273/* defaults */
    7374make  = ""
     75jobs  = "2"  /* number of make jobs to execute at the same time */
    7476brand = "No"
    7577conf  = ""
     
    9092build_parms = ""
    9193
    92 /* optional libc switching capability */
     94/* delete the following 8 lines to remove libc switching capability */
    9395select
    94     when pos("064", cmdline) > 0 then  libc = "064"
    95     when pos("064X", cmdline) > 0 then libc = "064X"
    96     when pos("063", cmdline) > 0 then  libc = "063"
     96    when pos("065", cmdline) > 0 then libc = "065"
     97    when pos("064", cmdline) > 0 then libc = "064"
     98    when pos("064X",cmdline) > 0 then libc = "064X"
     99    when pos("063", cmdline) > 0 then libc = "063"
    97100    otherwise libc = ""
    98101end
     
    156159    end
    157160    else do
    158     sEnvVar = EnvGet('UNIXROOT');
    159     if sEnvVar <> '' then do
    160         sEnvVar = sEnvVar || '/usr'
    161         sPythonVersion = PythonVersion(sEnvVar|| '/lib');
    162         if sPythonVersion <> '-1' then do
    163             call lineout cacheFile, "ac_cv_path_PYTHON_CONFIG='" || sEnvVar || "/lib/" || sPythonVersion || "'";
    164             call lineout cacheFile, "ac_cv_path_PYTHON='" || sEnvVar || "/include'";
    165         end
    166     end
    167     end
    168 
     161        sEnvVar = EnvGet('UNIXROOT');
     162        if sEnvVar <> '' then do
     163            sEnvVar = sEnvVar || '/usr'
     164            sPythonVersion = PythonVersion(sEnvVar|| '/lib');
     165            if sPythonVersion <> '-1' then do
     166                call lineout cacheFile, "ac_cv_path_PYTHON_CONFIG='" || sEnvVar || "/lib/" || sPythonVersion || "'";
     167                call lineout cacheFile, "ac_cv_path_PYTHON='" || sEnvVar || "/include'";
     168            end
     169        end
     170    end
    169171    ok = stream(cacheFile, 'c', 'close');
    170172
     
    179181
    180182if make <> "" then do
    181     address cmd 'make -j 'jobs' 2>&1 | tee build.log'
     183    address cmd 'make -j 'jobs' 2>&1 | tee 'logFile
    182184end
    183185
     
    190192    'move ..\*.exe >NUL'
    191193    'move ..\*.dll >NUL'
     194    'md .\codepage'
     195    'copy ..\..\..\codepages\*.dat .\codepage\*'
    192196    'cd ..'
    193     'zip -rpo9 samba-'translate(verstring,'-',' ')'.zip .\samba\*.exe .\samba\*.dll'
     197    'zip -rpo9 samba-'translate(verstring,'-',' ')'.zip .\samba\*.exe .\samba\*.dll .\samba\codepage\*.dat'
    194198    'cd .\samba'
    195199    'move * .. >NUL'
     200    'del .\codepage\*.dat'
     201    'rd .\codepage'
    196202    'cd ..'
    197203    'rd .\samba'
     204    'cd ..'
    198205    say 'Created ZIP package'
    199206end
     207
     208/* Recreate build_anomalies.log */
     209ok = SysFileDelete("build_anomalies.log")
     210do until lines(logFile) = 0
     211    buildlogline = linein(logFile)
     212    select
     213        when left(buildlogline,11) = "Generating " then iterate
     214        when left(buildlogline,10) = "Compiling " then iterate
     215        when left(buildlogline,9)  = "Building " then iterate
     216        when left(buildlogline,8)  = "Linking " then iterate
     217        when left(buildlogline,6)  = "Using " then iterate
     218        when left(buildlogline,6)  = "      " then iterate
     219        otherwise call lineout "build_anomalies.log", buildlogline
     220    end
     221end
     222
    200223/* Default exit point */
    201224reqtime = format(time('E'),,0)
     
    203226reqsec = reqtime//60
    204227say "All done, took "format(reqmin,,0)' min 'format(reqsec,,0)" sec."
     228call lineout logFile, "All done, took "format(reqmin,,0)' min 'format(reqsec,,0)" sec."
    205229exit 0
    206230
     
    235259        if left(eCSVer.I,14) = "MAINTAINED_BY=" then do
    236260            parse var eCSver.I . '='maintainedBy
    237             maintainedBy = '"Maintained by: ' || strip(maintainedBy,,'"') || '"'
     261            maintainedBy = 'Maintained by:    "' || strip(maintainedBy,,'"') || '"'
    238262        end
    239263    end
     
    273297    ok = SysFileDelete(NewVersion)
    274298    verstring = suffix'-'Major'.'minor'.'release'.'revision'-'vendor'-'date('S')
    275     say "Samba branded as: "verstring
     299    say 'Samba branded as: "'verstring'"'
    276300    say maintainedBy
    277301    say
Note: See TracChangeset for help on using the changeset viewer.