[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Small change to pkg.m?
From: |
John W. Eaton |
Subject: |
Re: Small change to pkg.m? |
Date: |
Fri, 02 Nov 2007 12:48:53 -0400 |
David, if you agree that this patch is OK, will you please apply it or
let me know and I'll do it.
Thanks,
jwe
On 29-Oct-2007, Thomas Treichl wrote:
| David Bateman schrieb:
| > Humm for CC and CXX no we don't, but for AR and RANLIB that don't use
| > mkoctfile we would.. Also just thinking about it, can we really use
| > mkoctfile to probe CC and CXX in any case.. I know that under MSVC the
| > mkoctfile command is replace with an oct-file that does the same thing
| > and I don't know if it respects the environment.. Perhaps it would be
| > save to stick to octave_config_info and have the getenv test for all args..
| >
| > D.
|
| I attached my suggestion to this email.
|
| Thomas
| 2007-10-29 Thomas Treichl <address@hidden>
|
| * pkg/pkg.m.m: Check for environment variables CC, CXX, AR, RANLIB
| when calling ./configure and add quotes to preserve spaces.
| --- pkg/pkg.m.~1.65.~ 2007-10-26 21:49:29.000000000 +0200
| +++ pkg/pkg.m 2007-10-29 18:38:30.000000000 +0100
| @@ -1019,12 +1019,21 @@
| src = fullfile (packdir, "src");
| ## configure
| if (exist (fullfile (src, "configure"), "file"))
| + flags = "";
| + if (isempty (getenv ("CC")))
| + flags = strcat (flags, " CC=\"", octave_config_info ("CC"), "\"");
| + endif
| + if (isempty (getenv ("CXX")))
| + flags = strcat (flags, " CXX=\"", octave_config_info ("CXX"), "\"");
| + endif
| + if (isempty (getenv ("AR")))
| + flags = strcat (flags, " AR=\"", octave_config_info ("AR"), "\"");
| + endif
| + if (isempty (getenv ("RANLIB")))
| + flags = strcat (flags, " RANLIB=\"", octave_config_info ("RANLIB"),
"\"");
| + endif
| [status, output] = shell (strcat ("cd ", src, "; ./configure
--prefix=\"",
| - desc.dir, "\"",
| - " CC=", octave_config_info ("CC"),
| - " CXX=", octave_config_info ("CXX"),
| - " AR=", octave_config_info ("AR"),
| - " RANLIB=", octave_config_info
("RANLIB")));
| + desc.dir, "\"", flags));
| if (status != 0)
| rm_rf (desc.dir);
| error ("the configure script returned the following error: %s", output);
- Re: Small change to pkg.m?,
John W. Eaton <=