|
Boost-Build : |
Subject: [Boost-build] implicit dependency not working !?
From: Meindert Oldenburger (meindert66_at_[hidden])
Date: 2011-09-14 06:07:31
An implicit dependency to version_o, in libgen project, does not result in
an include statement during compilation of .c files.
When i make a "implicit-dependency" to version.h it is working, but then i
become static and dynamic headers, and then i have to rebuild the whole
project twice before everything is compiled and linked.
Is there some special with "implicit-dependency" ? Sometimes bjam is hard to
understand.
WORKAROUND possibilities: Is there a possibility to ask the build directory
path, where versio.* are compiled, then i could do: obj version_o :
version.c : <cflags>-fPIC <link>static : : <include> BUILDDIR ;
and then using: <use>../version//version_o in libgen.
Regards,
Meindert
########### version PROJECT
#
# This project generates version.c version.h version_o.o
#
##########
exe genversion : genversion.c : <define>VERSIONDIR=. ;
#make version.h : genversion version.$(CURBU).def : @make_version_c_h ;
make version.c : genversion version.$(CURBU).def : @make_version_c_h ;
actions make_version_c_h { $(>[1]) -p $(>[1]:P) -d $(>[2]) }
# only make the static version
obj version_o : version.c : <cflags>-fPIC <link>static ;
########### gen PROJECT
#
# Just a generic lib
#
#############################
project
: requirements
<toolset>msvc:<linkflags>"/NODEFAULTLIB:libcmt.lib
/NODEFAULTLIB:libcmtd.lib"
<implicit-dependency>../etc/rms//messages.h
<include>../include
;
alias gen_src
:
util/geninit.c
util/thread.c
../version//version_o
and//and
cdt//cdt
frm//frm
licence//licence
mm//mm
mon//mon
pref//pref
proc//proc
regex//regex
rms//rms
util//util
xml//xml
# TODO why is a part of gen build somewhere else ?
../api/wfd//wfd
:
<use>/site-config//LIBXML2
<use>/site-config//LIBZLIB
# <implicit-dependency>../version//version_o
: :
<source>/site-config//LIBXML2
;
lib gen_static
:
gen_src
:
<link>static
<implicit-dependency>../version//version_o
: :
# for external source, because gen also needs xml2
<source>/site-config//LIBZLIB
;
lib gen
:
gen_src
:
<implicit-dependency>../version//version_o
<def-file>gen.def
<use>/site-config//LIBZLIB/<runtime-link>shared
: :
;
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