octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Small change to pkg.m?


From: David Bateman
Subject: Re: Small change to pkg.m?
Date: Mon, 29 Oct 2007 18:05:10 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Thomas Treichl wrote:
> David Bateman schrieb:
>> I don't see how this might break things, and seems the right thing to
>> do.. I might also suggest respecting any variables from the environment
>> so that your original trick would also work.. Something like
>>
>> flags = "";
>> if (isempty (getenv ("CC")))
>>   flags = strcat (flags,
>>   " CC =\"", mkoctfile ("-p", "CC"), "\"");
>> endif
>> if (isempty (getenv ("CXX")))
>>   flags = strcat (flags,
>>   " CXX =\"", mkoctfile ("-p", "CXX"), "\"");
>> endif
>> if (isempty (getenv ("AR")))
>>   flags = strcat (flags,
>>   " AR =\"", mkoctfile ("-p", "AR"), "\"");
>> endif
>> if (isempty (getenv ("RANLIB")))
>>   flags = strcat (flags,
>>   " RANLIB =\"", mkoctfile ("-p", "RANLIB"), "\"");
>> endif
That should use octave_config_info rather than mkoctfile here.. My fault..


>> [status, output] = shell (strcat ("cd ", src, "; ./configure
>> --prefix=\"",
>>     desc.dir, "\"", flags, "\""));
>>
>> Want to supply a patch?
>>
>> D.
>
> Thanks for the quick answer David,
>
> just some questions before I prepare a patch, mkoctfile uses these lines
>
>   : ${CC="gcc ..."}
>   : ${CXX="g++ ..."}
>
> do we really need to check
>
>   if (isempty (getenv ("CC")))
>
> then?
>
> mkoctfile does not have fields for AR and RANLIB, so I think I
> shouldn't ask mkoctfile for the values of AR and RANLIB?

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.


-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]