diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-12 22:44:30 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-12 22:44:30 +0000 |
commit | 611913766fa457bd9b0e3aa15bd5ef5ca244a5c1 (patch) | |
tree | 964d0b5f695c2048f02200e7dfda82d8e3cbbaae /gcc/cpplib.h | |
parent | ab812e961d9c56622326ac2ce550758463fc4edc (diff) | |
download | gcc-611913766fa457bd9b0e3aa15bd5ef5ca244a5c1.tar.gz |
* c-opts.c (deps_seen, deps_file, deferred_count, deferred_size,
handle_deferred_opts, sanitize_cpp_opts, defer_opt,
struct deferred_opt): New.
(COMMAND_LINE_OPTIONS): Add -M*.
(missing_arg): Update.
(c_common_decode_option): Handle -M*.
(c_common_post_options): Handle -M*. Use sanitize_cpp_opts;
don't call cpp_post_options.
(c_common_finish, check_deps_environment_vars): Update.
* cppfiles.c (stack_include_file, handle_missing_header): Update.
* cpphash.h (CPP_PRINT_DEPS): Remove.
* cppinit.c: Don't include version.h.
(cpp_create_reader): Don't call deps_init. Initialize
warn_long_long.
(cpp_read_main_file): Init deps if necessary.
(cpp_destroy): Conditionally free deps.
(cpp_finish): Update.
(no_tgt): Remove.
(COMMAND_LINE_OPTIONS, cpp_handle_option): Remove -M*.
(cpp_post_options): Rename post_options.
* cpplib.h (struct cpp_options): Remove some dependency options;
move others to a new structure.
(cpp_post_options): Remove.
(cpp_finish): Comment.
* fix-header.c (read_scan_file): Don't call cpp_post_options.
treelang:
* treelang.c: Remove cpp_post_options.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56239 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r-- | gcc/cpplib.h | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h index 7df6ce27481..3640d44605a 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -227,10 +227,6 @@ struct cpp_options /* Pending options - -D, -U, -A, -I, -ixxx. */ struct cpp_pending *pending; - /* File name which deps are being written to. This is 0 if deps are - being written to stdout. */ - const char *deps_file; - /* Search paths for include files. */ struct search_path *quote_include; /* "" */ struct search_path *bracket_include; /* <> */ @@ -276,21 +272,6 @@ struct cpp_options /* Nonzero means to allow hexadecimal floats and LL suffixes. */ unsigned char extended_numbers; - /* Nonzero means print the names of included files rather than the - preprocessed output. 1 means just the #include "...", 2 means - #include <...> as well. */ - unsigned char print_deps; - - /* Nonzero if phony targets are created for each header. */ - unsigned char deps_phony_targets; - - /* Nonzero if missing .h files in -M output are assumed to be - generated files and not errors. */ - unsigned char print_deps_missing_files; - - /* If true, fopen (deps_file, "a") else fopen (deps_file, "w"). */ - unsigned char print_deps_append; - /* Nonzero means print names of header files (-H). */ unsigned char print_include_names; @@ -394,6 +375,20 @@ struct cpp_options /* True for traditional preprocessing. */ unsigned char traditional; + /* Dependency generation. */ + struct + { + /* Style of header dependencies to generate. */ + enum {DEPS_NONE = 0, DEPS_USER, DEPS_SYSTEM } style; + + /* Assume missing files are generated files. */ + bool missing_files; + + /* Generate phony targets for each dependency apart from the first + one. */ + bool phony_targets; + } deps; + /* Target-specific features set by the front end or client. */ /* Precision for target CPP arithmetic, target characters, target @@ -522,14 +517,10 @@ extern void cpp_set_callbacks PARAMS ((cpp_reader *, cpp_callbacks *)); /* Now call cpp_handle_option[s] to handle 1[or more] switches. The return value is the number of arguments used. If cpp_handle_options returns without using all arguments, it couldn't - understand the next switch. When there are no switches left, you - must call cpp_post_options before calling cpp_read_main_file. Only - after cpp_post_options are the contents of the cpp_options - structure reliable. Options processing is not completed until you - call cpp_finish_options. */ + understand the next switch. Options processing is not completed + until you call cpp_finish_options. */ extern int cpp_handle_options PARAMS ((cpp_reader *, int, char **)); extern int cpp_handle_option PARAMS ((cpp_reader *, int, char **)); -extern void cpp_post_options PARAMS ((cpp_reader *)); /* This function reads the file, but does not start preprocessing. It returns the name of the original file; this is the same as the @@ -551,6 +542,13 @@ extern const char *cpp_read_main_file PARAMS ((cpp_reader *, const char *, from cpp_read_main_file, before they get debug callbacks. */ extern void cpp_finish_options PARAMS ((cpp_reader *)); +/* Call this to finish preprocessing. If you requested dependency + generation, pass an open stream to write the information to, + otherwise NULL. It is your responsibility to close the stream. + + Returns cpp_errors (pfile). */ +extern int cpp_finish PARAMS ((cpp_reader *, FILE *deps_stream)); + /* Call this to release the handle at the end of preprocessing. Any use of the handle after this function returns is invalid. Returns cpp_errors (pfile). */ @@ -568,7 +566,6 @@ extern void cpp_register_pragma PARAMS ((cpp_reader *, const char *, const char *, void (*) PARAMS ((cpp_reader *)))); -extern int cpp_finish PARAMS ((cpp_reader *, FILE *)); extern int cpp_avoid_paste PARAMS ((cpp_reader *, const cpp_token *, const cpp_token *)); extern const cpp_token *cpp_get_token PARAMS ((cpp_reader *)); |