automake
[Top][All Lists]
Advanced

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

Re: Create a custom target


From: Ralf Wildenhues
Subject: Re: Create a custom target
Date: Sun, 6 Jul 2008 09:59:49 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

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 Makefile.am text is copied verbatim into the Makefile.in
(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




reply via email to

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