Boost logo

Boost-Build :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2006-12-26 08:20:11


What's the best way to get jam to do the equivalent of the Makefile
code:
<--------
WHICH=gcc
#WHICH=icc
COMPILER.gcc=g++
COMPILER.icc=icc
COMPILE.gcc=$(COMPILER.gcc) -c -Wall -ftemplate-depth-100 -O0 -fno-inline
COMPILE.icc=$(COMPILER.icc) -c -xc++ -O0 -Ob0
LINK.gcc = $(COMPILER.gcc)
LINK.icc = $(COMPILER.icc)
INCS= -I"../../.." -I"../../../../.."
SRC=seq_to_identity_tuple
#SRC=ctor_template_test
BEGIN.cpp="//delimit_macro_test_code"

$(SRC).$(WHICH).E.cpp: $(SRC).cpp
        $(COMPILE.$(WHICH)) $(INCS) $(SRC).cpp -E\
    -C |csplit/$(BEGIN.cpp)/ {*}
        cat xx01|indent -bap - |sed -e 's/} template/}\n\n template/g'>
$(SRC).$(WHICH).E.cpp
>----------

The purpose is to just see what BOOST_PP macros are producing. The
BEGIN.cpp value is placed in the .cpp file just above the invokation
of the BOOST_PP macro I'm interested in. For example:
<-------------- ctor.cpp -------------
//Purpose:
// Test the preprocessor macros for CTOR forwarding.
#include "boost/forwarder/ctor.hpp"
#include <iostream>
#include <memory>
//delimit_macro_test_code
/*^only used to enable csplit to split off the relevant
  * of preprocessed output. See Makefile.
  */
...
struct member_target
{

   FORWARDER_CTOR(2,member_target,(my_target),0)

   target my_target;

};

>-------------- ctor.cpp -------------
I've read the extender manual; however, I don't know
whether to it's better to:
   1) create a whole new
      generator
or
   2) somehow "derive" from an existing gnerator.

If 1) then somehow I've got to get accesss to the
-I compiler flags. If 2) then I've got to figure
how to derive. I've looked at gcc.jam to see how
it maybe derives, and I see .override, but I can't
figure out what that does.

Help would be appreciated :)

-regards,
Larry


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