This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47720] New: problems with makefile dependency generation using -M
- From: "kristopher.kuhlman at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 13 Feb 2011 18:11:11 +0000
- Subject: [Bug fortran/47720] New: problems with makefile dependency generation using -M
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47720
Summary: problems with makefile dependency generation using -M
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: kristopher.kuhlman@gmail.com
Created attachment 23327
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23327
two small test codes that illustrate problem
I am in Ubuntu using a trunk build of gfortran from yesterday.
When I try to create makefile dependencies using -M, first it complains that I
need to use CPP to pre-process the code, even though there are no CPP
directives in this code.
The test code compiles file otherwise:
$ gfortran-4.6 -c makegen1.f90
$ gfortran-4.6 -c makegen2.f90
$ gfortran-4.6 -M makegen?.f90
Fatal Error: To enable preprocessing, use -cpp
Fatal Error: To enable preprocessing, use -cpp
secondly, when I add the -cpp flag, I get redundant mentions of use of a common
module. In this test code it shows up 3 times (see constants.mod mentioned 3
times). Can gfortran not repeat the same module several times?
$ gfortran-4.6 -cpp -M makegen?.f90
makegen1.o constants.mod: makegen1.f90
makegen2.o utility.mod: makegen2.f90 constants.mod constants.mod \
constants.mod