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) Fix multilib.out dependencies and related problems


> In other words, when multilib.out is considered 'out of date' and
> needs to be rebuilt, its rule is run.  But if that rule doesn't
> change the datestamp on multilib.out, Make decides that the things
> depending on multilib.out, such as foo/Makefile, *don't* need to be
> rebuilt.

Yup.  See gcc's Makefile for examples of how to do this.
They do it like this:

multilib.out : multilib.ts ; @true
multilib.ts : [dependencies]
	foo > multilib.tmp
	$(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out
	echo timestamp > multilib.ts

The other multilib.out targets just depend on multilib.out:

$target/[module]/multlib.out : multilib.out
	cp multilib.out $target/[module]/multilib.out


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