Re: subdirs.am and $(RECURSIVE_TARGETS)
Akim> Not only to I find this more pleasant, but most importantly it's Akim> a win for Automake (we can have more modular *.am files which Akim> register their own recursive targets), and it's a win for users Akim> who can += on RECURSIVE_TARGETS. >> In the not-too-distant past, you couldn't `+=' an >> internally-defined variable. And you still can't -- I forgot. I've thought about this more and I'd rather we not use a variable for internal targets. If we want a variable for the user then that is fine. Derek> RECURSIVE_TARGETS += mytarget For this to be really nice I think we'd have to automatically add `mytarget-recursive' and `mytarget' to any Makefile.am beneath the defining Makefile.am. However, this turns out to be hard because we won't know about it when building a single Makefile.in. One approach would be to require recursive targets to be defined in configure.in. But that is pretty heavy. Tom
Re: subdirs.am and $(RECURSIVE_TARGETS)
On Sat, Feb 24, 2001 at 01:36:59PM -0500, Derek R. Price wrote: > > i.e. a user should be able to add > > RECURSIVE_TARGETS += mytarget I agree, but up to now I couldn't find any beautiful means to do this. It would mean to add some magic, which I am reluctant to do.
Re: subdirs.am and $(RECURSIVE_TARGETS)
Tom Tromey wrote: > > "Akim" == akim <[EMAIL PROTECTED]> writes: > > Akim> I wonder why we have a hard coded list list this in subdirs.am: > Akim> [ ... -recursive targets ... ] > > Historical reasons only, ie, I never thought of it. > > Akim> Not only to I find this more pleasant, but most importantly it's > Akim> a win for Automake (we can have more modular *.am files which > Akim> register their own recursive targets), and it's a win for users > Akim> who can += on RECURSIVE_TARGETS. > > In the not-too-distant past, you couldn't `+=' an internally-defined > variable. I feel the need to point out that the -recursive portions of the targets in the RECURSIVE_TARGETS macro seem somewhat redundant since users would be required to end any new targets they wished to add to RECURSIVE_TARGETS with the same string due to the way recursive targets are defined. i.e. a user should be able to add RECURSIVE_TARGETS += mytarget thus implicitly defining mytarget & mytarget-recursive, and mytarget would call mytarget-local, mytarget-recursive, & mytarget-hook as appropriate. Of course I don't have my head nearly deep enough in those implementation details at the moment to even start detailing how I would code the above. Derek -- Derek Price CVS Solutions Architect ( http://CVSHome.org ) mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com ) -- "Very funny Scotty, now beam down my clothes!"
Re: subdirs.am and $(RECURSIVE_TARGETS)
> "Akim" == akim <[EMAIL PROTECTED]> writes: Akim> I wonder why we have a hard coded list list this in subdirs.am: Akim> [ ... -recursive targets ... ] Historical reasons only, ie, I never thought of it. Akim> Not only to I find this more pleasant, but most importantly it's Akim> a win for Automake (we can have more modular *.am files which Akim> register their own recursive targets), and it's a win for users Akim> who can += on RECURSIVE_TARGETS. In the not-too-distant past, you couldn't `+=' an internally-defined variable. Tom
subdirs.am and $(RECURSIVE_TARGETS)
(Hm, I think I killed my message instead of sending it :( Sorry if multiple copies). I wonder why we have a hard coded list list this in subdirs.am: .PHONY: all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \ check-recursive installcheck-recursive info-recursive dvi-recursive all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \ check-recursive installcheck-recursive info-recursive dvi-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ etc. instead of RECURSIVE_TARGETS = all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \ check-recursive installcheck-recursive info-recursive dvi-recursive .PHONY: $(RECURSIVE_TARGETS) $(RECURSIVE_TARGETS): @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ etc. Not only to I find this more pleasant, but most importantly it's a win for Automake (we can have more modular *.am files which register their own recursive targets), and it's a win for users who can += on RECURSIVE_TARGETS. I might have missed something obvious, please no flame :)