2012-06-24 21:02, Mike Miller skrev:
> On Sun, Jun 24, 2012 at 1:07 PM, Rafael Laboissiere
> <raf...@laboissiere.net> wrote:
>> * Paul Dreik <sl...@pauldreik.se> [2012-06-24 11:44]:
>>
>>> However, I am glad to simplify the existing solution while at the same
>>> time avoiding dependencies on awk or gsed. Is "word" GNU make specific?
>>> I did not see any note about it in the manual, but I did not check
>>> thoroughly.
>>> In the meanwhile, I have changed to the  $(word 5... solution. It should
>>> handle version strings like 3.7.11+ properly, as someone had problem
>>> with earlier.
>>
>> Here is another solution that depends only on the availability of
>> Octave itself:
>>
>> majorversion := $(shell echo 'printf (strsplit (OCTAVE_VERSION, ".") (1) 
>> {1})' | octave -q)
>> minorversion := $(shell echo 'printf (strsplit (OCTAVE_VERSION, ".") (2) 
>> {1})' | octave -q)
>> microversion := $(shell echo 'printf (strsplit (OCTAVE_VERSION, ".") (3) 
>> {1})' | octave -q)
> 
> Just a friendly reminder to always use the environment variables
> passed to make from Octave:
> 
> MKOCTFILE ?= mkoctfile
> OCTAVE ?= octave
> 
> FOO := $(shell ... $(MKOCTFILE) ...)
> BAR := $(shell ... $(OCTAVE) ... )
> 

Thank you for the reminder! I thought of it when the MKOCTFILE
discussion was up last week(?) but forgot it now. I will make the change.

Paul

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to