diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-14 22:34:50 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-14 22:34:50 +0000 |
commit | 3c556f04c64ac43ce21344ceb0d94165934b2b52 (patch) | |
tree | f37dd03c8db5ac792b317d8bbddee04999fd0d43 /gcc/cppfiles.c | |
parent | 47f175274591a9f5f384e25a56d4f994e36b368f (diff) | |
download | ppe42-gcc-3c556f04c64ac43ce21344ceb0d94165934b2b52.tar.gz ppe42-gcc-3c556f04c64ac43ce21344ceb0d94165934b2b52.zip |
PR preprocessor/7358
* c-opts.c (check_deps_environment_vars): Ignore main file
for SUNPRO_DEPENDENCIES.
* cppfiles.c (stack_include_file): Ignore main file if
appropriate.
* cpplib.h (struct cpp_options): New member in deps.
* doc/cppenv.texi: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56333 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 63e6f750ecb..892583e2329 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -318,9 +318,12 @@ stack_include_file (pfile, inc) sysp = MAX ((pfile->map ? pfile->map->sysp : 0), (inc->foundhere ? inc->foundhere->sysp : 0)); - /* For -M, add the file to the dependencies on its first inclusion. */ + /* Add the file to the dependencies on its first inclusion. */ if (CPP_OPTION (pfile, deps.style) > !!sysp && !inc->include_count) - deps_add_dep (pfile->deps, inc->name); + { + if (pfile->buffer || CPP_OPTION (pfile, deps.ignore_main_file) == 0) + deps_add_dep (pfile->deps, inc->name); + } /* Not in cache? */ if (! inc->buffer) |