[Top][All Lists]

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

Re: Copying build results to another directory

From: Tom Tromey
Subject: Re: Copying build results to another directory
Date: 26 Jul 2001 17:32:17 -0600

>>>>> "Richard" == Richard Carlson <address@hidden> writes:

Richard> noinst_PROGRAMS = hello
Richard> hello_SOURCES = hello.c

Try something like this:

all-local: hello
        cp hello someplace

Richard>        cp -p hello $(top_srcdir)/bin

In general you don't want to put anything in srcdir.
You particularly don't want to copy an executable there.
Instead use $(top_builddir).

Richard> The problem with this is that I'd like the binary to be
Richard> copied when I solely build 'hello', as in "make hello".

There's no really good way to do this.

You can make it work by introducing your own `hello' target which
does the link itself and then does the copy.

Or you can name the executable differently in the build tree:

noinst_PROGRAMS = hellox
hellox_SOURCES = hello.c

all-local: hello

hello: hellox
        cp hellox $(top_builddir)/bin/hello

Why do you want to copy things around during the build?
Why not just use them where they lie?


reply via email to

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