Changeset 788


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

build.cmd 0.3.13

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/build.cmd

    r757 r788  
    2020/* 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 /* delete the following 7 lines to remove libc switching capability */
     94/* delete the following 8 lines to remove libc switching capability */
    9395select
     96    when pos("065", cmdline) > 0 then libc = "065"
    9497    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"
     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
     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
    167170    end
    168171    ok = stream(cacheFile, 'c', 'close');
     
    178181
    179182if make <> "" then do
    180     address cmd 'make -j 'jobs' 2>&1 | tee build.log'
     183    address cmd 'make -j 'jobs' 2>&1 | tee 'logFile
    181184end
    182185
     
    189192    'move ..\*.exe >NUL'
    190193    'move ..\*.dll >NUL'
     194    'md .\codepage'
     195    'copy ..\..\..\codepages\*.dat .\codepage\*'
    191196    'cd ..'
    192     'zip -rpo9 samba-'translate(verstring,'-',' ')'.zip .\samba\*.exe .\samba\*.dll'
     197    'zip -rpo9 samba-'translate(verstring,'-',' ')'.zip .\samba\*.exe .\samba\*.dll .\samba\codepage\*.dat'
    193198    'cd .\samba'
    194199    'move * .. >NUL'
     200    'del .\codepage\*.dat'
     201    'rd .\codepage'
    195202    'cd ..'
    196203    'rd .\samba'
     204    'cd ..'
    197205    say 'Created ZIP package'
    198206end
     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
    199223/* Default exit point */
    200224reqtime = format(time('E'),,0)
     
    202226reqsec = reqtime//60
    203227say "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."
    204229exit 0
    205230
     
    234259        if left(eCSVer.I,14) = "MAINTAINED_BY=" then do
    235260            parse var eCSver.I . '='maintainedBy
    236             maintainedBy = '"Maintained by: ' || strip(maintainedBy,,'"') || '"'
     261            maintainedBy = 'Maintained by:    "' || strip(maintainedBy,,'"') || '"'
    237262        end
    238263    end
     
    272297    ok = SysFileDelete(NewVersion)
    273298    verstring = suffix'-'Major'.'minor'.'release'.'revision'-'vendor'-'date('S')
    274     say "Samba branded as: "verstring
     299    say 'Samba branded as: "'verstring'"'
    275300    say maintainedBy
    276301    say
Note: See TracChangeset for help on using the changeset viewer.