comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: using make to create plots?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: using make to create plots? [message #25237] Sun, 03 June 2001 09:01
Stuart Colley is currently offline  Stuart Colley
Messages: 17
Registered: February 2000
Junior Member
The script suggestion worked great.

thanxs,
S
Re: using make to create plots? [message #25248 is a reply to message #25237] Fri, 01 June 2001 11:34 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
nmw@ion.le.ac.uk (Nigel Wade) writes:

> In article <Pine.OSF.3.96.1010601114509.32606B-100000@zuaxp0.star.ucl.ac.uk>, Stuart Colley <src@star.ucl.ac.uk> writes:
>> hi,
>>
>> I'm using make ...
> So, e.g. create a file called 'script' with the contents:
>
> idl << EOF
> sav2ps,'$1',/eps
> EOF
>
> ...


You might need to include the exit command in your here document, otherwise
IDL will block the process...

Martin

--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
Re: using make to create plots? [message #25252 is a reply to message #25248] Fri, 01 June 2001 08:08 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Nigel Wade (nmw@ion.le.ac.uk) writes:

> I think you would need at least a shell script as I can't see any way to get
> make to do what you want. IDL will read commands from the standard input and
> in a script it can be made to read from a here-document within the script, but
> I don't think you can have a make rule with a here-document.

I really need a break. *When* did I graduate from
college!? :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: using make to create plots? [message #25253 is a reply to message #25252] Fri, 01 June 2001 07:53 Go to previous message
nmw is currently offline  nmw
Messages: 18
Registered: January 1995
Junior Member
In article <Pine.OSF.3.96.1010601114509.32606B-100000@zuaxp0.star.ucl.ac.uk>, Stuart Colley <src@star.ucl.ac.uk> writes:
> hi,
>
> I'm using make to create a LaTeX document that contains .eps files created
> by IDL. What I'd like to do is have a suffix rule that checks to see if
> the .sav file (which contains the plot I created with IDL) is newer than
> the .eps that will be included in the document. If the .sav file is newer
> than the .eps file then I'd like to create a new .eps from the .sav file
> using a routine I wrote:
>
> sav2ps, 'filename.sav', /eps
>
> The question is, can IDL be used to execute just one command, such as the
> one above is a suffix rule, e.g the one below:
>
> ..SUFFIXES : .eps .sav
> ..sav.eps :
> idl sav2ps, 'filename.sav', /eps
>
> Or would I have to create a .pro file with the relevant commands? And
> could the make's $< macro be used to pass the filename - I have a feeling
> it couldn't.
>
> cheers,
> S
>

I think you would need at least a shell script as I can't see any way to get
make to do what you want. IDL will read commands from the standard input and
in a script it can be made to read from a here-document within the script, but
I don't think you can have a make rule with a here-document.

So, e.g. create a file called 'script' with the contents:

idl << EOF
sav2ps,'$1',/eps
EOF


Then make your rule run the script:

.sav.eps :
./script $<


--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Cannot read top level base window
Next Topic: Processing ascii data (Heeeeelp!!)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:42:08 PDT 2025

Total time taken to generate the page: 0.00479 seconds