[patch] cleanup target makefile frag collection in toplevel
DJ Delorie
dj@redhat.com
Wed Jun 19 17:11:00 GMT 2002
> 2002-05-22 Nathanael C. Nerode <neroden@twcny.rr.com>
> * configure.in: Clean up target makefile fragment collection.
> --- 1302,1316 ----
> fi
>
> rm -f mt-frag
> ! for f in ${target_makefile_frag} ${alpha_frag} ${ospace_frag} ; do
> ! if test $f != /dev/null ; then
> cat ${srcdir}/$f >> mt-frag
> ! fi
> ! done
> ! if test -n "${target_makefile_frag}${alpha_frag}${ospace_frag}" ; then
> target_makefile_frag=mt-frag
> + else
> + target_makefile_frag=
> fi
>
> case "$host" in
>
Me thinks you need the "for" inside the "if test -n". If all three
variables are empty, the for will fail with a syntax error.
You do, however, preset them all to /dev/null, which means the "if
test -n" will never be false, and is thus superfluous. Although, on
platforms with no real /dev/null (I don't know of any at the moment,
but still), reading from /dev/null (a file) may give you back whatever
was thrown away last time output was redirected to /dev/null.
Could you pick one way or the other and update the patch?
More information about the Binutils
mailing list