|
Boost-Build : |
From: Fabien Chêne (fabien.chene_at_[hidden])
Date: 2006-09-27 19:28:42
Hi,
After a discussion on fr.comp.lang.c++ about Boost.[Build/Jam], James
Kanze pointed out that dependant macros do not cause dependencies.
According to §16.2.4, the following code is legal C++, and Boost.Jam
don't care about toto.hpp as a dependency :
cat toto.cpp
//------------------------------
#define DEPENDANT_INCLUDE( s ) #s
#include DEPENDANT_INCLUDE( toto.hpp )
//------------------------------
cat Jamfile
#-------------------------------
C++ = g++ ;
LINK = g++ ;
Library libtoto : toto.cpp ;
#-------------------------------
$ jam -dm -n
make -- all
time -- all: unbound
make -- shell
time -- shell: unbound
make -- first
time -- first: unbound
made stable first
made stable shell
make -- files
time -- files: unbound
made stable files
make -- lib
time -- lib: unbound
make -- libtoto.a
time -- libtoto.a: missing
make -- libtoto.a(toto.o)
time -- libtoto.a(toto.o): missing
make -- toto.o
time -- toto.o: missing
make -- toto.cpp
time -- toto.cpp: Mon Sep 25 01:10:05 2006
made* newer toto.cpp
made+ missing toto.o
made+ update libtoto.a(toto.o)
made+ update libtoto.a
made update lib
make -- exe
time -- exe: unbound
made stable exe
make -- obj
time -- obj: unbound
made update obj
made update all
I think the documentation is not clear enough about this problematic
limitation (the problem is the same with classic Jam).
Someone to confirm/infirm that ? If confirmed, is there a workaround ?
And i would find it more safe to block the build if an include is not
of the form of :
#include <h-char-sequence> new-line (§16.2.2)
#include "q-char-sequence" new-line (§16.2.3)
-- Fab
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