Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-07-17 02:58:39


On Sunday 16 July 2006 23:06, Chris Weed wrote:
> Hi,
> Is there a way I can make a Jamfile for a library that just calls
> configure and make on that library? For example I want to add a
> Jamfile to my copy of fftw that will build it with configure and make.

Chris,
there's no such builtin support. I actually not sure you'll want to run
configure on each invocation, so, here's what I'd suggest:

   make <external_project>.configured

  actions run_configure
  {
      $(>)
      touch $(<)
  }
  make <external-project>.configure
      : <external_project_dir>/configure
      : @run_configure ;

  actions run_make
  {
       make -C $(>:D)
  }

  make <whatever.lib.produced.by.make>
     : <external_project_dir>/Makefile
     : @run_make
     : <dependency>$(<external-project).configure)
     ;

This will cause Boost.Build to run make/configure whenever it finds that
<whatever.lib.produced.by.make> does not exists. If you want to always run
make, just use some 'notfile' target:

  import feature : feature ;
  feature makefile : : free ;

  import toolset : flags ;
  flags run_make MAKEFILE : <makefile> ;

  actions run_make
  {
       make -C $(MAKEFILE:D)
  }

  notfile make_whatever_project : @run_make
     : <makefile>external-project-Makefile
       <dependency>$(<external-project).configure)
     ;

This is untested code, so you'd need to experiment a bit to get it working ;-)

HTH,
Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2

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