Boost logo

Boost-Build :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-08-06 08:13:44


Vladimir Prus wrote:
>
> Markus Schöpflin wrote:
> > Vladimir Prus wrote:
> > > Markus Schöpflin wrote:
> > > > Aha, I think I can work it out now. Let's see...
> > > >
> > > > rule link-oci-libs ( toolset variant : properties * )
> > > > {
> > > > switch $(toolset)
> > > > {
> > > > case gcc* :
> > > > {
> > > > return $(properties) <linkflags>"blah blah" ;
> > > > }
> > > > case msvc* :
> > > > {
> > > > return $(properties) <find-library>ociw32 ;
> > > > }
> > > > }
> > > > }
> > > >
> > > > exe foo : $(CPP_SOURCES).cpp : link_oci_libs ;
> > >
> > > Yea, that's probably simpler to use.
> > >
> > > > Hmm, is there any way to execute a shell command from within
> > > > a rule? Something like $(SHELL: make -f somefile echo_libs).
> > >
> > > Not directly. You can make a target which will receive output of make,
> > > then load that target in build actions, somethink like
> > >
> > > actions gcc-link {
> > > gcc ...... `cat file-with-options`
> > > }
> > >
> > > I suppose this is not what you want. Would it be OK to just run make
> > > once, to generate a file with list of options, and then include that
> > > file? Hmm... you'd need to make "make" output some variable declaration,
> > > such as OCI_LIBS_LINKER_FLAGS = ...... ;
> > > However, in this case, you won't be able to make anything depend on that
> > > file.
> >
> > Ok, I think I'm going to generate a file which contains the needed
> > defintions for all the platforms I'm using and include that file.
> >
> > I added a new free feature <linkflags2> which allows me to specify things
> > at the end of the linker command line.
> >
> > But now it looks like I'm hitting some really strange internal jam limit.
> > I modified the rule above to read as follows:
> >
> > case gcc* :
> > {
> > return $(properties) <linkflags2>$(OCI_LINK_FLAGS) ;
> > }
> > and the resulting command line gets truncated somewhere along the way.
> > The variable OCI_LINK_FLAGS contains about 5000 chars and this seems
> > a little too much for bjam.
>
> I think this might be a little too much for Windows. Hmm... does bjam tries
> to create a CMD file? Can you look at "bjam -n" output to see if it really
> tries execute too long command line?

Sorry, I forgot to say it's not windows, it's linux I'm currently working on.
The command line gets truncated by jam and not the shell. Isn't there some
global variable where all the features and values are stored?

>
> - Volodya

Markus

 


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