This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch] cleanup target makefile frag collection in toplevel
- From: DJ Delorie <dj at redhat dot com>
- To: neroden at doctormoo dot dyndns dot org
- Cc: gcc-patches at gcc dot gnu dot org, gdb-patches at sources dot redhat dot com, binutils at sources dot redhat dot com
- Date: Wed, 19 Jun 2002 20:11:47 -0400
- Subject: Re: [patch] cleanup target makefile frag collection in toplevel
- References: <20020525182125.GA22642@doctormoo.dyndns.org>
> 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?