aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorDaniel Franke <franke.daniel@gmail.com>2010-06-13 12:05:01 -0400
committerDaniel Franke <dfranke@gcc.gnu.org>2010-06-13 12:05:01 -0400
commitd8ddea4044ee8212d5fe305e8e2a547700cd7b8f (patch)
tree7a5503c8e4ec3840ceca10f783c86bdc8998d3d0 /gcc/fortran/module.c
parent2d9ca17ba98b2fcf77b8df192634a27f8e5d4d5b (diff)
downloadgcc-d8ddea4044ee8212d5fe305e8e2a547700cd7b8f.zip
gcc-d8ddea4044ee8212d5fe305e8e2a547700cd7b8f.tar.gz
gcc-d8ddea4044ee8212d5fe305e8e2a547700cd7b8f.tar.bz2
re PR fortran/31588 (gfortran should be able to output Makefile dependencies with -M* options)
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. * scanner.c (open_included_file): New parameter system; add the included file as dependency. (gfc_open_included_file): Add the included file as dependency. (gfc_open_intrinsic_module): Likewise. * invoke.texi: Removed deprecation warning for -M. * gfortran.texi: Removed Makefile-dependencies project. From-SVN: r160684
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 9bdee2a..5cd760b 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -74,6 +74,7 @@ along with GCC; see the file COPYING3. If not see
#include "parse.h" /* FIXME */
#include "md5.h"
#include "constructor.h"
+#include "cpp.h"
#define MODULE_EXTENSION ".mod"
@@ -5120,6 +5121,9 @@ gfc_dump_module (const char *name, int dump_flag)
return;
}
+ if (gfc_cpp_makedep ())
+ gfc_cpp_add_target (filename);
+
/* Write the module to the temporary file. */
module_fp = fopen (filename_tmp, "w");
if (module_fp == NULL)