On Thu, Jan 30, 2014 at 10:16:06PM +0100, Yann Dirson wrote: > On Thu, Jan 30, 2014 at 09:53:59PM +0100, Yann Dirson wrote: > > > > And without even trying to touch this, I also have > > > > another problem to deal with, where requesting my native binary > > > > triggers some sort of default rule attempting to build the binary in > > > > one step directly from the C source, with the cross-cc and wrong flags. > > > > > > > > > > If it is running the wrong rule make sure there is an explicit rule > > > for the target in the makefile. > > > > Yep, going on a hunt :) > > Well, in fact it *is* the implicit rule triggering, and the problem is > I'm cross-building for win32 and haven't separated a BUILD_EXEEXT for > now, so it expects my native tools to end with .exe. Not too hard to > work on :) >
I have pushed my current work on github[1]. Still very much a prototype for comments. https://github.com/ydirson/automake/commits/native Tested with the following changes to gnushogi master: -noinst_PROGRAMS = pat2inc sizetest +native_PROGRAMS = pat2inc +noinst_PROGRAMS = sizetest +BUILD_CCLD = $(BUILD_CC) +pat2inc_CC = $(BUILD_CC) I'm quite happy that there is nothing to override per-target for the link rule, and still feel the "= $(BUILD_CC)" should not be necessary. What do you think of the general idea ? What suggestions would you have for a better implementation ? Best regards, -- Yann