public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
Date: Fri, 09 Dec 2022 02:45:37 +0000	[thread overview]
Message-ID: <bug-81615-4-U12OpVv7nL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-81615-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #11 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Fri, Dec 09, 2022 at 01:50:56AM +0000, barrowes at alum dot mit.edu wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615
> 
> --- Comment #10 from Ben Barrowes <barrowes at alum dot mit.edu> ---
> The reason the stdout redirection doesn't work for me is because
> I want to save these preprocessed files during a "make" session.
> When I make, thousands of fotran files are preprocessed and compiled.
> How do I save the stdout from each one into its own directory?
> 

% cat > a1.f90
subroutine foo
end subroutine foo
% cp a1.f90 b1.f90
% cp a1.f90 c1.f90
% cp a1.f90 d1.f90
% cat Makefile
FC = gfortran11
FF = -cpp -E
IN = f90
OUT = txt

NAMES = a1 b1 c1 d1

all:
.for i in ${NAMES}
        ${FC} ${FF} $i.${IN} > $i.${OUT}
.endfor
% make 
gfortran11 -cpp -E a1.f90 > a1.txt
gfortran11 -cpp -E b1.f90 > b1.txt
gfortran11 -cpp -E c1.f90 > c1.txt
gfortran11 -cpp -E d1.f90 > d1.txt
% ls
Makefile        a1.txt          b1.txt          c1.txt          d1.txt
a1.f90          b1.f90          c1.f90          d1.f90

The preprocessed files appear in the same directory with its source
source file.  It's trivial matter to have preprocess stuffed into
its own directory.

PS: Having to preprocess thousands of Fortran files into individual
directories seems to be poor software design.

  parent reply	other threads:[~2022-12-09  2:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
2022-12-08 15:58 ` barrowes at alum dot mit.edu
2022-12-08 16:44 ` jakub at gcc dot gnu.org
2022-12-08 17:35 ` barrowes at alum dot mit.edu
2022-12-08 17:38 ` jakub at gcc dot gnu.org
2022-12-08 17:43 ` barrowes at alum dot mit.edu
2022-12-08 22:11 ` kargl at gcc dot gnu.org
2022-12-09  1:50 ` barrowes at alum dot mit.edu
2022-12-09  2:45 ` sgk at troutmask dot apl.washington.edu [this message]
2022-12-09 13:25 ` barrowes at alum dot mit.edu
2022-12-09 19:34 ` kargl at gcc dot gnu.org
2022-12-10  1:47 ` barrowes at alum dot mit.edu
2022-12-10  2:04 ` sgk at troutmask dot apl.washington.edu
2022-12-11 10:29 ` rimvydas.jas at gmail dot com
2023-12-19 13:29 ` acoplan at gcc dot gnu.org
2023-12-19 19:50 ` anlauf at gcc dot gnu.org
2023-12-19 20:04 ` jvdelisle at gcc dot gnu.org
2023-12-19 20:10 ` anlauf at gcc dot gnu.org
2023-12-20 19:24 ` cvs-commit at gcc dot gnu.org
2023-12-28 20:22 ` cvs-commit at gcc dot gnu.org
2023-12-29 20:26 ` anlauf at gcc dot gnu.org
2024-01-02  9:26 ` acoplan at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-81615-4-U12OpVv7nL@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).