This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] output of Makefile dependencies


On Mon, Jun 14, 2010 at 10:20:41PM +0400, Kirill Smelkov wrote:
> On Sun, Jun 13, 2010 at 02:36:46PM +0200, Daniel Franke wrote:
> > 
> > Hi all.
> > 
> > Attached patch enables the output of Makefile dependencies.
> > It handles '#include', 'INCLUDE' and module targets/use dependencies alike.
> > 
> > Example:
> > $ cat a.f90 
> > MODULE a
> >   include "a.inc"
> > END MODULE
> > 
> > $ cat b.f90
> >   USE a
> > #include "b.h"
> > end
> > 
> > $ gfortran-svn -cpp -M a.f90 b.f90 
> > a.o a.mod: a.f90 a.inc
> > b.o: b.f90 b.h a.mod
> > 
> > 
> > 2010-06-13  Daniel Franke  <franke.daniel@gmail.com>
> > 
> > 	PR fortran/31588
> > 	PR fortran/43954
> > 	* gfortranspec.c (lang_specific_driver): Removed deprecation
> > 	warning for -M.
> > 	* lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
> > 	* lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
> > 	* cpp.h (gfc_cpp_makedep): New.
> > 	(gfc_cpp_add_dep): New.
> > 	(gfc_cpp_add_target): New.
> > 	* cpp.c (gfc_cpp_option): Add deps* members.
> > 	(gfc_cpp_makedep): New.
> > 	(gfc_cpp_add_dep): New.
> > 	(gfc_cpp_add_target): New.
> > 	(gfc_cpp_init_options): Initialize new options.
> > 	(gfc_cpp_handle_option): Handle new options.
> > 	(gfc_cpp_post_options): Map new options to libcpp-options.
> > 	(gfc_cpp_init): Handle deferred -MQ and -MT options.
> > 	(gfc_cpp_done): If requested, write dependencies to file.
> > 	* module.c (gfc_dump_module): Add a module filename as target.
> > 	(import_iso_c_binding_module): Add dependency on intrinsic module.
> > 	(use_iso_fortran_env_module): Likewise.
> > 	* scanner.c (gfc_open_included_file): Add the included file as
> > 	dependency if dependency tracking is enabled.
> > 	(gfc_open_intrinsic_module): Likewise.
> > 
> > 
> > Bootstrapped and regression tested on i686-pc-linux-gnu.
> > Ok for trunk?
> > 
> > 	Daniel
> 
> Daniel, thanks for dealing with this.
> 
> Because of PR fortran/43954 (4.3 -> 4.4 regression, where -Wp,-M stopped
> working) could we please apply your committed version to 4.4 as well?
> 
> `make check` tested on top of today's gcc-4_4-branch on
> i686-pc-linux-gnu + manually verified that dependency generation works.
> 
> Thanks,
> Kirill
> 
> 
> P.S. If "yes", I'll backport to 4.5 too.
> 
> 
> ----8<----
> 
> From: Kirill Smelkov <kirr@landau.phys.spbu.ru>
> Date: Mon, 14 Jun 2010 21:49:47 +0400
> Subject: [PATCH] gcc/fortran: output of Makefile dependencies


Silence = ?


Anyway, I've posted two updated patches for 4.4 & 4.5 here

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43954#c9


Thanks,
Kirill


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]