This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: (toplevel patch) Deal with multilib.out. Really.
- From: Raja R Harinath <harinath at cs dot umn dot edu>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: gcc-patches at gcc dot gnu dot org, dj at redhat dot com, binutils at sources dot redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Thu, 19 Dec 2002 23:56:11 -0600
- Subject: Re: (toplevel patch) Deal with multilib.out. Really.
- References: <20021220022225.GA2130@doctormoo>
Hi,
Nathanael Nerode <neroden@twcny.rr.com> writes:
> +# Multilib.out tells target dirs what multilibs they should build.
> +# There is really only one copy. We use the 'timestamp' method to
> +# work around various timestamp bugs on some systems.
> +# We use move-if-change so that it's only considered updated when it
> +# actually changes, because it has to depend on a phony target.
> +multilib.out: multilib.ts
> + @true
To round out this idiom, this should be
multilib.out: multilib.ts
@if test -f multilib.out; then :; \
else rm -f multilib.ts; $(MAKE) multilib.ts; fi
So that
rm multilib.out
make
works.
Also, IIRC discussions on the automake list about the use of 'then :;
else' form rather than 'test ! -f' -- some shells use the exit code of
the 'if' test when they fall through a missing 'else' clause.
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu