Commit Graph

8 Commits

Author SHA1 Message Date
Gary V. Vaughan
6b55376125 * config/general.m4sh (sed_double_backslash): Undo an
over-optimisation.
2004-10-22 07:58:24 +00:00
Noah Misch
443bae7dd9 * config/general.m4sh (sed_double_backslash): Improve this sed
expression to correct left anchored $ input to
double_quote_subst, as well as backslash escaped $ preceded by
any odd-numbered amount of  characters.
2004-10-21 16:54:54 +00:00
Gary V. Vaughan
ff7eac153d * config/general.m4sh (sed_double_backslash): New sed expression
to escape $ properly in combination with double_quote_subst.
(func_quote_for_eval): Four space indent margin for functions!
(func_quote_for_expand): Use $sed_double_backslash.
(func_show_eval): New function that echos an escaped but variable
expanded command, and then evaluates it.
2004-10-20 20:43:58 +00:00
Noah Misch
ba1e69caa4 * m4/libtool.m4 (sed_quote_subst): Remove superfluous backslashes
from the match character set.
(double_quote_subst): Ditto.
* lib/general.m4sh (sed_quote_subst): Ditto.
(double_quote_subst): New variable, copied from
m4/libtool.m4. Much the same as sed_quote_subst, but variable
references are not quoted.
(func_quote_for_eval): Given any $foo; $bar and
$foo must be identical after the following commands:
    func_quote_for_eval "$foo"
    eval "bar=$func_quote_for_eval_result"
(func_quote_for_expand): In a similar vein to to func_quote_for_eval,
except that variable expansions are not protected when quoting the
command for subsequent display.
* config/ltmain.m4sh: Factor away use of $sed_quote_subst now that
it has been subsumed into func_quote_for_eval.
(func_mode_link): Instead of `2004-10-14 Peter O'Gorman' below,
use func_quote_for_expand so that ${wl} is expanded properly in
the $show expression.
2004-10-20 08:45:10 +00:00
Gary V. Vaughan
20c92bbee3 Fix some issues that mangled the reexecution path to a script,
and thus prevented it from finding itself:

* config/general.m4sh (progname): Don't actually change the name
of the script if it begins with a `-', just prepend `./'.
(progpath): Add a new clause that first searches the execution
PATH, and then finally assumes this script is in the current
working directory if $progname has no directory separators (e.g
when invoked as `$SHELL progname').
2004-10-08 17:01:49 +00:00
Gary V. Vaughan
d7c85ee5b0 * config/general.m4sh (func_verbose): Work around a bash bug in
shell functions.
2004-10-08 16:39:55 +00:00
Gary V. Vaughan
fc4e513ee0 * config/general.m4sh (Xsed): Set a default when not used from
ltmain.in.
(ECHO): Audit for (and correct!) uses of $ECHO with more than one
argument, which breaks when ECHO='printf %sn', and with possible
`-' as first character of the argument, which breaks `print -r'
and some implementations of `echo'.
* config/ltmain.in, tests/defs.in, libtoolize.in (ECHO): Ditto.
Reported by Albert Chin-A-Young <china@thewrittenword.com>
2004-09-24 16:08:33 +00:00
Gary V. Vaughan
bfce27f524 * configure.ac (M4SH): AC_SUBST m4sh expander.
* config/general.m4sh, config/getopt.m4sh: New files with factored
out functionality from...
* config/ltmain.in, libtoolize.in: ...here.  m4_include the shared
code, and call AS_SHELL_SANITIZE.  Also quote all `[' and `]' to
survive m4 run.
(func_serial): No need to double up m4sh quotes after a `#'.
(func_check_macros): Escape `dnl' to stop m4sh interpreting it as
a macro.
* tests/defs.in: New file expanded into tests/defs by autom4te.
* m4/libtool.m4 (_LT_DECL_EGREP): Also require fgrep for the tests
that use it.
* Makefile.am ($(top_srcdir)/config/ltmain.sh): Now built with
M4SH.
(libtoolize): Ditto.
* bootstrap: Set M4SH for call to make.
* HACKING: No need to sync to AS_SHELL_SANITIZE by hand any more.
2004-09-23 01:16:41 +00:00