aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-01-05 07:50:24 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-01-05 07:50:24 +0000
commita5a4ce3c3c0eee620f62210898d661a3b05f283a (patch)
tree4a7fde9382b70c566caa911a671a363b63d0df58 /gcc/cppinit.c
parent97fc4caf7d18cd4aaa2a31a55c68b4a4ec7deb36 (diff)
downloadgcc-a5a4ce3c3c0eee620f62210898d661a3b05f283a.zip
gcc-a5a4ce3c3c0eee620f62210898d661a3b05f283a.tar.gz
gcc-a5a4ce3c3c0eee620f62210898d661a3b05f283a.tar.bz2
cpp.texi: Update for -MP.
* cpp.texi: Update for -MP. Clarify behaviour of -MT. * cppinit.c (initialize_dependency_output): Update. (cpp_finish): Output dummy targets for -MP. (OPT_MP): New. (cpp_handle_option): Handle -MP. Don't quote -MT options. * cpplib.h (struct cpp_options): Add deps_phony_targets. * gcc.c (cpp_options): Update to handle -MP. * mkdeps.c (deps_add_target, deps_add_default_target): Update to quote only the default target. (deps_phony_targets): Insert a preceding newline. Rename from deps_dummy_targets for consistency. * mkdeps.h: Update java: * lang.c (lang_decode_option): Change -MA to -MP. * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target): Update to new prototype; do quote targets. (jcf_dependency_write): Update. From-SVN: r38707
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index de00b2f..310fc04 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -760,7 +760,8 @@ initialize_dependency_output (pfile)
s = strchr (spec, ' ');
if (s)
{
- deps_add_target (pfile->deps, s + 1);
+ /* Let the caller perform MAKE quoting. */
+ deps_add_target (pfile->deps, s + 1, 0);
output_file = (char *) xmalloc (s - spec + 1);
memcpy (output_file, spec, s - spec);
output_file[s - spec] = 0;
@@ -1018,6 +1019,10 @@ cpp_finish (pfile)
if (deps_stream)
{
deps_write (pfile->deps, deps_stream, 72);
+
+ if (CPP_OPTION (pfile, deps_phony_targets))
+ deps_phony_targets (pfile->deps, deps_stream);
+
if (CPP_OPTION (pfile, deps_file))
{
if (ferror (deps_stream) || fclose (deps_stream) != 0)
@@ -1077,6 +1082,7 @@ new_pending_directive (pend, text, handler)
DEF_OPT("MG", 0, OPT_MG) \
DEF_OPT("MM", 0, OPT_MM) \
DEF_OPT("MMD", no_fil, OPT_MMD) \
+ DEF_OPT("MP", 0, OPT_MP) \
DEF_OPT("MT", no_tgt, OPT_MT) \
DEF_OPT("P", 0, OPT_P) \
DEF_OPT("U", no_mac, OPT_U) \
@@ -1496,11 +1502,15 @@ cpp_handle_option (pfile, argc, argv)
CPP_OPTION (pfile, no_output) = 1;
break;
+ case OPT_MP:
+ CPP_OPTION (pfile, deps_phony_targets) = 1;
+ break;
+
case OPT_MT:
/* Add a target. */
if (! pfile->deps)
pfile->deps = deps_init ();
- deps_add_target (pfile->deps, arg);
+ deps_add_target (pfile->deps, arg, 0);
break;
case OPT_A: