PDA

View Full Version : continuing the compile/link commands on the next line?


kes103
12-31-2003, 08:24 PM
I use a batch make file for compiling and linking.
I also have quite a few subprogram modules that I need to compile and link.
How do I instruct the compiler to look on the next line for the rest of the compile instructions. I would appreciate the help, because it would be a lot easier for me to read and maintain my batch file if I could continue the compilation instructions on the next line.
Thanks in advance.

tzeis
01-05-2004, 07:02 PM
Try using the caret "^" operator to continue a command on the next line.
You could also use a command file to store your compile commands. The commands in a command file can take up as many lines as you like.

kes103
01-05-2004, 08:16 PM
You could also use a command file to store your compile commands. The commands in a command file can take up as many lines as you like.
I am not familiar with the command file. Could you provide me with an example?

tzeis
01-05-2004, 09:54 PM
Suppose you have a file named "foo.rsp", and in that file are your filenames and compile options

<Example contents of foo.rsp:>
file1.f90
file2.f90
file3.f90
-g
-chk
<end of file>

When you give the command:

lf95 @foo.rsp

LF95 accepts commands from the file. You can put commands in the file and also put commands on the command line. For example, if the command file only had filenames, and no compile options, you could specify the options on the command line:

lf95 @foo.rsp -g -chk

or

lf95 @foo.rsp -o1 -ntrace