[Top][All Lists]

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

Help on command overriding

From: Thomas Martitz
Subject: Help on command overriding
Date: Sat, 5 Mar 2016 10:48:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0


I would like to accomplish overriding commands without getting the warning "warning: overriding recipe for target".

The makefile I'm working with is generated (by automake). I want to override its target commands.

Essentially, my Makefile looks like $(libfoo_la_OBJECTS) $(libfoo_la_DEPENDENCIES) $(EXTRA_libfoo_la_DEPENDENCIES)
  $(LINK) [...]

local_targets =
  $(MAKE) -C .. foo/$@

The default behavior is to ignore the first recipes and only execute the latter. This is exactly what I want, however make always issues the warning:
Makefile:1219: warning: overriding recipe for target ''
Makefile:762: warning: ignoring old recipe for target ''

Is there a better way to do this, or at least a way to disable the warning (ideally only for the target)?

PS: I know that if I write out "" verbatim, then automake will not generate the automatic rules for However, in my system I need the indirection via $(local_targets) which automake doesn't evaluate.

Best regards.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]