[m-dev.] [PATCH] MMAKE_USE_MMC_MAKE=yes fails with GNU make 3.82

Keri Harris keri at gentoo.org
Sat Nov 6 19:27:25 AEDT 2010

I've hit the following error when compiling Mercury when 
MMAKE_USE_MMC_MAKE=yes is defined:

gmake[2]: Entering directory `/var/tmp/portage/dev-lang/mercury-10.04.2-
../var/tmp/portage/dev-lang/mercury-10.04.2-r1/temp/mmake.EC5Sad:1773: *** 
mixed implicit and normal rules.  Stop.
gmake[2]: Leaving directory `/var/tmp/portage/dev-lang/mercury-10.04.2-
To clean up from failed install, remove /var/tmp/portage/dev-
gmake[1]: *** [install_grades] Error 1

mmake.EC5Sad:1173: $(ALL_MC_BUILD_FILES) %.err:
mmake.EC5Sad:1174:      $(MCM) $@

This is due to using GNU make version 3.82 which explicitely does not allow 
mixing implicit and normal rules. From the GNU make mailing list:

"The previous behavior of mixing implicit and pattern rules in one line
like that was never supported or documented, but due to a "hole" in the
parser it worked for certain specific cases (for example, reversing that
line so the pattern comes first would not work, nor would adding extra
explicit targets after the pattern target).

In 3.82, the parser was tightened in this respect and that "hole" was
closed, hence you see this error." [1]

Patch attached.



[1] http://www.mail-archive.com/bug-make@gnu.org/msg06220.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mercury-mmake-use-mmc.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20101106/440b8c80/attachment.bin>

More information about the developers mailing list