Re: Script to compile all files with a given extension?



sk8terg1rl wrote:
Hi everyone,

Quite often I move source codes between CPU architectures and need to
recompile it, otherwise I get the error:

-bash: ./program_binary: cannot execute binary file

Since discovering the joys of bootstrapping my programs, I no longer
have one big program but many smaller interconnected ones (easier
debugging, allows you to edit/recompile one even while your doing a
run, greater flexibility, etc.)

How can I write a script that would:
Identify all the files with .for and .f90 extensions

Execute the commands:
'ifort program.for -o program'
'ifort program2.f90 -o program2'

Thanks :-)

skate

Wtite a Makefile and use make?
.



Relevant Pages

  • Re: Email
    ... always go to yahoo to send an email. ... This is one of the joys of computing; discovering new features daily. ...
    (microsoft.public.windows.vista.general)
  • Hi Everyone
    ... Just recently discovering the joys of Usenet. ... I'm a composer living in NY ...
    (rec.music.classical.contemporary)