summaryrefslogtreecommitdiffstats
path: root/scilab/modules/dynamic_link
diff options
context:
space:
mode:
authorPierre MARECHAL <pierre.marechal@scilab.org>2010-04-13 17:17:50 +0200
committerPierre MARECHAL <pierre.marechal@scilab.org>2010-04-13 17:21:02 +0200
commit20a7ab6eb97d9874f526c629e4e6303068fb52de (patch)
treeccc506317f6261dd4af2b5b825f52cc620430c66 /scilab/modules/dynamic_link
parent823b6599b463edcab758f8dda6d0c35a3083b4fc (diff)
parenta163f33f753262f83d10aacdbb638d1141ad0a72 (diff)
downloadscilab-20a7ab6eb97d9874f526c629e4e6303068fb52de.zip
scilab-20a7ab6eb97d9874f526c629e4e6303068fb52de.tar.gz
Merge commit 'origin/5.2'
Conflicts: scilab/modules/dynamic_link/macros/gencompilationflags_unix.sci Change-Id: I629a8ab712ad71e42fac6d4e140fbcb75250b896
Diffstat (limited to 'scilab/modules/dynamic_link')
-rw-r--r--scilab/modules/dynamic_link/locales/en_US/dynamic_link.pot2
-rw-r--r--scilab/modules/dynamic_link/macros/gencompilationflags_unix.sci29
-rw-r--r--scilab/modules/dynamic_link/macros/ilib_compile.sci2
-rw-r--r--scilab/modules/dynamic_link/macros/ilib_gen_Make_unix.sci2
4 files changed, 19 insertions, 16 deletions
diff --git a/scilab/modules/dynamic_link/locales/en_US/dynamic_link.pot b/scilab/modules/dynamic_link/locales/en_US/dynamic_link.pot
index 8fd66e1..f3aa73c 100644
--- a/scilab/modules/dynamic_link/locales/en_US/dynamic_link.pot
+++ b/scilab/modules/dynamic_link/locales/en_US/dynamic_link.pot
@@ -14,7 +14,7 @@ msgstr ""
14"MIME-Version: 1.0\n" 14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=ISO-8859-1\n" 15"Content-Type: text/plain; charset=ISO-8859-1\n"
16"Content-Transfer-Encoding: 8bit\n" 16"Content-Transfer-Encoding: 8bit\n"
17"Revision-Date: 2010-01-25 10:32+0100\n" 17"Revision-Date: 2010-04-13 09:16+0100\n"
18 18
19# File: macros/ilib_gen_Make_unix.sci, line: 258 19# File: macros/ilib_gen_Make_unix.sci, line: 258
20#, c-format 20#, c-format
diff --git a/scilab/modules/dynamic_link/macros/gencompilationflags_unix.sci b/scilab/modules/dynamic_link/macros/gencompilationflags_unix.sci
index 85764d0..2d44ffd 100644
--- a/scilab/modules/dynamic_link/macros/gencompilationflags_unix.sci
+++ b/scilab/modules/dynamic_link/macros/gencompilationflags_unix.sci
@@ -1,5 +1,6 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2008 - INRIA - Sylvestre LEDRU 2// Copyright (C) 2008 - INRIA - Sylvestre LEDRU
3// Copyright (C) 2010 - DIGITEO - Sylvestre LEDRU
3// 4//
4// This file must be used under the terms of the CeCILL. 5// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which 6// This source file is licensed as described in the file COPYING, which
@@ -8,25 +9,27 @@
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 9// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9 10
10 11
11function cmd = gencompilationflags_unix(ldflags, cflags, fflags, cc) 12function cmd = gencompilationflags_unix(ldflags, cflags, fflags, cc, flagsType)
12 // This function is restricted to Linux/Unix user only 13
14 // This function is restricted to Linux/Unix user only
13 if getos() == 'Windows' then 15 if getos() == 'Windows' then
14 error(msprintf(gettext("%s: Feature not available under Microsoft Windows.\n"),'gencompilationflags_unix')); 16 error(msprintf(gettext("%s: Feature not available under Microsoft Windows.\n"),'gencompilationflags_unix'));
15 return; 17 return;
16 end 18 end
17 19
18 [lhs,rhs] = argn(0); 20 [lhs,rhs] = argn(0);
19 if rhs <> 4 then 21 if rhs <> 5 then
20 error(msprintf(gettext("%s: Wrong number of input argument(s).\n"),"gencompilationflags_unix")); 22 error(msprintf(gettext("%s: Wrong number of input arguments: %d expected.\n"),"gencompilationflags_unix",5));
21 return 23 return
22 end 24 end
23 25
24 cmd='' 26 cmd=''
27
25 // CFLAGS 28 // CFLAGS
26 if cflags <> '' then 29 if cflags <> '' then
27 cmd = cmd +" CFLAGS="""+cflags+"""" 30 cmd = cmd +" CFLAGS="""+cflags+""""
28 end 31 end
29 32
30 // CXXFLAGS ... use the same as C 33 // CXXFLAGS ... use the same as C
31 if cflags <> '' then 34 if cflags <> '' then
32 cmd = cmd +" CXXFLAGS="""+cflags+"""" 35 cmd = cmd +" CXXFLAGS="""+cflags+""""
@@ -34,9 +37,9 @@ function cmd = gencompilationflags_unix(ldflags, cflags, fflags, cc)
34 37
35 // LDFLAGS 38 // LDFLAGS
36 // Do not set the LDFLAGS See bug #4787 39 // Do not set the LDFLAGS See bug #4787
37 // if ldflags <> '' then 40 if ldflags <> '' & flagsType <> "configure" then
38 // cmd = cmd +" LDFLAGS="""+ldflags+"""" 41 cmd = cmd +" LDFLAGS="""+ldflags+""""
39 // end 42 end
40 43
41 // FFLAGS 44 // FFLAGS
42 if fflags <> '' then 45 if fflags <> '' then
@@ -48,4 +51,4 @@ function cmd = gencompilationflags_unix(ldflags, cflags, fflags, cc)
48 cmd = cmd +" CC="""+cc+"""" 51 cmd = cmd +" CC="""+cc+""""
49 end 52 end
50 53
51 endfunction \ No newline at end of file 54endfunction
diff --git a/scilab/modules/dynamic_link/macros/ilib_compile.sci b/scilab/modules/dynamic_link/macros/ilib_compile.sci
index 058e504..2d5e5a3 100644
--- a/scilab/modules/dynamic_link/macros/ilib_compile.sci
+++ b/scilab/modules/dynamic_link/macros/ilib_compile.sci
@@ -127,7 +127,7 @@ function libn = ilib_compile(lib_name,makename,files, ..
127 chdir(TMPDIR); 127 chdir(TMPDIR);
128 cmd = "make " 128 cmd = "make "
129 129
130 cmd = cmd + gencompilationflags_unix(ldflags, cflags, fflags, cc) 130 cmd = cmd + gencompilationflags_unix(ldflags, cflags, fflags, cc, "build")
131 131
132 //** BEWARE : this function can cause errors if used with "old style" Makefile inside a Scilab 5 132 //** BEWARE : this function can cause errors if used with "old style" Makefile inside a Scilab 5
133 //** environment where the Makefile are created from a "./configure" 133 //** environment where the Makefile are created from a "./configure"
diff --git a/scilab/modules/dynamic_link/macros/ilib_gen_Make_unix.sci b/scilab/modules/dynamic_link/macros/ilib_gen_Make_unix.sci
index b8dbea6..d2de9d9 100644
--- a/scilab/modules/dynamic_link/macros/ilib_gen_Make_unix.sci
+++ b/scilab/modules/dynamic_link/macros/ilib_gen_Make_unix.sci
@@ -249,7 +249,7 @@ function generateConfigure(workingPath, ..
249 if ( ilib_verbose() <> 0 ) then 249 if ( ilib_verbose() <> 0 ) then
250 mprintf(gettext(" %s: configure : Generate Makefile.\n"),"ilib_gen_Make"); 250 mprintf(gettext(" %s: configure : Generate Makefile.\n"),"ilib_gen_Make");
251 end 251 end
252 cmd = gencompilationflags_unix(ldflags, cflags, fflags, cc) 252 cmd = gencompilationflags_unix(ldflags, cflags, fflags, cc, "configure")
253 cmd = workingPath+"/compilerDetection.sh "+cmd 253 cmd = workingPath+"/compilerDetection.sh "+cmd
254 254
255 [msg,ierr,stderr] = unix_g(cmd); 255 [msg,ierr,stderr] = unix_g(cmd);