Boost logo

Boost-Build :

From: paul_snively (psnively_at_[hidden])
Date: 2005-01-27 21:56:05

Hi folks. Yeah, I know this is a twofer of recurring questions here,
and I've almost, but not quite, got it puzzled out from other info,
but I can't quite make it to the finish line. Any help would be
greatly appreciated. I don't read the list often and I don't get
e-mail from it, so please reply directly. Thanks!

Goal: Integrate Autoconf'ed third-party tools that generate N header
and source files from a .wsdl file into a Boost Build v1 project.

Specifics: I'm attempting to use <a
href="">gSOAP</a> to develop a
web service in C++ using Boost Build v1 as the build system. gSOAP's
source distribution requires a "./configure && make" step for UNIX and
includes pre-built binaries for Win32. The result of the build process
is a pair of tools, "wsdl2h" and "soapcpp2." "wsdl2h foo.wsdl -o
foo.h" of course generates "foo.h" from "foo.wsdl." "soapcpp2 foo.h"
generates several files; the ones I care about are always named
"soapH.h," "soapC.cpp," and "soapServer.cpp."

I'd like to codify all of this in Boost Build v1. Here's my main Jamfile:
-------------------------------snip snip-------------------------------
project-root ;

subinclude [ FDirName third_party jamfiles gsoap ] ;
subinclude [ FDirName unittests ] ;

SOAPCPP2DIR = [ FDirName third_party gsoap-2.7 soapcpp2 ] ;
WSDL2H = [ FAppendSuffix [ FDirName $(SOAPCPP2DIR) wsdl wsdl2h ]
$(SUFEXE) ] ;
SOAPCPP2 = [ FAppendSuffix [ FDirName $(SOAPCPP2DIR) src soapcpp2 ]
$(SUFEXE) ] ;

rule UserObject
switch $(>)
case *.wsdl :
soapify $(<) : $(>) ;

rule soapify
local genfiles = $(>:S=.h) soapH.h soapC.cpp soapServer.cpp ;

DEPENDS $(<) : $(genfiles) ;
DEPENDS $(genfiles) : $(>) ;

Clean clean : $(<) ;

actions soapify
$(WSDL2H) $(>)
$(SOAPCPP2) -I $(SOAPCPP2DIR) $(>:S=.h)

exe foo : CypherCA.wsdl ;
-------------------------------snip snip-------------------------------

Here's my gSOAP Jamfile:

-------------------------------snip snip-------------------------------
subproject [ FDirName third_party jamfiles gsoap ] ;

rule BuildGSoapRule
Depends all : $(1) ;

if $(UNIX)
BuildGSoapAction $(1) ;

actions BuildGSoapAction
pushd $(TOP)/third_party/gsoap-2.7;
./configure && cd soapcpp2 && make && cd wsdl && make;

BuildGSoapRule buildGSoap ;
-------------------------------snip snip-------------------------------

This almost works. There are really only two issues:

1) "soapify CypherCA.wsdl" is attempted before BuildGSoapAction. Oops.
2) c++ complains of "foo/gcc/debug/CypherCA.o: No such file or
directory," which is actually as it should be: there is no
"CypherCA.cpp." I suspect that this is an artifact of "UserObject"
mapping from *.wsdl to *.o, but it's unclear how to address this.

What I really want, of course, is:

1) For the *.wsdl -> *.o mapping to go away, and
2) For BuildGSoap* to be dependent upon the triggering of soapify.
3) For my dependency manipulations to be correct.

If anyone can provide any insights, do please e-mail me directly.

Many thanks and best regards,
Paul Snively


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at