diff -aur bison-cvs/src/files.c bison/src/files.c --- bison-cvs/src/files.c 2005-12-10 12:51:25.000000000 +1300 +++ bison/src/files.c 2006-01-12 11:51:11.000000000 +1300 @@ -51,6 +51,7 @@ char const *spec_verbose_file = NULL; /* for --verbose. */ char const *spec_graph_file = NULL; /* for -g. */ char const *spec_defines_file = NULL; /* for --defines. */ +char const *spec_defines_file_short = NULL; /* for --defines. */ char const *parser_file_name; uniqstr grammar_file = NULL; @@ -320,6 +321,11 @@ if (! spec_defines_file) spec_defines_file = concat2 (all_but_ext, header_extension); name[names++] = spec_defines_file; + + // By Oleg: + // store a short name of the header used in a #include + if (! spec_defines_file_short) + spec_defines_file_short = base_name(spec_defines_file); } if (graph_flag) diff -aur bison-cvs/src/files.h bison/src/files.h --- bison-cvs/src/files.h 2005-10-03 06:44:49.000000000 +1300 +++ bison/src/files.h 2006-01-12 11:36:13.000000000 +1300 @@ -43,6 +43,7 @@ /* File name specified with --defines. */ extern char const *spec_defines_file; +extern char const *spec_defines_file_short; /* Directory prefix of output file names. */ extern char const *dir_prefix; diff -aur bison-cvs/src/scan-skel.l bison/src/scan-skel.l --- bison-cvs/src/scan-skel.l 2005-11-10 05:11:25.000000000 +1300 +++ bison/src/scan-skel.l 2006-01-12 11:37:53.000000000 +1300 @@ -93,7 +93,7 @@ "@ofile@" QPUTS (outname); "@dir_prefix@" QPUTS (dir_prefix); "@output_parser_name@" BASE_QPUTS (parser_file_name); -"@output_header_name@" BASE_QPUTS (spec_defines_file); +"@output_header_name@" BASE_QPUTS (spec_defines_file_short); /* This pattern must not match more than the previous @ patterns. */ @[^{}@\n]* fatal ("invalid @ in skeleton: %s", yytext);