Skip to content

Commit dc0df49

Browse files
committed
Remove re2c:flags:output and make re2c:flags:type-header relative to the output directory.
Before this patch the filename specified in `re2c:flags:t`, `re2c:flags:type-header` configuration was relative to the directory of the source file. It is inconvenient for out-of-tree builds, when the output is generated in a directory different from the source directory (which may be read-only). Therefore this patch makes the filename in configuration relative to the directory of the output file. As for the `re2c:flags:o`, `re2c:flags:output` configuration, it is removed altogether. Making it relative to the source directory has the same problems as with the header file, and making it absolute or relative to the build directory (where re2c is run) is also bad, because build-related information will have to be hard-coded in the source file. Given that this is a relatively new configuraion and it hasn't been documented in any released version of re2c, it is better to delete it. The change does not affect `-t`, `--type-header` and `-o`, `--output` command-line options.
1 parent 0b0622c commit dc0df49

File tree

10 files changed

+1859
-1922
lines changed

10 files changed

+1859
-1922
lines changed

bootstrap/doc/re2c.1

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -924,15 +924,10 @@ This directive marks the end of header file started with
924924
.SH CONFIGURATIONS
925925
.INDENT 0.0
926926
.TP
927-
.B \fBre2c:flags:o\fP, \fBre2c:flags:output\fP
928-
Specify the name of the output file relative to the source file directory.
929-
(Same as \fB\-o\fP, \fB\-\-output\fP command\-line option except that the filename
930-
is relative.)
931-
.TP
932927
.B \fBre2c:flags:t\fP, \fBre2c:flags:type\-header\fP
933-
Specify the name of the generated header file relative to the source file
934-
directory. (Same as \fB\-t\fP, \fB\-\-type\-header\fP command\-line option except
935-
that the filename is relative.)
928+
Specify the name of the generated header file relative to the directory of
929+
the output file. (Same as \fB\-t\fP, \fB\-\-type\-header\fP command\-line option
930+
except that the filepath is relative.)
936931
.TP
937932
.B \fBre2c:flags:input\fP
938933
Same as \fB\-\-input\fP command\-line option.

bootstrap/doc/re2go.1

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -930,15 +930,10 @@ This directive marks the end of header file started with
930930
.SH CONFIGURATIONS
931931
.INDENT 0.0
932932
.TP
933-
.B \fBre2c:flags:o\fP, \fBre2c:flags:output\fP
934-
Specify the name of the output file relative to the source file directory.
935-
(Same as \fB\-o\fP, \fB\-\-output\fP command\-line option except that the filename
936-
is relative.)
937-
.TP
938933
.B \fBre2c:flags:t\fP, \fBre2c:flags:type\-header\fP
939-
Specify the name of the generated header file relative to the source file
940-
directory. (Same as \fB\-t\fP, \fB\-\-type\-header\fP command\-line option except
941-
that the filename is relative.)
934+
Specify the name of the generated header file relative to the directory of
935+
the output file. (Same as \fB\-t\fP, \fB\-\-type\-header\fP command\-line option
936+
except that the filepath is relative.)
942937
.TP
943938
.B \fBre2c:flags:input\fP
944939
Same as \fB\-\-input\fP command\-line option.

0 commit comments

Comments
 (0)