[fpc-pascal] can the output object filename be specified on the command line?

DONALD PEDDER jims_son at jedi.apana.org.au
Wed Dec 9 02:26:23 CET 2009


    Just write a script to call the program and do the re-name.

e.g. create call_bar.pas_with_rename in a directory that's in your path 
with following code...
set homedir=(where-ever this stuff lives)
cd $homedir
bar.pas
mv bar.o ${1}.o

Then you can just run "call_bar.pas_with_rename foo_bar"

    I do this with heaps of stuff in DOS (but with batch-files obviously 
:-) ).

On Thu, 3 Dec 2009, Bruce Bauman wrote:

> If I am compiling a file bar.pas, but I want the resulting .o filename
> to be something different, is there a way to do this?
>
>
>
> For example, I want the object filename to be foo__bar.o, but the source
> file is just bar.pas.
>
>
>
> Right now we can get this to work by creating a symlink from
> foo__bar.pas to bar.pas, running the compiler, then deleting the
> symlink, but it seems like there should be a better way.
>
>
>
> Thanks.
>
>
>
> -- Bruce
>
> CONFIDENTIALITY NOTICE: This e-mail is confidential and intended
> solely for the use of the individual or entity to which it is addressed.  If
> you are not the intended recipient, be advised that you have received
> this email in error and that any use, dissemination, forwarding, printing
> or copying of this e-mail is strictly prohibited. If you received this e-mail
> in error, please delete it from your computer and contact the sender.
>



More information about the fpc-pascal mailing list