Joshua ChaitinPollak | 1 Mar 2007 21:41
Favicon

Multiple directories question

I'm sure this is a FAQ, but I can't seem to find an answer... I have  
a project with static libraries and executables, and I'm having  
trouble having the executables build the libraries.

Specifically, I have a directory myProj, which contains:

Jambase
Jamfile
myLib/
myExec/

Inside myLib, there is myLib.cpp and Jamfile, which contains:

SubDir TOP myLib ;

Library myLib : myLib.cpp ;

Inside myExec, there is main.cpp and Jamfile, which contains:

SubDir TOP myExec ;

Main myExec : main.cpp ;
LinkLibraries myExec : myLib ;

When I do the following, I get an error:

cd myExec
jam

don't know how to make myLib.a
(Continue reading)

Brendon Costa | 9 Mar 2007 00:27
Picon

Jam warning "using independent target"

Hi All,

I have a set of jam scripts (I am using a modified version of Crystal
Spaces jam build system). I just made a few changes and they seem to
work fine, but while compiling I get a number of messages like:

warning: using independent target -lADS_VDLm2 -L/usr/local/lib ...

I read on the web that this has something to do with jam assuming that
either the first or second parameters to a rule are actually targets.
If for example I have a rule: AppendNonDupFlags

Where the first arg $(<) is a list of strings of flags that exist for
a current target and the second arg $(>) is a single string containing
a set of flags that I want to append to $(<) but removing duplicates
from $(<) that exist in $(>) I.e. keeping the rightmost duplicate
after appending.

Will jam treat the second argument $(>) as a target and thus cause
this warning or should I be looking elsewhere for the problem?

If so how can I get jam to treat $(>) as a non-target. I.e. it is just
a string of linker flags that is being manipulated not a target?

P.s. I tried using jam -d4 and see what occurs around this warning,
but it did not show anything useful...

Thanks,
Brendon.

(Continue reading)

Diane Holt | 9 Mar 2007 02:04
Picon

Re: Jam warning "using independent target"

Are you passing the flags themselves to the actions? If you are, don't :)  Set them "on" the target instead.

Diane

On 3/8/07, Brendon Costa <bcosta <at> avdat.com.au> wrote:
Hi All,

I have a set of jam scripts (I am using a modified version of Crystal
Spaces jam build system). I just made a few changes and they seem to
work fine, but while compiling I get a number of messages like:

warning: using independent target -lADS_VDLm2 -L/usr/local/lib ...

I read on the web that this has something to do with jam assuming that
either the first or second parameters to a rule are actually targets.
If for example I have a rule: AppendNonDupFlags

Where the first arg $(<) is a list of strings of flags that exist for
a current target and the second arg $(>) is a single string containing
a set of flags that I want to append to $(<) but removing duplicates
from $(<) that exist in $(>) I.e. keeping the rightmost duplicate
after appending.

Will jam treat the second argument $(>) as a target and thus cause
this warning or should I be looking elsewhere for the problem?

If so how can I get jam to treat $(>) as a non-target. I.e. it is just
a string of linker flags that is being manipulated not a target?


P.s. I tried using jam -d4 and see what occurs around this warning,
but it did not show anything useful...

Thanks,
Brendon.



_______________________________________________
jamming mailing list  -  jamming <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

_______________________________________________
jamming mailing list  -  jamming <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming
John Waugh | 9 Mar 2007 22:47
Picon

Re: Multiple directories question

whoops, forgot to cc jamming
--------
Not at my jam-enabled machine right now so I can't test, but it seems
like you need to put SubInclude statements in either your main Jam
file (to build from root dir) or your myExec Jamfile (to build from
that dir, as in your example)

or, if you want to be able to build from either one, do something like
what's mentioned here:
http://maillist.perforce.com/pipermail/jamming/2006-July/002741.html

-John

On 3/1/07, Joshua ChaitinPollak <jpollak <at> kivasystems.com> wrote:
> I'm sure this is a FAQ, but I can't seem to find an answer... I have
> a project with static libraries and executables, and I'm having
> trouble having the executables build the libraries.
>
> Specifically, I have a directory myProj, which contains:
>
> Jambase
> Jamfile
> myLib/
> myExec/
>
> Inside myLib, there is myLib.cpp and Jamfile, which contains:
>
> SubDir TOP myLib ;
>
> Library myLib : myLib.cpp ;
>
> Inside myExec, there is main.cpp and Jamfile, which contains:
>
> SubDir TOP myExec ;
>
> Main myExec : main.cpp ;
> LinkLibraries myExec : myLib ;
>
>
> When I do the following, I get an error:
>
> cd myExec
> jam
>
> don't know how to make myLib.a
> <snip>
> ...skipped myExec for lack of myLib.a...
>
>
> How do I tell myExec where to find myLib.a, and better yet, how to
> rebuild it if needed?
>
> Thanks,
>
> Josh
>
> --
> Joshua ChaitinPollak
> Software Engineer
> Kiva Systems
>
> _______________________________________________
> jamming mailing list  -  jamming <at> perforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming
>
_______________________________________________
jamming mailing list  -  jamming <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

Brendon Costa | 13 Mar 2007 02:42
Picon

Re: Jam warning "using independent target"

Thanks for the reply,

The flags are being passed to the action using the on binding. The
action I thought was relevant I decided to echo the parameters passed
to it like:

actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS bind LFLAGS
{
  echo "1: " $(<)
  echo "2: " $(>)
  echo "EO: " $(EXTRAOBJECTS)
  echo "NL: " $(NEEDLIBS)
  echo "LF: " $(LFLAGS)
  echo "LL: " $(LINKLIBS)
  $(CMD.LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LFLAGS)
$(LINKLIBS)
}

An this displays what i would expect. The LFLAGS are being passed into
the action using the on target format...

...patience...
...found 1120 target(s)...
...updating 1 target(s)...
warning: using independent target -L/home/bcosta/build/install/lib
-lADS_Utils -Wl,--rpath -Wl,/usr/pkg/lib -lfreetype
-Wl,-rpath,/usr/pkg/lib -lSDL -lossaudio -lpthread -Wl,-R/usr/pkg/lib
-Wl,-R/usr/X11R6/lib -lXext -laa-x11 -lm -L/usr/X11R6/lib -lX11
-lusbhid -L/usr/pkg/lib -lpng -lz
LinkApplication io_module_simulator
1:  io_module_simulator
2:
./out/i386-unknown-netbsdelf3.0/debug/src/apps/io_module_simulator/IOModuleServerLCDCallbackImpl.o
./out/i386-unknown-netbsdelf3.0/debug/src/apps/io_module_simulator/iomodule_sdl_canvas.o
./out/i386-unknown-netbsdelf3.0/debug/src/apps/io_module_simulator/main.o
./out/i386-unknown-netbsdelf3.0/debug/src/apps/io_module_simulator/misc.o
EO:
NL:  ./out/i386-unknown-netbsdelf3.0/debug/libs/libADS_MPRTInterface.a
LF:  -L/home/bcosta/build/install/lib -lADS_Utils -Wl,--rpath
-Wl,/usr/pkg/lib -lfreetype -Wl,-rpath,/usr/pkg/lib -lSDL -lossaudio
-lpthread -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R6/lib -lXext -laa-x11 -lm
-L/usr/X11R6/lib -lX11 -lusbhid -L/usr/pkg/lib -lpng -lz
LL:

Is this particular warning specific to actions or can it occur as a
result of passing arguments to a rule? (Just trying to narrow down
location that could be causing the problem).

Is there a method of finding a list of all actions and what are being
passed to them? Maybe I can search through those to see if any other
actions are somehow being invoked with those LFLAGS as a second parameter.

Thanks,
Brendon.

Diane Holt wrote:
> Are you passing the flags themselves to the actions? If you are, don't :)
> Set them "on" the target instead.
> 
> Diane
> 
> On 3/8/07, Brendon Costa <bcosta <at> avdat.com.au> wrote:
>>
>> Hi All,
>>
>> I have a set of jam scripts (I am using a modified version of Crystal
>> Spaces jam build system). I just made a few changes and they seem to
>> work fine, but while compiling I get a number of messages like:
>>
>> warning: using independent target -lADS_VDLm2 -L/usr/local/lib ...
>>
>> I read on the web that this has something to do with jam assuming that
>> either the first or second parameters to a rule are actually targets.
>> If for example I have a rule: AppendNonDupFlags
>>
>> Where the first arg $(<) is a list of strings of flags that exist for
>> a current target and the second arg $(>) is a single string containing
>> a set of flags that I want to append to $(<) but removing duplicates
>> from $(<) that exist in $(>) I.e. keeping the rightmost duplicate
>> after appending.
>>
>> Will jam treat the second argument $(>) as a target and thus cause
>> this warning or should I be looking elsewhere for the problem?
>>
>> If so how can I get jam to treat $(>) as a non-target. I.e. it is just
>> a string of linker flags that is being manipulated not a target?
>>
>>
>> P.s. I tried using jam -d4 and see what occurs around this warning,
>> but it did not show anything useful...
>>
>> Thanks,
>> Brendon.
>>
>>
>>
>> _______________________________________________
>> jamming mailing list  -  jamming <at> perforce.com
>> http://maillist.perforce.com/mailman/listinfo/jamming
>>
> 
_______________________________________________
jamming mailing list  -  jamming <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

Diane Holt | 13 Mar 2007 03:44
Picon

Re: Jam warning "using independent target"

Get rid of this bit: bind LFLAGS

"bind" tells the actions to use the bound path of the value(s) of the var. Eg., if NEEDLIBS is set to foo.so, in the actions it would be /path/to/your/foo.so -- if EXTRAOBJECTS is set to foo.o, in the actions it would be /path/to/your/foo.o -- but I can't think what sort of value LFLAGS would be that would have an unbound value in the var and a bound value in the actions :)

And if you ask Jam to bind it, and it can't, then it warns you about that. It will also issue that warning for a file that it can bind, if you don't have a dependency for the file on the target. Your NEEDLIBS and EXTRAOBJECTS are both bound and dependencies of your LinkApplication target, so it doesn't warn about those -- but LFLAGS is neither bound nor a dependency -- it's just some string getting passed to the linker (the particular value of which is "attached" -- ie., set "on" -- the target, not "bind"ed to it, since "bind" doesn't mean that.)

Diane

On 3/12/07, Brendon Costa <bcosta <at> avdat.com.au> wrote:
Thanks for the reply,

The flags are being passed to the action using the on binding. The
action I thought was relevant I decided to echo the parameters passed
to it like:

actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS bind LFLAGS
{
  echo "1: " $(<)
  echo "2: " $(>)
  echo "EO: " $(EXTRAOBJECTS)
  echo "NL: " $(NEEDLIBS)
  echo "LF: " $(LFLAGS)
  echo "LL: " $(LINKLIBS)
  $(CMD.LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LFLAGS)
$(LINKLIBS)
}

An this displays what i would expect. The LFLAGS are being passed into
the action using the on target format...

...patience...
...found 1120 target(s)...
...updating 1 target(s)...
warning: using independent target -L/home/bcosta/build/install/lib
-lADS_Utils -Wl,--rpath -Wl,/usr/pkg/lib -lfreetype
-Wl,-rpath,/usr/pkg/lib -lSDL -lossaudio -lpthread -Wl,-R/usr/pkg/lib
-Wl,-R/usr/X11R6/lib -lXext -laa-x11 -lm -L/usr/X11R6/lib -lX11
-lusbhid -L/usr/pkg/lib -lpng -lz
LinkApplication io_module_simulator
1:  io_module_simulator
2:
./out/i386-unknown-netbsdelf3.0/debug/src/apps/io_module_simulator/IOModuleServerLCDCallbackImpl.o
./out/i386-unknown-netbsdelf3.0/debug/src/apps/io_module_simulator/iomodule_sdl_canvas.o
./out/i386-unknown-netbsdelf3.0/debug/src/apps/io_module_simulator/main.o
./out/i386-unknown-netbsdelf3.0/debug/src/apps/io_module_simulator/misc.o
EO:
NL:  ./out/i386-unknown-netbsdelf3.0/debug/libs/libADS_MPRTInterface.a
LF:  -L/home/bcosta/build/install/lib -lADS_Utils -Wl,--rpath
-Wl,/usr/pkg/lib -lfreetype -Wl,-rpath,/usr/pkg/lib -lSDL -lossaudio
-lpthread -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R6/lib -lXext -laa-x11 -lm
-L/usr/X11R6/lib -lX11 -lusbhid -L/usr/pkg/lib -lpng -lz
LL:


Is this particular warning specific to actions or can it occur as a
result of passing arguments to a rule? (Just trying to narrow down
location that could be causing the problem).

Is there a method of finding a list of all actions and what are being
passed to them? Maybe I can search through those to see if any other
actions are somehow being invoked with those LFLAGS as a second parameter.

Thanks,
Brendon.


Diane Holt wrote:
> Are you passing the flags themselves to the actions? If you are, don't :)
> Set them "on" the target instead.
>
> Diane
>
> On 3/8/07, Brendon Costa <bcosta <at> avdat.com.au> wrote:
>>
>> Hi All,
>>
>> I have a set of jam scripts (I am using a modified version of Crystal
>> Spaces jam build system). I just made a few changes and they seem to
>> work fine, but while compiling I get a number of messages like:
>>
>> warning: using independent target -lADS_VDLm2 -L/usr/local/lib ...
>>
>> I read on the web that this has something to do with jam assuming that
>> either the first or second parameters to a rule are actually targets.
>> If for example I have a rule: AppendNonDupFlags
>>
>> Where the first arg $(<) is a list of strings of flags that exist for
>> a current target and the second arg $(>) is a single string containing
>> a set of flags that I want to append to $(<) but removing duplicates
>> from $(<) that exist in $(>) I.e. keeping the rightmost duplicate
>> after appending.
>>
>> Will jam treat the second argument $(>) as a target and thus cause
>> this warning or should I be looking elsewhere for the problem?
>>
>> If so how can I get jam to treat $(>) as a non-target. I.e. it is just
>> a string of linker flags that is being manipulated not a target?
>>
>>
>> P.s. I tried using jam -d4 and see what occurs around this warning,
>> but it did not show anything useful...
>>
>> Thanks,
>> Brendon.
>>
>>
>>
>> _______________________________________________
>> jamming mailing list  -   jamming <at> perforce.com
>> http://maillist.perforce.com/mailman/listinfo/jamming
>>
>


_______________________________________________
jamming mailing list  -  jamming <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming
Mildred | 15 Mar 2007 13:54
Picon

Re: Executing shell command, save results to variable

Hi,

Le Wed 28/02/2007 à 09:19 Diane Holt à écrit:
> I didn't do it as a back-tick, but as a new built-in rule, which I
> call Command. It's used inside square brackets.

What you've done is very interesting. I already had a similar problem
but I think I manages to work around somehow.

> If you're still interested, I can send the diff of builtins.c.

Even if that may be simple to do it again, I would really like to see
your changes.

Also, Jam doesn't seems to evolve, why ?
For example I'm using FT-Jam but I wonder why the changes are not
integrated in Jam ... Why such enhancements are not integrated. is
there any special reason ?

Mildred

--

-- 
Mildred       <xmpp:mildred <at> jabber.fr> <http://mildred632.free.fr/>
Clef GPG :    <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]

_______________________________________________
jamming mailing list  -  jamming <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming
Chuck Homic | 15 Mar 2007 15:39
Favicon

Re: Executing shell command, save results to variable

Mildred wrote:
> Also, Jam doesn't seems to evolve, why ?
> For example I'm using FT-Jam but I wonder why the changes are not
> integrated in Jam ... Why such enhancements are not integrated. is
> there any special reason ?

My guess is that Jam has been largely abandoned by its author.  That is
why there are several branch projects that are attempting to keep this
excellent tool up with the times.

 -Chuck
_______________________________________________
jamming mailing list  -  jamming <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

Kai Backman | 15 Mar 2007 15:54
Picon
Favicon

Re: Executing shell command, save results to variable

On 3/15/07, Chuck Homic <chuck <at> vvisions.com> wrote:
> Mildred wrote:
> > Also, Jam doesn't seems to evolve, why ?
> > For example I'm using FT-Jam but I wonder why the changes are not
> > integrated in Jam ... Why such enhancements are not integrated. is
> > there any special reason ?
>
> My guess is that Jam has been largely abandoned by its author.  That is
> why there are several branch projects that are attempting to keep this
> excellent tool up with the times.

 The blame lies with me. I offered last year to start working on
integrating these changes but have been exceedingly busy ever since.
Both Chris and David, the authors of the original and FT-Jam
respectively, are in agreement about the need to update, I've the one
who haven't been doing the actual work for it.

 Kai

--

-- 
Kai Backman, Software Engineer, kaib <at> google.com
_______________________________________________
jamming mailing list  -  jamming <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

Robert Cowham | 15 Mar 2007 16:23
Picon

Re: Executing shell command, save results to variable

Re the future of (official) Jam, see:

http://maillist.perforce.com/pipermail/jamming/2006-August/002772.html

Robert 

> -----Original Message-----
> From: jamming-bounces <at> perforce.com 
> [mailto:jamming-bounces <at> perforce.com] On Behalf Of Chuck Homic
> Sent: 15 March 2007 14:40
> To: Mildred
> Cc: jamming <at> perforce.com
> Subject: Re: [jamming] Executing shell command, save results 
> to variable
> 
> Mildred wrote:
> > Also, Jam doesn't seems to evolve, why ?
> > For example I'm using FT-Jam but I wonder why the changes are not 
> > integrated in Jam ... Why such enhancements are not integrated. is 
> > there any special reason ?
> 
> My guess is that Jam has been largely abandoned by its 
> author.  That is why there are several branch projects that 
> are attempting to keep this excellent tool up with the times.
> 
>  -Chuck
> _______________________________________________
> jamming mailing list  -  jamming <at> perforce.com 
> http://maillist.perforce.com/mailman/listinfo/jamming
> 
_______________________________________________
jamming mailing list  -  jamming <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming


Gmane