This is the mail archive of the automake@gnu.org mailing list for the automake project.


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

Re: Plan for single Makefile


On Sun, Jul 29, 2001 at 12:57:40AM +1000, Robert Collins wrote:
> 
> [Eric Siegerman wrote:]
> > So how about this?  Write a Makefile in each subdirectory, that:
> >   - includes all the dependency and command info from the
> >     entire project
> >   - relocates directory paths to make sense from the directory in
> >     question
> >   - customizes the phony targets to include only the ones from
> >     that directory and below
> > 
> > 1a\Makefile would look like:
> > 	ROOT = ..
> > 	include $(ROOT)/Makefile
> > 
> 
> IIRC include is one of the not-as-portable-as-it-could-be make features.

You're absolutely right.  The whole-project dependencies and
rebuild rules should be incorporated bodily into each directory's
Makefile, NOT pulled in via "include".

(That's what I meant to say all along.  My first thought had been
to use "include", but then I realized that was a bad idea.  In
rewriting my post to remove references to "include", I missed one
or two.  Sorry for the confusion.

My example 1a\Makefile should have read:
	ROOT = ..	# Not sure if this is needed, but it couldn't hurt

	all: ...

	install: ...

	# big mess of dependencies and commands; identical in all
	# Makefile's, except for the directory prefixes.
)

> I was aiming to only use the Makefile features used by automake today..

A worthy goal.

--

|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        erics@telepres.com
|  |  /
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea.
	- RFC 1925 (quoting an unnamed source)


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