All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jiří Paleček" <jpalecek@web.de>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: ltp-list@lists.sourceforge.net, Mike Frysinger <vapier@gentoo.org>
Subject: Re: [LTP] [PATCH] Support for parallel compilation
Date: Sat, 19 Dec 2009 03:05:45 +0100	[thread overview]
Message-ID: <op.u45xfvwou2flwt@debian> (raw)
In-Reply-To: <364299f40912050001k12c39c45sa5b870851ca915ad@mail.gmail.com>

Hello,

On Sat, 05 Dec 2009 09:01:52 +0100, Garrett Cooper <yanegomi@gmail.com>  
wrote:

> On Fri, Dec 4, 2009 at 4:03 PM, Jiří Paleček <jpalecek@web.de> wrote:
>> On Fri, 04 Dec 2009 20:13:11 +0100, Mike Frysinger <vapier@gentoo.org>
>> wrote:
>>
>>> On Friday 04 December 2009 12:04:06 Jiri Palecek wrote:
>>>> -.PHONY: $(RECURSIVE_TARGETS) $(addprefix trunk-,$(RECURSIVE_TARGETS))
>>>> +.PHONY: $(RECURSIVE_TARGETS) $(addprefix trunk-,$(RECURSIVE_TARGETS))
>>>>  $(foreach tgt,$(RECURSIVE_TARGETS),$(addprefix
>>>>  trunk-subdir-$(tgt)--,$(SUBDIRS)))
>>>
>>> these foreach look like an overly complicated form of $(patsubst):
>>>       $(patsubst %,moo_%,$(DIRS))
>>
>> It may look like it, but they aren't. What you've written is a simple
>> addprefix, while the foreach does some for of cartesian product
>> ($(TARGETS)x$(DIRS)).
>
> 1. I checked in the fixes for the autotools targets after verifying
> them (thank you btw!).
> 2. Inline mkdirs are bad, because mkdir's can fail or cause failures
> over NFS due to excessive I/O, which is why I quickly removed the test
> -d || mkdir -p logic in the 2nd major draft of the makefile
> infrastructure.

OK.

> 3. Although your idea for fixing the lack of recursive make'ing is
> good, what about this instead?
>
> #
> # A canned set of operations for leaf makes. This creates a series of
> targets, like:
> #
> # $(subdir)-all $(subdir)-clean $(subdir)-install:
> #
> # 1 - Recursive targets to act upon.
> # 2 - the subdirectory to do the leaf_make on.
> #
> define generate_dir_dep
> ifndef __$(1)_dir_dep__
> __$(1)_dir_dep__ = 1
> $(1):
>         mkdir -p "$$@"
> endif
> endif
>
> define leaf_make
> $$(foreach recursive_target,$(1),$$(addprefix
> $(2)-$$(recursive_target))): $(1)-%: $(2)
>       $(MAKE) -C $* -f ""$(abs_srcdir)/$$*/Makefile" $$(patsubst  
> $(1)-%,%,$$@)
> endef
> $(foreach subdir $(SUBDIRS),$(eval $(call generate_dir_dep,$(subdir))))
> $(foreach subdir,$(SUBDIRS),$(eval $(call leaf_make
> $(RECURSIVE_TARGETS),$(subdir))
>
> Ultimately I suppose, it's another means to a similar end. It's just a
> bit more discrete as to what's going on in the operation... if this is
> a good idea, I'll modify functions.mk to match this. $(abspath) //
> $(realpath) junk is already a PITA, so it might be a good idea just to
> remove it in favor of keeping things as-is.

Well, I can't say I got used to your generated rules and double dollars  
(you've got $* instead of $$* in the above IMHO). But if you deem it  
better, fine by me.

Regards
     Jiri Palecek

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2009-12-19  2:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4b1944a0.8713f30a.3b2f.4a0fSMTPIN_ADDED@mx.google.com>
2009-12-04 19:13 ` [LTP] [PATCH] Support for parallel compilation Mike Frysinger
2009-12-05  0:03   ` Jiří Paleček
2009-12-05  8:01     ` Garrett Cooper
2009-12-19  2:05       ` Jiří Paleček [this message]
2009-12-19  4:30         ` Garrett Cooper
2009-12-04 17:04 Jiri Palecek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.u45xfvwou2flwt@debian \
    --to=jpalecek@web.de \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=vapier@gentoo.org \
    --cc=yanegomi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.