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

Home » Public Forums » archive » concatenating files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
RE: concatenating files [message #3049 is a reply to message #2993] Wed, 19 October 1994 09:40 Go to previous message
landers is currently offline  landers
Messages: 45
Registered: May 1993
Member
In article <37jtjt$lfr@hammer.msfc.nasa.gov>, mallozzi@ssl.msfc.nasa.gov writes:
|> | darren@rockvax.rockefeller.edu writes:
|> | Does anyone know an easy way to concatenate several
|> | files (WAVE programs and functions) into one big file, so that it can
|> | all be compiled with a single ".run" command?
|>
|> I somtimes use the following for IDL on a VAX, but I guess it should work
|> on other platforms as well:
|>
|> Create a file that looks like
|> .run PRO1
|> .run PRO2

[...snip]

Here's a program I use in PV-WAVE to compile an entire directory full of
stuff. This .RUNs each file, and executes COMPILE to save a *.cpr file.
It's done for each *.pro file in the current directory.

It also makes a file named compileall.com that has all the compile
instructions in it (so next time, you just need to run that).

For all you poor IDLers, you can probably modify it (take out the COMPILE) and
use it to generate the compileall.com file.

To use it, just CD to the directory with your programs, and do:
@make.com
(assuming make.com is in the !Path)

------ make.com -------- snip here ------
; make.com
; Run this by CD'ing to the directory you're compiling and then type:
; @<whatever-path-needed>/make.com

; This will generate and execute a compileall.com to .RUN & COMPIILE
; all the .pro's in the current directory.

; ***WARNING*** This will DELPROC,/All and DELFUNC,/All - deleting any
; programs that are currently compiled.
; Also, it makes a file named compileall.com in the current dir.

; Procedure:
; loop thru the files, strip off the '.pro', run them, and compile them:
; Delete all functions and procedures between each so we can get all
; the needed subroutines with the /All keyword.
; Note that everything is .RUN'ed twice - this is to support recursion
; in functions that are embeded in files with a different name as the
; routine

save_quiet = !Quiet
!Quiet = 0 ; turn on .RUN noise, so we can watch it go....

; get all the .pro files

files = FINDFILE( '*.pro', Count=count )

; build a compileall.com program to compile everything in this directory

OPENW, lun, /Get_Lun, 'compileall.com'

FOR i = 0L, count-1 DO BEGIN $
file = STRMID( files(i), 0, STRLEN( files(i) ) - 4 ) &$
PRINTF, lun, 'DELPROC,/All' &$
PRINTF, lun, 'DELFUNC,/All' &$
PRINTF, lun, '.RUN ' + file &$
PRINTF, lun, '.RUN ' + file &$
PRINTF, lun, 'COMPILE,/All, file="' + file + '"'
;ENDIF

PRINTF, lun, 'DELPROC,/All'
PRINTF, lun, 'DELFUNC,/All'

FREE_LUN, Lun

; Now run the file to compile everything

@compileall.com

!Quiet = save_quiet ; back to user's normal

; Get rid of internal variables

DELVAR, save_quiet, files, count, Lun, file

;END
----- make.com ---- END

Dave

PS - Sorry if this gets posted twice (or more), but my NNTP host is
having anxiety attacks....
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: CALL_EXTERNAL and VAX/VMS
Next Topic: Style guide for programming in PV-WAVE

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

Current Time: Sat Nov 29 13:11:42 PST 2025

Total time taken to generate the page: 2.31858 seconds