1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
2002-02-15 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
* src/files (compute_exts_from_gf, compute_exts_from_src): Handle
the case where header_extension is the same as src_extension, aka
handle -d -o <file> where <file> doesn't have a known EXT to
transform. e.g. if <file> is <something>.yxx, set the
header_extension to <something>.yxx.h, as would do bison 1.28.
--- bison-1.32/src/files.c.extfix Mon Jan 21 16:41:46 2002
+++ bison-1.32/src/files.c Fri Feb 15 15:40:43 2002
@@ -288,6 +288,8 @@ compute_exts_from_gf (const char *ext)
src_extension = tr (src_extension, 'Y', 'C');
header_extension = tr (ext, 'y', 'h');
header_extension = tr (header_extension, 'Y', 'H');
+ if (!strcmp (header_extension, src_extension))
+ header_extension = concat2 (src_extension, ".h");
}
/* Computes extensions from the given c source file extension. */
@@ -300,6 +302,8 @@ compute_exts_from_src (const char *ext)
src_extension = xstrdup (ext);
header_extension = tr (ext, 'c', 'h');
header_extension = tr (header_extension, 'C', 'H');
+ if (!strcmp (header_extension, src_extension))
+ header_extension = concat2 (src_extension, ".h");
}
|