Changeset 867


Ignore:
Timestamp:
Jun 11, 2014, 7:04:17 PM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.6: eliminate the need of a config.site file

File:
1 edited

Legend:

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

    r862 r867  
    2727/* version 1.0.2 from 18.02.2014 Silvan (create xqs files for exceptq) */
    2828/* 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 */
    2930                                         
    3031/* load the sysfuncs if not already loaded */
     
    3536
    3637/* init the version string (don't forget to change) */
    37 version      = "1.0.3"
    38 version_date = "13.05.2014"
     38version      = "1.0.4"
     39version_date = "11.06.2014"
    3940
    4041'@echo off'
     
    6667end
    6768
    68 logFile   = 'build.log'
    69 options   = 'build.options'
    70 cacheFile = 'build.cache'
    71 
    7269/* defaults */
    7370make  = ""
     
    7673conf  = ""
    7774verstring = 'x.x.x-3.x.x.xxx-eCS-'date('S')  /* for packaging if branding is disabled */
     75
     76logFile   = 'build.log'
     77options   = 'build.options'
     78scriptfile = 'build_script'
    7879
    7980/* Read profile */
     
    135136    address cmd 'SETLOCAL'
    136137
    137 /* we need to delete the cache file and redo it afterwards */
    138     ok = SysFileDelete(cacheFile);
    139 
    140 /* add the compile and link flags to the cache file */
     138/* we need to recreate the script file, so delete it first */
     139    ok = SysFileDelete(scriptFile);
     140
     141/* set the compile, link and pathflags flags */
    141142    call SetCLFlags
    142143
     
    144145    sEnvVar = EnvGet('CUPS');
    145146    if sEnvVar <> '' then do
    146         call lineout cacheFile, "ac_cv_path_CUPS_CONFIG='" || sEnvVar || "'";
     147        call lineout scriptfile, "ac_cv_path_CUPS_CONFIG='" || sEnvVar || "'";
     148        call lineout scriptfile, "export ac_cv_path_CUPS_CONFIG";
    147149    end
    148150
    149151/* our libc provides a correct getpass(), so no need to replace */
    150     call lineout cacheFile, "libreplace_cv_REPLACE_GETPASS=no";
     152    call lineout scriptfile, "libreplace_cv_REPLACE_GETPASS='no'";
     153    call lineout scriptfile, "export libreplace_cv_REPLACE_GETPASS";
    151154
    152155/* is python env set */
     
    155158        sPythonVersion = PythonVersion(sEnvVar);
    156159        if sPythonVersion <> '-1' then do
    157             call lineout cacheFile, "ac_cv_path_PYTHON_CONFIG='" || sEnvVar || "/config/" || sPythonVersion || "'";
    158             call lineout cacheFile, "ac_cv_path_PYTHON='" || sEnvVar || "'";
     160            call lineout scriptfile, "ac_cv_path_PYTHON_CONFIG='" || sEnvVar || "/config/" || sPythonVersion || "'";
     161            call lineout scriptfile, "export ac_cv_path_PYTHON_CONFIG";
     162            call lineout scriptfile, "ac_cv_path_PYTHON='" || sEnvVar "'";
     163            call lineout scriptfile, "export ac_cv_path_PYTHON";
    159164        end
    160165    end
     
    165170            sPythonVersion = PythonVersion(sEnvVar|| '/lib');
    166171            if sPythonVersion <> '-1' then do
    167                 call lineout cacheFile, "ac_cv_path_PYTHON_CONFIG='" || sPythonVersion || "_dll'";
    168                 call lineout cacheFile, "ac_cv_path_PYTHON='" || sEnvVar || "/include/" || sPythonVersion || "'";
     172                call lineout scriptfile, "ac_cv_path_PYTHON_CONFIG='" || sPythonVersion || "_dll" || "'";
     173                call lineout scriptfile, "export ac_cv_path_PYTHON_CONFIG";
     174                call lineout scriptfile, "ac_cv_path_PYTHON='" || sEnvVar || "/include/" || sPythonVersion || "'";
     175                call lineout scriptfile, "export ac_cv_path_PYTHON";
    169176            end
    170177        end
    171178    end
    172     ok = stream(cacheFile, 'c', 'close');
    173179
    174180/* run configure */
    175     address cmd 'sh ./configure --enable-pie=no --prefix=/samba --disable-shared --with-acl-support --cache-file=build.cache 2>&1 | tee configure.log'
     181    call lineout scriptfile, "./configure --enable-pie=no --prefix=/samba --disable-shared --with-acl-support"
     182    ok = stream(scriptFile, 'c', 'close');
     183    address cmd 'sh ' || scriptfile || ' 2>&1 | tee configure.log'
    176184    address cmd 'ENDLOCAL'
    177185end
     
    352360
    353361/**
    354  * set the compile and link flags
     362 * set the compile, link and path flags
    355363 */
    356 SetCLFlags: procedure expose cacheFile
    357 
    358     call lineout cacheFile, "CFLAGS='-D__EMX__ -DOS2  -D__OS2__ -D__ST_MT_ERRNO__ -O2 -march=pentium -mtune=pentium4'";
    359     call lineout cacheFile, "CXXFLAGS='-D__EMX__ -DOS2 -D__OS2__ -D__ST_MT_ERRNO__ -O2 -march=pentium -mtune=pentium4'";
    360     call lineout cacheFile, "LDFLAGS='-Zmap -Zargs-wild -Zbin-files -Zhigh-mem -D__ST_MT_ERRNO__ -s'";
    361 /*  address cmd 'SET AR=emxomfar'
    362     address cmd 'SET LIBS=-lsocket -lsyslog' */
     364SetCLFlags: procedure expose scriptfile
     365
     366    call lineout scriptfile, "CFLAGS='-D__EMX__ -DOS2 -D__OS2__ -D__ST_MT_ERRNO__ -O2 -march=pentium -mtune=pentium4'";
     367    call lineout scriptfile, "export CFLAGS";
     368    call lineout scriptfile, "CXXFLAGS='-D__EMX__ -DOS2 -D__OS2__ -D__ST_MT_ERRNO__ -O2 -march=pentium -mtune=pentium4'";
     369    call lineout scriptfile, "export CXXFLAGS";
     370    call lineout scriptfile, "LDFLAGS='-Zmap -Zargs-wild -Zbin-files -Zhigh-mem -D__ST_MT_ERRNO__ -s'";
     371    call lineout scriptfile, "export LDFLAGS";
     372    call lineout scriptfile, "PATH='" || translate(EnvGet('PATH'), '/', '\') || "'";
     373    call lineout scriptfile, "export PATH";
     374    call lineout scriptfile, "PATH_SEPARATOR=';'";
     375    call lineout scriptfile, "export PATH_SEPARATOR";
     376    call lineout scriptfile, "ac_executable_extensions='.exe'";
     377    call lineout scriptfile, "export ac_executable_extensions";
    363378    return
    364379
Note: See TracChangeset for help on using the changeset viewer.