| A unified solution is certainly desirable. But perhaps we should find
| out how urgent a solution to this problem is before you decide to take
| on this problem for the next release. DJGPP's Bash has a solution
| (TEST_FINDS_EXE as mentioned), Cygwin (I've been told) has a similiar
| solution, and I don't know about EMX.
I don't really thin EMX is fundamental right now. Sure it is in the
plans, but not a reason to delay 2.51. I would accept patches, but
won't work on it.
So OK, I feel better: currently, thanks to efforts from both sides,
IIUC, everything is fine, isn't it?
| I ran autoheader with '-d' to preserve traces.sh.
|
| traces.sh:
| m4trace:c:/djgpp/tmp/ac7778/stdin:2: -1- AC_CONFIG_HEADERS(config.h)
| m4trace:c:/djgpp/tmp/ac7778/stdin:3: -1- AC_DEFINE(this, "whatever you
| want.")
Puke puke puke! Bloody colons in file names :( I'm surprised that
the `autoconf --trace' test didn't fail for you! The expected output
is...
~ace/tests % cat /tmp/ah24362/traces.sh nostromo 9:28
config_h="config.h"
syms="$syms this"
somewhat different :(
I'm open to proposals. The weak part of the chain is in autoconf.sh:
# Run m4 on the input file to get traces.
$verbose "Running $run_m4_trace $infile | $M4 $tmp/trace.m4" >&2
$run_m4_trace $infile 2>&1 >/dev/null |
sed -e 's/^m4trace:\([^:][^:]*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)- \([^(][^
(]*\)(\(.*\)$/AT_\4([\1], [\2], [\3], [\4], \5/' \
-e 's/^m4trace:\([^:][^:]*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)- \(.*\)$/
AT_\4([\1], [\2], [\3], [\4])/' |
the sed stuff transforms the output from m4 --trace into something
which m4 can process. Here is a sample input:
~ace % m4 -t AC_SUBST -daqfl -R autoconf.m4f configure.in >/dev/null
m4trace:configure.in:3: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
m4trace:configure.in:3: -1- AC_SUBST([exec_prefix], [NONE])
m4trace:configure.in:3: -1- AC_SUBST([prefix], [NONE])
m4trace:configure.in:3: -1- AC_SUBST([program_transform_name], [s,x,x,])
m4trace:configure.in:3: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
m4trace:configure.in:3: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
m4trace:configure.in:3: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
m4trace:configure.in:3: -1- AC_SUBST([datadir], ['${prefix}/share'])
m4trace:configure.in:3: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
m4trace:configure.in:3: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
m4trace:configure.in:3: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
m4trace:configure.in:3: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
m4trace:configure.in:3: -1- AC_SUBST([includedir], ['${prefix}/include'])
m4trace:configure.in:3: -1- AC_SUBST([oldincludedir], ['/usr/include'])
m4trace:configure.in:3: -1- AC_SUBST([infodir], ['${prefix}/info'])
m4trace:configure.in:3: -1- AC_SUBST([mandir], ['${prefix}/man'])
m4trace:configure.in:3: -1- AC_SUBST([ECHO_C])
m4trace:configure.in:3: -1- AC_SUBST([ECHO_N])
m4trace:configure.in:3: -1- AC_SUBST([ECHO_T])
m4trace:configure.in:3: -1- AC_SUBST([CFLAGS])
m4trace:configure.in:3: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:3: -1- AC_SUBST([CXXFLAGS])
m4trace:configure.in:3: -1- AC_SUBST([FFLAGS])
m4trace:configure.in:3: -1- AC_SUBST([DEFS])
m4trace:configure.in:3: -1- AC_SUBST([LDFLAGS])
m4trace:configure.in:3: -1- AC_SUBST([LIBS])
m4trace:configure.in:20: -1- AC_SUBST([M4])
m4trace:configure.in:23: -1- AC_SUBST([AWK])
m4trace:configure.in:29: -1- AC_SUBST([PERL])
m4trace:configure.in:30: -1- AC_SUBST([PERL])
m4trace:configure.in:31: -1- AC_SUBST([PERLSCRIPTS])
m4trace:configure.in:38: -1- AC_SUBST([INSTALL_PROGRAM])
m4trace:configure.in:38: -1- AC_SUBST([INSTALL_SCRIPT])
m4trace:configure.in:38: -1- AC_SUBST([INSTALL_DATA])
m4trace:configure.in:42: -1- AC_SUBST([standards_texi], [standards.texi])
I suppose we can relax the requirements over the colons in the
filename. What do people think about
sed -e 's/^m4trace:\(..*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)- \([^(][^
(]*\)(\(.*\)$/AT_\4([\1], [\2], [\3], [\4], \5/' \
-e 's/^m4trace:\(..*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)- \(.*\)$/
AT_\4([\1], [\2], [\3], [\4])/' |
instead? Mark, could you check that it fixes your problem? Or maybe
we should be more severe and use
\(.:..*\) and \([^:][^:]*\)
(alternation is not portable, but we can use two lines)?
Don't know.
Akim