| On Thu, Jul 06, 2000 at 07:16:05PM +0200, Akim Demaille wrote:
| : Look at what Zsh guys are doing:
| :
| : configure:
| :
| : | dnl The standard config.status is missing some essential features.
| : | dnl So add them now. See the comment at the end of Src/mkmakemod.sh.
| : | [rm -f $CONFIG_STATUS.old
| : | cp $CONFIG_STATUS $CONFIG_STATUS.old
| : | sed '1,$s@^\( *ac_file_inputs=\).*$@\1`echo $ac_file_in | sed -e "s%^%:%" -e
|"s%:\\([^!]\\)% $ac_given_srcdir/\\1%g" -e "s%:!% %"`@' \
| : | $CONFIG_STATUS.old >$CONFIG_STATUS
| : | rm -f $CONFIG_STATUS.old]
|
| Supporting this, with the new patch would be to add something like this to
| config.status:
|
| ac_file_inputs=`IFS=:
| for f in $ac_file_in; do
| case "$f" in
| -) echo $tmp/stdin ;;
| + !*) echo $f | cut -c2- ;;
| *) echo $ac_given_srcdir/$f ;;
| esac
| done`
Wow! That's great!
| Use sed if cut isn't portable. Anyways, I don't like using ! to tag the
| builddir files because ! and bash (interactive at least) is a whole other
| chapter...
I don't know the status of cut, I guess we will expr this. Unless
someone knows for sure?
| What could be done is to implicit prefer builddir-sources to srcdir-sources,
| but because there would be some "magic" involved (test -f) the behaviour
| could be perceived to be inconsistent, so an explicit tag is probably the
| best idea...
Yep, personally, I like better the fact you control it. Nevertheless,
maybe some people will want that, in which case, following your steps:
| ac_file_inputs=`IFS=:
| for f in $ac_file_in; do
| case "$f" in
| -) echo $tmp/stdin ;;
| + !*) if test -f $ac_given_srcdir/$f; then
echo $ac_given_srcdir/
else
echo $f | cut -c2- ;;
fi
| *) echo $ac_given_srcdir/$f ;;
| esac
| done`
or support `!' as in your proposal above, and `?' as here?
Don't know.