Subject: Parallel make with -DDEFINE is not parallel
To: None <tech-userlevel@NetBSD.org>
From: Stuart Brooks <stuartb@cat.co.za>
List: tech-userlevel
Date: 01/06/2005 18:06:36
This is a multi-part message in MIME format.

------=_NextPart_000_0216_01C4F41A.7652EE50
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I have been messing around using parallel makefiles and it seemed to be
working fine until I tried passing a define (-D) through to a second
makefile.

A stripped down example demonstrates this...

>>> Master makefile:
all:
    cd subdir && make -j 4

If I just run the make without any parameters it runs perfectly and 4 jobs
are performed in parallel.

If however I run it as follows, it only runs one job at a time:
make -DSOME_DEFINE

For some reason, passing in the define seems to negate the "-j 4" and I
can't work out why. Is this a bug or a feature? :)

Any pointers would be appreciated,
 Stuart

PS. I have attached a sample directory structure which illustrates this







------=_NextPart_000_0216_01C4F41A.7652EE50
Content-Type: application/octet-stream;
	name="parallelmake.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="parallelmake.tgz"

H4sIAEdc3UEAA+2Z3W6CQBCFuXWfYq5Mq9HuL5vYh2kooKEFIQhNmqZ99rKIWFJqY4pLGue7QJez
GyYOZyezZl7uxXEYJ95zeOdcBpBUKwUOGGj9yeRh3NxklLmaKyW5W6lMK+6AulA8Hcpd4eUATp6m
xel5Yb6zEZBdsq/535WPQZQP/hqckX+XalapgguN+bdBX/4LtvSzbLhnMEpdKU/kX/DW/0pTowpe
+Z8OF8LPXHn+o20BiRdtb27JG5nkYVHmW6D35J2MHRligz7/m+/rKA6HesZv/hfMPe7/rqpURZlG
/9uAkCr9K6i2/BQKbi7CXOQyJZPNfA6LFJLXBy/LeqcQc7NeXRWMZoF/GBIzeWWWdETeiKIWRVcU
jShrUXbF/ZD4cehtV9VmlcBiDbNlG+HsY+xf8//RW/+55frPdFv/XSr29V+g/23wkkYBBCmv6z8W
/auj1/9iRP+zxv8K/W+Dxv8C/X+d9Ppfjuh/rmr/C4b+t0Hjf4n+v046/h+68W/41f9aHft/Zs7/
haJY/61gun8y8QPY7/0wnYJ5C2DxBPLYan/Xa2Xs4JE/0+v/gc9Rzjn/l7z+/8fV2P9bofX/poy6
5h87MgRBEARBEOQSfAIUSziTACgAAA==

------=_NextPart_000_0216_01C4F41A.7652EE50--