List Info

Thread: glob from the location of the Jamfile




glob from the location of the Jamfile
country flaguser name
United States
2007-04-03 01:17:08
How come path.glob works from the path of the Jamfile that
is used from the
command line, instead of from the path of the Jamfile it is
in?
 
For example, in my project:
 
+ [root]
+-- Jamroot
|
+---+ [lib-a]
|   +-- Jamfile
|   +---+ [source]
|
+---+ [app]
    +-- Jamfile


----- /lib-a/Jamfile -----

import path : glob ;

local SOURCE_DIR = source ;
local SOURCES = [ glob SOURCE_DIR : *.c *.cpp ] ;

lib lib-a : SOURCES ;


----- /app/Jamfile -----

local SOURCES = myfile.cpp ;

exe app : SOURCES /lib-a ;


-----


When I invoke bjam in the /app directory, the glob rule in
lib-a/Jamfile
appears to be invoked to use the /app directory, instead of
the /lib-a
directory, thus causing the rule to return the null list.

This appears to be incorrect behavior. Or am I mistaken?

I've gotten around this by declaring the SOURCE_DIR as
path-constant. Is
there a better way?

-dr

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: glob from the location of the Jamfile
country flaguser name
Russian Federation
2007-04-03 01:56:10
On Tuesday 03 April 2007 10:17, Dave Rahardja wrote:
> How come path.glob works from the path of the Jamfile
that is used from the
> command line, instead of from the path of the Jamfile
it is in?

Because path.glob works from the current directory, which is
the directory
where you invoke bjam. That's reasonable, because path.glob
is low-level
feature.

You can use 'glob' rule (unqualified), in Jamfile context,
to glob
relatively to Jamfile. Please see:

	http://boost.org/boost-build2/doc/html/bbv2/refe
rence/rules.html

> import path : glob ;

Just remove this line....

> 
> local SOURCE_DIR = source ;
> local SOURCES = [ glob SOURCE_DIR : *.c *.cpp ] ;

and use

	[ glob *.c *cpp ] 

- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: glob from the location of the Jamfile
country flaguser name
Germany
2007-06-06 06:56:24
Vladimir,

Vladimir Prus schrieb:

> You can use 'glob' rule (unqualified), in Jamfile
context, to glob
> relatively to Jamfile. Please see:
> 
> 	http://boost.org/boost-build2/doc/html/bbv2/refe
rence/rules.html
> 
[...]
> and use
> 
> 	[ glob *.c *cpp ] 


The exclude pattern

	[ glob *.cpp : dont_use.cpp ]

still does not seem to work on the current boost 1.34.0
release.
Did you fix it only on trunk, and not in the 1.34 branch?
Can this be fixed for 1.34.1?

Norbert

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: glob from the location of the Jamfile
country flaguser name
Russian Federation
2007-08-05 07:05:17
On Wednesday 06 June 2007 15:56:24 Norbert Unterberg wrote:
> Vladimir,
> 
> Vladimir Prus schrieb:
> 
> > You can use 'glob' rule (unqualified), in Jamfile
context, to glob
> > relatively to Jamfile. Please see:
> > 
> > 	http://boost.org/boost-build2/doc/html/bbv2/refe
rence/rules.html
> > 
> [...]
> > and use
> > 
> > 	[ glob *.c *cpp ] 
> 
> 
> The exclude pattern
> 
> 	[ glob *.cpp : dont_use.cpp ]
> 
> still does not seem to work on the current boost 1.34.0
release.
> Did you fix it only on trunk, and not in the 1.34
branch?
> Can this be fixed for 1.34.1?

The change appears to be in 1.34.1? What do you mean by
"does not seem to work".
Can you post a small project (as archive) reproducing this
problem?

- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: glob from the location of the Jamfile
country flaguser name
Russian Federation
2007-09-01 15:30:04
On Tuesday 21 August 2007 17:16:04 Norbert Unterberg wrote:

> Vladimir,
> 
> I managed to build a small demo project to show the
problem. See 
> attached test.tgz file.
> 
> Extract the file and go into the test directory. Edit
the 
> boost-build.jam to reflect your boost build location.

Hi Norbert,
thanks for providing a testcase, this was very helpful. And
sorry for
sitting on this bug for so long.

A fix and an extra test were checked in:

	http:
//svn.boost.org/trac/boost/changeset/39103

Let me know if you continue to have problems with SVN HEAD.

Thanks,
Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )