Warn about output files that are generated by the skeletons and that

conflict with other output files.
* data/glr.c: Don't generate the header file here when glr.cc does.
* src/files.c (file_names, file_names_count): New static globals.
(compute_output_file_names): Invoke output_file_name_check for files
not generated by the skeletons and remove existing checks.
(output_file_name_check): New function that warns about conflicting
output file names.
(output_file_names_free): Free file_names.
* src/files.h (output_file_name_check): Declare.
* src/scan-skel.l: Invoke output_file_name_check for files generated by
the skeletons.
* tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
(Conflicting output files): New tests.
This commit is contained in:
Joel E. Denny
2006-12-10 00:16:15 +00:00
parent 178e123eec
commit 3f7ca62853
6 changed files with 84 additions and 16 deletions

View File

@@ -64,6 +64,7 @@ extern uniqstr current_file;
void compute_output_file_names (void);
void output_file_names_free (void);
void output_file_name_check (char const *file_name);
FILE *xfopen (const char *name, const char *mode);
void xfclose (FILE *ptr);