On Sat, Aug 18, 2012 at 11:31 AM, Rakesh Sharma <[email protected]> wrote:
> I am a new user of Make & my question is whether is it possible to generate a
> help sort of a message,
> or maybe, have a help target in the makefile, then when an invalid target is
> specified, make should
> just run the "make help" target.
I don't know what you mean by "invalid target", but the .DEFAULT
target might be a step towards what you want. To quote the info
pages:
`.DEFAULT'
The recipe specified for `.DEFAULT' is used for any target for
which no rules are found (either explicit rules or implicit rules).
*Note Last Resort::. If a `.DEFAULT' recipe is specified, every
file mentioned as a prerequisite, but not as a target in a rule,
will have that recipe executed on its behalf. *Note Implicit Rule
Search Algorithm: Implicit Rule Search.
The downside is that you'll need to list all valid prerequisites as
targets somewhere.
Philip Guenther
_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make