This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: java parallel make patch


On Aug 30, 2000, Mike Stump <mrs@windriver.com> wrote:

> I wasn't going to use $@ as it wasn't portable last I checked

$@ is portable, it is $< that is only portable in suffix rules.  But
it expands to one target that triggered the rule, not to all potential
targets of it.  I.e., writing:

all : foo bar
foo bar : baz
        echo $@

will print foo and bar in two separate lines (assuming both are
out-of-date).  It's no different from writing:

all : foo bar
foo : baz
        echo foo
bar : baz
        echo bar

> I don't know if this is the best way to solve the problem

It doesn't appear to solve the problem to me.  It still contains a set
of files depending on the same set of sources.  So, if the top-level
make decides that at least two of them are out-of-date, it will
trigger the rule for the recursive invocation of make, and you may end
up with two or more concurrent makes attempting to build the same
files, unless their dependencies are disjoint.

The only way I see to remove this problem is to arrange for a library
(or a stamp file) to be built out of all shared sources, and add a
dependency on this library to all programs that currently depend on
the sources.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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