[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Quilt and patches directory



В Mon, 15 Sep 2008 21:28:54 +0200, Michael Biebl написа:

> I didn't know that
> foo: bar baz
> will result in bar/baz run in parallel. I thought there is some kind of
> guarantee that bar is processed first.

Consider this example which illustrates that it's not a safe
assumption to make always even with non-parallel make:

cat > makefile <<'EOF'
do-%: bar-% baz-%
	@true

bar-%:
	@echo I am first!

baz-foo:
	@echo I should be second.

baz-frob:
	@echo Something else.
EOF

$ make do-foo
I should be second.
I am first!

$ make -j2 do-foo
I should be second.
I am first!

$ make do-frob
Something else.
I am first!

When pattern rules come to the picture, and a pattern rule has
prerequisites which exist or are explicitly mentioned like here, they
always take precedence.  You just have to be careful.


Reply to: