This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]