diff options
author | Akim Demaille <akim@epita.fr> | 2001-06-21 09:18:16 +0000 |
---|---|---|
committer | Akim Demaille <akim@epita.fr> | 2001-06-21 09:18:16 +0000 |
commit | 21c5ee474bc14af7573dff87f17ec8d43c9fcb65 (patch) | |
tree | 649b2ee8864dcfb53178d3ac70c825b59f1e4679 /doc | |
parent | 2720ecff8634a6dbc30fa43ac8c5b89e46a6534b (diff) | |
download | autoconf-21c5ee474bc14af7573dff87f17ec8d43c9fcb65.tar.gz |
./configure --program-suffix=foo produces `transform=s,$$,foo,;',
but some sed choke on multiple `;', and other tools (e.g.,
Automake), include the separator themselves.
* acgeneral.m4 (AC_ARG_VAR): Be sure not to leave extra `;'.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/autoconf.texi | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/autoconf.texi b/doc/autoconf.texi index ae8f6665..63358a42 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8431,6 +8431,14 @@ of a character class. In conformance with @sc{posix}, the Cray Sed scripts should not use branch labels longer than 8 characters and should not contain comments. +Don't include extra @samp{;}, as some @command{sed}, such as NetBSD +1.4.2's, try to interpret the second as a command: + +@example +$ echo a | sed 's/x/x/;;s/x/x/' +sed: 1: "s/x/x/;;s/x/x/": invalid command code ; +@end example + Input should have reasonably long lines, since some @command{sed} have an input buffer limited to 4000 bytes. @@ -9078,10 +9086,12 @@ the same name. For example, if you configure @sc{gnu} @code{diff} with installed as @file{/usr/local/bin/gdiff}. As a more sophisticated example, you could use + @example --program-transform-name='s/^/g/; s/^gg/g/; s/^gless/less/' @end example @noindent + to prepend @samp{g} to most of the program names in a source tree, excepting those like @code{gdb} that already have one and those like @code{less} and @code{lesskey} that aren't @sc{gnu} programs. (That is @@ -9130,6 +9140,15 @@ uninstall: done @end example +It is guaranteed that @code{program_transform_name} is never empty, and +that there are no useless separators. Therefore you may safely embed +@code{program_transform_name} within a sed program using @samp{;}: + +@example +transform = @@program_transform_name@@ +transform_exe = s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/ +@end example + Whether to do the transformations on documentation files (Texinfo or @code{man}) is a tricky question; there seems to be no perfect answer, due to the several reasons for name transforming. Documentation is not |