Boost logo

Boost-Build :

From: Kostas Kostiadis (kos_at_[hidden])
Date: 2006-12-20 11:21:17


Hello all,

I have a project, with an "output" directory for all intermediate files and
a "bin" directory for the executables.
What seems to happen is that my app gets linked twice...once so that the
executable goes into "output" and once during the install so that the
executable goes to "bin".

(In the following "output" is the $(OUTPUT_DIR) and "bin" is the
$(BUILD_DIR), which are defined in my project-root as path-constants)

Here's the Jamfile:

PROJECT_NAME = hello ;

project $(PROJECT_NAME)
    : default-build debug
    : build-dir $(OUTPUT_DIR)/$(PROJECT_NAME)
    ;

exe $(PROJECT_NAME) : hello.cpp ;

install executable : $(PROJECT_NAME)
                   : <install-dependencies>on <install-type>EXE
<location>$(BUILD_DIR)
                   ;

And here's the output when I build:

...found 16 targets...
...updating 8 targets...
MkDir1 /home/kos/kLab/output
MkDir1 /home/kos/kLab/output/hello
MkDir1 /home/kos/kLab/output/hello/gcc-4.1.1
MkDir1 /home/kos/kLab/output/hello/gcc-4.1.1/debug
gcc.compile.c++ /home/kos/kLab/output/hello/gcc-4.1.1/debug/hello.o
gcc.link /home/kos/kLab/output/hello/gcc-4.1.1/debug/hello
MkDir1 bin
gcc.link bin/hello
...updated 8 targets...

My intention was to only COPY the linked executable from "output" to
"bin"...not re-link it!
That's ok for "hello world" type programs, but for larger apps, linking
takes a while.

Any ideas how I can do this?

Cheers,
Kos.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk