Boost logo

Boost-Build :

From: Eric Scharff (eds_2_at_[hidden])
Date: 2005-10-24 17:11:37

I am new to both Jam and boost-jam, being eager to find a decent
make(1) replacement. However, I've run into a trivial problem
with and scanning headers.

I have a trivial project with the following Jamfile:

# Jamfile
exe test : test.c extra.c ;

This is the contents of test.c:

#include <stdio.h>
#include "extra.h"

int main() {
  printf("myFunc(3) = %d\n", myFunc(3));
  return 0;

This is extra.h:

#ifndef EXTRA_H
#define EXTRA_H

int myFunc(int x);


And this is extra.c:

int myFunc(int x) {
  return x + 2;

How do I enable automatic scanning of dependency checking. This
works as expected:

% touch test.c
% bjam
...found 9 targets...
...updating 2 targets...
gcc.compile.c bin/gcc/debug/test.o bin/gcc/debug/test
...updated 2 targets...

But when I touch extra.h (which should force a recompile of both
source files, nothing happens):

% touch extra.h
% bjam
...found 9 targets...

If I convert this to use just jam, it works. What am I doing
wrong in the bjam case?



Yahoo! Mail - PC Magazine Editors' Choice 2005

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