Changeset 898


Ignore:
Timestamp:
Mar 29, 2016, 3:02:47 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: get rid of configure, adjust build.cmd heavily, rename version files

Location:
trunk/server
Files:
2 deleted
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/server/examples/VFS

    • Property svn:ignore set to
      configure
  • trunk/server/lib/replace/getpass.m4

    r414 r898  
    1616],[],libreplace_cv_REPLACE_GETPASS=yes,libreplace_cv_REPLACE_GETPASS=no)
    1717CPPFLAGS="$SAVE_CPPFLAGS"
     18
     19# on OS/2 libc getpass is ok, no need to replace
     20case "$host_os" in
     21        *os2*)
     22        libreplace_cv_REPLACE_GETPASS=no
     23        ;;
     24esac
    1825])
     26
    1927if test x"$libreplace_cv_REPLACE_GETPASS" = x"yes"; then
    2028        AC_DEFINE(REPLACE_GETPASS,1,[Whether getpass should be replaced])
  • trunk/server/lib/replace/libreplace_cc.m4

    r745 r898  
    5656case "$host_os" in
    5757        *irix6*) AC_ADD_INCLUDE(<standards.h>)
     58                ;;
     59        *os2*)
     60                # mmap on OS/2 is not complete, so disable is...
     61                AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken])
    5862                ;;
    5963        *hpux*)
  • trunk/server/source3

    • Property svn:ignore set to
      configure
  • trunk/server/source3/build.cmd

    r876 r898  
    1 /* Samba build script for eCS (OS/2) */
    2 
    3 /* version history */
    4 /* version 0.1.0 from 09.04.2010 Herwig (first edition) */
    5 /* version 0.2.2 from 08.09.2009 Herwig (a lot enhancements) */
    6 /* version 0.3.0 from 17.08.2010 Silvan (redone a lot) */
    7 /* version 0.3.1 from 20.08.2010 Silvan (added version.ecs check) */
    8 /* version 0.3.2 from 08.07.2011 Silvan (pythonhome may be not set) */
    9 /* version 0.3.3 from 05.11.2011 Herwig (add support for libc064) */
    10 /* version 0.3.4 from 23.11.2011 Herwig (simplify libc switching) */
    11 /* version 0.3.5 from 23.11.2011 Herwig (brand before configure, in case
    12                                          version.h is missing) */
    13 /* version 0.3.6 from 06.04.2012 Herwig (support parallel jobs, show build
    14                                          time upon completion) */
    15 /* version 0.3.7 from 23.04.2012 Silvan (compile and link flags need to be
    16                                          set here [happy birthday Jason]) */
    17 /* version 0.3.8 from 09.11.2012 Silvan (eliminated the 2nd brand function) */
    18 /* version 0.3.9 from 12.11.2012 Silvan (never use ksh, now using sh) */
    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) */
    21 /* 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) */
    24 /* version 1.0.0 from 06.11.2013 Silvan (conf has to create version.h also,
    25                                          don't check for env anymore, use sh only) */
    26 /* version 1.0.1 from 13.01.2014 Silvan (always brand when svn rev changes) */
    27 /* version 1.0.2 from 18.02.2014 Silvan (create xqs files for exceptq) */
    28 /* version 1.0.3 from 13.05.2014 Silvan (adjust python include) */
    29 /* version 1.0.4 from 11.06.2014 Silvan (remove the need of a config.site file) */
    30 /* version 1.0.5 from 13.03.2015 Silvan (ticket #249 thx Andy Willis) */
     1/* Samba build script for OS/2 and OS/2-based systems
     2 *                       
     3 * version history
     4 * version 0.1.0 from 09.04.2010 Herwig
     5 *   - first edition
     6 *
     7 * version 0.2.2 from 08.09.2009 Herwig
     8 *   - a lot enhancements
     9 *
     10 * version 0.3.0 from 17.08.2010 Silvan
     11 *   - reodne a lot
     12 *
     13 * version 0.3.1 from 20.08.2010 Silvan
     14 *   - added version.ecs check
     15 *
     16 * version 0.3.2 from 08.07.2011 Silvan
     17 *   - pythonhome may be not set
     18 *
     19 * version 0.3.3 from 05.11.2011 Herwig
     20 *   - add support for libc064
     21 *
     22 * version 0.3.4 from 23.11.2011 Herwig
     23 *   - simplify libc switching
     24 *
     25 * version 0.3.5 from 23.11.2011 Herwig
     26 *   - brand before configure, in case version.h is missing
     27 *
     28 * version 0.3.6 from 06.04.2012 Herwig
     29 *   - support parallel jobs
     30 *   - show build time upon completion
     31 *
     32 * version 0.3.7 from 23.04.2012 Silvan
     33 *   - compile and link flags need to be set here [happy birthday Jason]
     34 *
     35 * version 0.3.8 from 09.11.2012 Silvan
     36 *   - eliminated the 2nd brand function
     37 *
     38 * version 0.3.9 from 12.11.2012 Silvan
     39 *   - never use ksh, now using sh
     40 *
     41 * version 0.3.10 from 15.11.2012 Silvan
     42 *   - python also in unixroot
     43 *
     44 * version 0.3.11 from 15.11.2012 Herwig
     45 *   - make libc switching really optional
     46 *
     47 * version 0.3.12 from 30.11.2012 Silvan
     48 *   - added maintained by
     49 *
     50 * version 0.3.13 from 15.08.2013 Herwig
     51 *   - create build_anomalies.log
     52 *   - codepages to ZIP
     53 *   - libc065 switching
     54 *
     55 * version 1.0.0 from 06.11.2013 Silvan
     56 *   - conf has to create version.h also
     57 *   - don't check for env anymore, use sh only
     58 *
     59 * version 1.0.1 from 13.01.2014 Silvan
     60 *   - always brand when svn rev changes
     61 *
     62 * version 1.0.2 from 18.02.2014 Silvan
     63 *   - create xqs files for exceptq
     64 *
     65 * version 1.0.3 from 13.05.2014 Silvan
     66 *   - adjust python include
     67 *
     68 * version 1.0.4 from 11.06.2014 Silvan
     69 *   - remove the need of a config.site file
     70 *
     71 * version 1.0.5 from 13.03.2015 Silvan
     72 *   - ticket #249 thx Andy Willis
     73 *
     74 * version 1.1.0 from 24.03.2016 Silvan
     75 *   - remove libc switching
     76 *   - generate configure via autogen.sh
     77 *   - cups env is not needed anymore, as available as rpm
     78 *   - python env removed, as available as rpm
     79 *   - added lxlite and emxomfstripe
     80 *   - rename some variables eCS vs OS/2
     81*/
     82
    3183                                         
    3284/* load the sysfuncs if not already loaded */
     
    3789
    3890/* init the version string (don't forget to change) */
    39 version      = "1.0.5"
    40 version_date = "13.03.2015"
     91version      = "1.1.0"
     92version_date = "24.03.2016"
    4193
    4294'@echo off'
     
    4496ok = time('R')
    4597
    46 say "Samba for eCS (OS/2) build script v"   || version || " from " || version_date
     98say "Samba for OS/2 and OS/2-based systems build script v"   || version || " from " || version_date
    4799
    48100/* No parameter or HELP -> display usage */
     
    59111    say "      ZIP   - create ZIP archive"
    60112    say "      ALL   - do just everything"
    61     say "Deprecated options:"
    62     say "      065   - link against libc065.dll (default)"
    63     say "      064   - link against libc064.dll"
    64     say "      064x  - link against libc064x.dll"
    65     say "      063   - link against libc063.dll"
    66113    say
    67114    exit 255
     
    73120brand = "No"
    74121conf  = ""
    75 verstring = 'x.x.x-3.x.x.xxx-eCS-'date('S')  /* for packaging if branding is disabled */
     122verstring = 'x.x.x-3.x.x.xxx-OS2-'date('S')  /* for packaging if branding is disabled */
     123newVersion = "VERSION.OUT"
    76124
    77125logFile   = 'build.log'
     
    93141build_parms = ""
    94142
    95 /* delete the following 8 lines to remove libc switching capability */
    96 select
    97     when pos("065", cmdline) > 0 then libc = "065"
    98     when pos("064", cmdline) > 0 then libc = "064"
    99     when pos("064X",cmdline) > 0 then libc = "064X"
    100     when pos("063", cmdline) > 0 then libc = "063"
    101     otherwise libc = ""
    102 end
    103 if libc <> "" then address cmd "call "libc".cmd"
    104 
    105143if pos("MAKE", cmdline) > 0 then do
    106144    make = "MAKE"
     
    140178    ok = SysFileDelete(scriptFile);
    141179
     180/* recreate configure first */
     181    call lineout scriptfile, "autogen.sh --version-file " || newVersion;
     182
    142183/* set the compile, link and pathflags flags */
    143184    call SetCLFlags
    144 
    145 /* is cups env set */
    146     sEnvVar = EnvGet('CUPS');
    147     if sEnvVar <> '' then do
    148         call lineout scriptfile, "ac_cv_path_CUPS_CONFIG='" || sEnvVar || "'";
    149         call lineout scriptfile, "export ac_cv_path_CUPS_CONFIG";
    150     end
    151 
    152 /* our libc provides a correct getpass(), so no need to replace */
    153     call lineout scriptfile, "libreplace_cv_REPLACE_GETPASS='no'";
    154     call lineout scriptfile, "export libreplace_cv_REPLACE_GETPASS";
    155 
    156 /* is python env set */
    157     sEnvVar = EnvGet('PYTHONHOME');
    158     if sEnvVar <> '' then do
    159         sPythonVersion = PythonVersion(sEnvVar);
    160         if sPythonVersion <> '-1' then do
    161             call lineout scriptfile, "ac_cv_path_PYTHON_CONFIG='" || sEnvVar || "/config/" || sPythonVersion || "'";
    162             call lineout scriptfile, "export ac_cv_path_PYTHON_CONFIG";
    163             call lineout scriptfile, "ac_cv_path_PYTHON='" || sEnvVar "'";
    164             call lineout scriptfile, "export ac_cv_path_PYTHON";
    165         end
    166     end
    167     else do
    168         sEnvVar = EnvGet('UNIXROOT');
    169         if sEnvVar <> '' then do
    170             sEnvVar = sEnvVar || '/usr'
    171             sPythonVersion = PythonVersion(sEnvVar|| '/lib');
    172             if sPythonVersion <> '-1' then do
    173                 call lineout scriptfile, "ac_cv_path_PYTHON_CONFIG='" || sPythonVersion || "_dll" || "'";
    174                 call lineout scriptfile, "export ac_cv_path_PYTHON_CONFIG";
    175                 call lineout scriptfile, "ac_cv_path_PYTHON='" || sEnvVar || "/include/" || sPythonVersion || "'";
    176                 call lineout scriptfile, "export ac_cv_path_PYTHON";
    177             end
    178         end
    179     end
    180185
    181186/* run configure */
     
    250255exit 0
    251256
    252 brand: procedure expose verstring
     257brand: procedure expose verstring newVersion
    253258    parse arg revision
    254259
    255     /* eComStation Version file */
    256     VerFile = "VERSION.ECS"
     260    /* OS/2 and OS/2-based systems version file */
     261    VerFile = "VERSION.OS2"
    257262    maintainedBy = "unknown"
    258263
     
    260265    ok = stream(VerFile, 'c', 'QUERY EXISTS')
    261266    if ok = "" then do
    262         say "Please create a " || VerFile || " based on VERSION.EC_"
     267        say "Please create a " || VerFile || " based on VERSION.OS2_"
    263268        exit 0
    264269    end
     
    266271    /* Samba Version file */
    267272    Version = "VERSION"
    268     NewVersion = "VERSION.TMP"
    269 
    270     eCSVer.0 = 0
     273    ok = SysFileDelete(newVersion)
     274
     275    OS2Ver.0 = 0
    271276    I = 0
    272277    do until lines(VerFile) = 0
    273278        I = I + 1
    274         eCSVer.I = linein(VerFile)
    275         if left(eCSVer.I,28) = "SAMBA_VERSION_VENDOR_SUFFIX=" then do
    276             parse var eCSver.I . '='vendor_suffix
     279        OS2Ver.I = linein(VerFile)
     280        if left(OS2Ver.I,28) = "SAMBA_VERSION_VENDOR_SUFFIX=" then do
     281            parse var OS2Ver.I . '='vendor_suffix
    277282            vendor_suffix = strip(vendor_suffix,,'"')
    278283            parse var vendor_suffix vendor suffix
    279284        end
    280         if left(eCSVer.I,14) = "MAINTAINED_BY=" then do
    281             parse var eCSver.I . '='maintainedBy
     285        if left(OS2Ver.I,14) = "MAINTAINED_BY=" then do
     286            parse var OS2Ver.I . '='maintainedBy
    282287            maintainedBy = '"Maintained by: ' || strip(maintainedBy,,'"') || '"'
    283288        end
     
    286291    if Revision <> "" then do
    287292        I = I + 1
    288         eCSVer.I = "SAMBA_VERSION_VENDOR_PATCH="revision
    289     end
    290     eCSVer.0 = I
     293        OS2Ver.I = "SAMBA_VERSION_VENDOR_PATCH="revision
     294    end
     295    OS2Ver.0 = I
    291296
    292297    do until lines(VERSION) = 0
     
    302307        end
    303308       
    304         do I = 1 to eCSVer.0
    305             parse var eCSVer.I tag'='strvalue
     309        do I = 1 to OS2Ver.0
     310            parse var OS2Ver.I tag'='strvalue
    306311            parse var verline stag'=' .
    307312            if stag = tag then do
     
    309314            end
    310315        end
    311         if Verline <> "=" then call lineout NewVersion, verline
    312     end
    313     if maintainedBy <> "" then call lineout NewVersion, "MAINTAINED_BY="maintainedBy
     316        if Verline <> "=" then call lineout newVersion, verline
     317    end
     318    if maintainedBy <> "" then call lineout newVersion, "MAINTAINED_BY="maintainedBy
    314319
    315320    ok = stream(Version,'c','close')
    316     ok = stream(NewVersion,'c','close')
    317     address cmd "sh ./script/mkversion.sh "NewVersion" >NUL"
    318     ok = SysFileDelete(NewVersion)
     321    ok = stream(newVersion,'c','close')
     322    address cmd "sh ./script/mkversion.sh "newVersion" >NUL"
    319323    verstring = suffix'-'Major'.'minor'.'release'.'revision'-'vendor'-'date('S')
    320324    say 'Samba branded as: '
     
    322326    say maintainedBy
    323327    say
    324 return
    325 
    326 
    327 /**
    328  * Gets the value of sEnvVar.
    329  */
    330 EnvGet: procedure
    331     parse arg sEnvVar
    332     if ((translate(sEnvVar) = 'BEGINLIBPATH') | (translate(sEnvVar) = 'ENDLIBPATH')) then
    333         return SysQueryExtLibPath(substr(sEnvVar, 1, 1));
    334 return value(sEnvVar,, 'OS2ENVIRONMENT');
    335 
    336 /**
    337  * try to find the pythonversion
    338  */
    339 PythonVersion: procedure
    340     parse arg pdir
    341 
    342     ok = SysFileTree(pdir||"\python*.dll",pydll.,"FO")
    343     rc = -1
    344     if pydll.0 = 1 then do
    345         dllpur = filespec("N",pydll.1)
    346         parse var dllpur 'python' ver '.dll'
    347         if datatype(ver) <> "NUM" then do
    348             say "no valid python dll found!"
    349         end
    350         else do
    351             major = left(ver,1)
    352             minor = substr(ver,2,)
    353             verstring = "python"||major||"."||minor
    354             rc = verstring
    355         end
    356     end
    357     else do
    358         say "no dll found!"
    359     end
    360 return rc
     328    return
     329
    361330
    362331/**
     
    365334SetCLFlags: procedure expose scriptfile
    366335
    367     call lineout scriptfile, "CFLAGS='-D__EMX__ -DOS2 -D__OS2__ -D__ST_MT_ERRNO__ -O2 -march=pentium -mtune=pentium4'";
     336    call lineout scriptfile, "CFLAGS='-O2 -g -march=pentium'";
    368337    call lineout scriptfile, "export CFLAGS";
    369     call lineout scriptfile, "CXXFLAGS='-D__EMX__ -DOS2 -D__OS2__ -D__ST_MT_ERRNO__ -O2 -march=pentium -mtune=pentium4'";
     338    call lineout scriptfile, "CXXFLAGS='-O2 -g -march=pentium'";
    370339    call lineout scriptfile, "export CXXFLAGS";
    371     call lineout scriptfile, "LDFLAGS='-Zmap -Zargs-wild -Zbin-files -Zhigh-mem -D__ST_MT_ERRNO__ -s'";
     340    call lineout scriptfile, "LDFLAGS=' -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp -Zbin-files'";
    372341    call lineout scriptfile, "export LDFLAGS";
    373     call lineout scriptfile, "PATH='" || translate(EnvGet('PATH'), '/', '\') || "'";
    374     call lineout scriptfile, "export PATH";
    375     call lineout scriptfile, "PATH_SEPARATOR=';'";
    376     call lineout scriptfile, "export PATH_SEPARATOR";
    377     call lineout scriptfile, "ac_executable_extensions='.exe'";
    378     call lineout scriptfile, "export ac_executable_extensions";
    379342    return
    380343
     
    419382
    420383    if what = 'CRT' then do
    421        say "Create xqs files for all map files in " || binDir
    422        ending = '*.map'
     384       say "Create dbg files for all exe files in " || binDir
     385       ending = '*.exe'
    423386    end
    424387
     
    430393       end
    431394       if what = 'CRT' then do
    432           address cmd "mapxqs -o " || substr(files.i, 1, length(files.i)-3) || "xqs " || files.i
     395          address cmd "emxomfstripe -D " || substr(files.i, 1, length(files.i)-3) || "dbg " || files.i
     396          address cmd "lxlite /ml1 /mf2 /ydd /yxd /b- " || files.i
    433397       end
    434398
  • trunk/server/source3/configure.in

    r862 r898  
    26572657fi
    26582658
    2659 ICONV_LOOK_DIRS="/usr /usr/local /sw /opt"
     2659ICONV_LOOK_DIRS="/@unixroot/usr /usr /usr/local /sw /opt"
    26602660AC_ARG_WITH(libiconv,
    26612661[AS_HELP_STRING([--with-libiconv=BASEDIR], [Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto)])],
  • trunk/server/source3/version.os2_

    r876 r898  
    1 SAMBA_VERSION_VENDOR_SUFFIX="eCS 1.3.0"
     1SAMBA_VERSION_VENDOR_SUFFIX="OS/2 and OS/2-based systems v1.3.0"
    22MAINTAINED_BY="unknown"
Note: See TracChangeset for help on using the changeset viewer.