[Top][All Lists]

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

Re: Create a custom target

From: automake
Subject: Re: Create a custom target
Date: Wed, 22 Apr 2009 19:54:20 -0700 (PDT)

 I have a similar problem with giving a customized target. I have included
target into



But the default target for makefiles from is all.  Is there a
way to add this target to all sub-targets?

Ralf Wildenhues wrote:
> Hello Tavian,
> * Tavian Barnes wrote on Sun, Jul 06, 2008 at 07:28:30AM CEST:
>> Hi, guys.  I have a question: how do I create a custom target, and
>> selectively compile some code, and run the compiled executable, when
>> this target is chosen?  Specifically, I have a benchmarking suite for
>> a library I wrote, and I want to compile the code in the bench/
>> directory, and run the executable, when the user types 'make bench'.
>> I tried looking this up in the manual, but couldn't find it; sorry if
>> I missed something obvious.
> Most of the text is copied verbatim into the
> (and from there into the Makefile).  So if you want to add custom
> targets, just write plain make rules:
> bench: prerequisites...
>       ... compile
>       ...
> .PHONY: bench
> Cheers,
> Ralf

View this message in context:
Sent from the Gnu - Automake - General mailing list archive at

reply via email to

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