Re: (toplevel patch) Deal with multilib.out. Really.

Raja R Harinath
2002-12-20T05:57:08Z

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