From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5315 invoked by alias); 13 Feb 2011 18:11:20 -0000 Received: (qmail 5307 invoked by uid 22791); 13 Feb 2011 18:11:20 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 13 Feb 2011 18:11:12 +0000 From: "kristopher.kuhlman at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47720] New: problems with makefile dependency generation using -M X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kristopher.kuhlman at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 13 Feb 2011 18:38:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg01583.txt.bz2 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