List Info

Thread: BJam's command/shell execution




BJam's command/shell execution
user name
2007-03-22 17:40:26
Hi,

I'm using BJam, and I can't figure out how to get the shell
script  
execution working. I know there was a recent thread about a
COMMAND  
patch for Jam, and I'm looking forward to that, but for now
I'm using  
BJam and I don't have the time to apply patches and compile,
etc.

I've ported most of my project to Jam, but I have one
Makefile I  
can't figure out how to ditch. I have this Makefile code:

REVISION := $(shell svnversion)
OLD_REVISION := $(shell cat revision.cpp 2> /dev/null)

revision.cpp:
ifeq (,$(findstring "",
$))
   echo "void config::getRevision(std::string&
rev) { rev = "$ 
"; } >> revision.cpp
endif

This (should) effectively (re)builds revision.cpp if the
revision has  
changed. My program depends in revision.cpp, so if revision
has  
changed, the file gets rebuild and the program gets
rebuilt.

How would I do this in a Jam way? I guess I could call a
shell script  
to build the revision.cpp file all the time, but I'd rather
not  
unless its out of date.

-Josh

-- 
Joshua ChaitinPollak
Software Engineer
Kiva Systems

_______________________________________________
jamming mailing list  -  jammingperforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

Re: BJam's command/shell execution
user name
2007-03-23 09:01:56
Hi Josh,

BJam is heavily modified jam (it is not the same good old
jam as we
know it), and I would advise you to check Boost mailing list
since
probably no one from here knows how it behaves today.

Anyway, here is how I would do it in jam code, and hoping
this will pass
on BJam too:

  - good would be to create revisions.tcpp file from whom
you will
  generate revisions.cpp (and so jam can track changes)

  - add this rule:

rule Prepare
{
	Depends $(<) : $(>) ;
	Always $(<) ;
	Depends all : $(<) ;
	Prepare1 $(<) : $(>) ;
	Clean clean : $(<) ;
}

actions Prepare1
{
	rev=`svnversion`
	cat $(>) > $(<)
	echo "void config::getRevision(std::string& rev) {
rev = "$rev"; } >> $(<)
}

And call it with:

Prepare revision.cpp : revision.tcpp ;
Main your-executable : revision.cpp (... and the rest ...)
;

With this you don't need to compare revisions since .tcpp
-> .cpp will
be always generated (better than to mess with shell if
code).

> I guess I could call a shell script  
> to build the revision.cpp file all the time, but I'd
rather not  
> unless its out of date.

Why would you do this? Always generating revision.cpp will
not make an
overhead to whole project, unless bunch of code depends on
it. If 
you want to be build only once, just remove "Always
$(<) ;" part, in
which case you will have to do "jam clean" each
time you commit some
changes (sounds much reasonable because adding changes to
repository
oftern requires rebuilding target project/sub-project from
start).

--
Sanel
_______________________________________________
jamming mailing list  -  jammingperforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

Re: BJam's command/shell execution
user name
2007-03-23 10:46:39
Boost Jam has this (it's what I patterned the Command built-in after):

The SHELL Rule

rule SHELL ( command )

SHELL executes command, and then returns the standard output of command. SHELL only works on platforms with a popen() function in the C library. On platforms without a working popen() function, SHELL is implemented as a no-op. SHELL works on Unix, MacOS X, and most Windows compilers. SHELL is a no-op on Metrowerks compilers under Windows.



On 3/22/07, Joshua ChaitinPollak < jpollakkivasystems.com">jpollakkivasystems.com> wrote:
Hi,

I&#39;m using BJam, and I can't figure out how to get the shell script
execution working. I know there was a recent thread about a COMMAND
patch for Jam, and I'm looking forward to that, but for now I'm using
BJam and I don't have the time to apply patches and compile, etc.

I9;ve ported most of my project to Jam, but I have one Makefile I
can't figure out how to ditch. I have this Makefile code:

REVISION := $(shell svnversion)
OLD_REVISION := $(shell cat revision.cpp 2> /dev/null)

revision.cpp:
ifeq (,$(findstring "{REVISION}";, ${OLD_REVISION}))
&nbsp;  echo "void config::getRevision(std::string&amp; rev) { rev = "$
&quot;; } >> revision.cpp
endif

This (should) effectively (re)builds revision.cpp if the revision has
changed. My program depends in revision.cpp, so if revision has
changed, the file gets rebuild and the program gets rebuilt.

How would I do this in a Jam way? I guess I could call a shell script
to build the revision.cpp file all the time, but I'd rather not
unless its out of date.

-Josh

--
Joshua ChaitinPollak
Software Engineer
Kiva Systems

_______________________________________________
jamming mailing list  -&nbsp;  jammingperforce.com">jammingperforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

Re: BJam's command/shell execution
user name
2007-03-23 10:52:33
I saw that, but I can't figure out how to make it work... 

I thought the syntax would be something like:

Shell "svnversion" : $REV ;

But that doesn't work.

Also, and this may be because of the way I'm using bjam, but it seems to be conflicting with Jam's Shell command (Which seems to check the file is a shell script, and then chmod's it?).

-Josh

On Mar 23, 2007, at 11:46 AM, Diane Holt wrote:

Boost Jam has this (it's what I patterned the Command built-in after):

The SHELL Rule

rule SHELL ( command )

SHELL executes command, and then returns the standard output of command. SHELL only works on platforms with a popen() function in the C library. On platforms without a working popen() function, SHELL is implemented as a no-op. SHELL works on Unix, MacOS X, and most Windows compilers. SHELL is a no-op on Metrowerks compilers under Windows.



On 3/22/07, Joshua ChaitinPollak < jpollakkivasystems.com">jpollakkivasystems.com> wrote:
Hi,

I'm using BJam, and I can't figure out how to get the shell script
execution working. I know there was a recent thread about a COMMAND
patch for Jam, and I'm looking forward to that, but for now I'm using
BJam and I don't have the time to apply patches and compile, etc.

I've ported most of my project to Jam, but I have one Makefile I
can't figure out how to ditch. I have this Makefile code:

REVISION := $(shell svnversion)
OLD_REVISION := $(shell cat revision.cpp 2> /dev/null)

revision.cpp:
ifeq (,$(findstring "{REVISION}", ${OLD_REVISION}))
   echo "void config::getRevision(std::string&amp; rev) { rev = "$
{REVISION}"; } >> revision.cpp
endif

This (should) effectively (re)builds revision.cpp if the revision has
changed. My program depends in revision.cpp, so if revision has
changed, the file gets rebuild and the program gets rebuilt.

How would I do this in a Jam way? I guess I could call a shell script
to build the revision.cpp file all the time, but I'd rather not
unless its out of date.

-Josh

--
Joshua ChaitinPollak
Software Engineer
Kiva Systems

_______________________________________________
jamming mailing list  -   jammingperforce.com">jammingperforce.com
http://maillist.perforce.com/mailman/listinfo/jamming


-- 
Joshua ChaitinPollak
Software Engineer
Kiva Systems


Re: BJam's command/shell execution
user name
2007-03-23 10:54:17
Sanel,

Thanks for the tip, I'll try this. I guess I could also
change rule  
to be like SubIncludeOnce, which was recently posted, and
only  
operate if it hasn't done so yet.

-Josh

On Mar 23, 2007, at 10:01 AM, Sanel Zukan wrote:

> Hi Josh,
>
> BJam is heavily modified jam (it is not the same good
old jam as we
> know it), and I would advise you to check Boost mailing
list since
> probably no one from here knows how it behaves today.
>
> Anyway, here is how I would do it in jam code, and
hoping this will  
> pass
> on BJam too:
>
>   - good would be to create revisions.tcpp file from
whom you will
>   generate revisions.cpp (and so jam can track
changes)
>
>   - add this rule:
>
> rule Prepare
> {
> 	Depends $(<) : $(>) ;
> 	Always $(<) ;
> 	Depends all : $(<) ;
> 	Prepare1 $(<) : $(>) ;
> 	Clean clean : $(<) ;
> }
>
> actions Prepare1
> {
> 	rev=`svnversion`
> 	cat $(>) > $(<)
> 	echo "void config::getRevision(std::string&
rev) { rev = "$rev 
> "; } >> $(<)
> }
>
> And call it with:
>
> Prepare revision.cpp : revision.tcpp ;
> Main your-executable : revision.cpp (... and the rest
...) ;
>
> With this you don't need to compare revisions since
.tcpp -> .cpp will
> be always generated (better than to mess with shell if
code).
>
>> I guess I could call a shell script
>> to build the revision.cpp file all the time, but
I'd rather not
>> unless its out of date.
>
> Why would you do this? Always generating revision.cpp
will not make an
> overhead to whole project, unless bunch of code depends
on it. If
> you want to be build only once, just remove
"Always $(<) ;" part, in
> which case you will have to do "jam clean"
each time you commit some
> changes (sounds much reasonable because adding changes
to repository
> oftern requires rebuilding target project/sub-project
from start).
>
> --
> Sanel
> _______________________________________________
> jamming mailing list  -  jammingperforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming
>

-- 
Joshua ChaitinPollak
Software Engineer
Kiva Systems

_______________________________________________
jamming mailing list  -  jammingperforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

Re: BJam's command/shell execution
user name
2007-03-23 10:57:06
I haven't used bjam myself, but have you tried:

REV = [ Shell "svnversion"; ] ;

Diane

On 3/23/07, Joshua ChaitinPollak < jpollakkivasystems.com"> jpollakkivasystems.com> wrote:
I saw that, but I can't figure out how to make it work...&nbsp;

I thought the syntax would be something like:

Shell "svnversion"; : $REV ;

But that doesn't work.

Also, and this may be because of the way I'm using bjam, but it seems to be conflicting with Jam's Shell command (Which seems to check the file is a shell script, and then chmod's it?).

-Josh

On Mar 23, 2007, at 11:46 AM, Diane Holt wrote:

Boost Jam has this (it's what I patterned the Command built-in after):

The SHELL Rule

rule SHELL ( command )

SHELL executes command, and then returns the standard output of command. SHELL only works on platforms with a popen() function in the C library. On platforms without a working popen() function, SHELL is implemented as a no-op. SHELL works on Unix, MacOS X, and most Windows compilers. SHELL is a no-op on Metrowerks compilers under Windows.



On 3/22/07, Joshua ChaitinPollak < jpollakkivasystems.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> jpollakkivasystems.com> wrote:
Hi,

I';m using BJam, and I can't figure out how to get the shell script
execution working. I know there was a recent thread about a COMMAND
patch for Jam, and I'm looking forward to that, but for now I'm using
BJam and I don't have the time to apply patches and compile, etc.

I&#39;ve ported most of my project to Jam, but I have one Makefile I
can't figure out how to ditch. I have this Makefile code:

REVISION := $(shell svnversion)
OLD_REVISION := $(shell cat revision.cpp 2> /dev/null)

revision.cpp:
ifeq (,$(findstring "{REVISION}";, ${OLD_REVISION}))
&nbsp;  echo "void config::getRevision(std::string&amp; rev) { rev = "$
{REVISION}"; } >> revision.cpp
endif

This (should) effectively (re)builds revision.cpp if the revision has
changed. My program depends in revision.cpp, so if revision has
changed, the file gets rebuild and the program gets rebuilt.

How would I do this in a Jam way? I guess I could call a shell script
to build the revision.cpp file all the time, but I'd rather not
unless its out of date.

-Josh

--
Joshua ChaitinPollak
Software Engineer
Kiva Systems

_______________________________________________
jamming mailing list  -&nbsp;  jammingperforce.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> jammingperforce.com
http://maillist.perforce.com/mailman/listinfo/jamming


-- 
Joshua ChaitinPollak
Software Engineer
Kiva Systems



Re: BJam's command/shell execution
user name
2007-03-23 14:34:28
On Fri, 2007-03-23 at 08:57 -0700, Diane Holt wrote:
> I haven't used bjam myself, but have you tried:
> 
> REV = [ Shell "svnversion" ] ;

That doesn't seem to work:

# Begin Jamfile
REV = [ Shell "svnversion" ] ;

echo $REV ;
# End Jamfile

-------------------------------------

jpollakmoya:~/src/myproj$ jam
$REV
...found 8 targets...
...updating 1 target...
Shell svnversion
/bin/sh: Syntax error: redirection unexpected

awk  '
NR == 1 { print "#!/bin/sh"  }
NR == 1 && /^[#:]/ 
/^##/ 

' <  > svnversion 

...failed Shell svnversion...
...failed updating 1 target...

Oh well, I'm sure I'm doing something wrong.

-Josh

> Diane
> 
> On 3/23/07, Joshua ChaitinPollak <jpollakkivasystems.com> wrote:
>         I saw that, but I can't figure out how to make
it work...  
>         
>         
>         I thought the syntax would be something like:
>         
>         
>         Shell "svnversion" : $REV ;
>         
>         
>         But that doesn't work.
>         
>         
>         Also, and this may be because of the way I'm
using bjam, but
>         it seems to be conflicting with Jam's Shell
command (Which
>         seems to check the file is a shell script, and
then chmod's
>         it?).
>         
>         
>         -Josh
>         
>         On Mar 23, 2007, at 11:46 AM, Diane Holt
wrote:
>         
>         > Boost Jam has this (it's what I patterned
the Command
>         > built-in after): 
>         > 
>         > 
>         > The SHELL Rule
>         > rule SHELL ( command )
>         > 
>         > SHELL executes command, and then returns
the standard output
>         > of command. SHELL only works on platforms
with a popen()
>         > function in the C library. On platforms
without a working
>         > popen() function, SHELL is implemented as
a no-op. SHELL
>         > works on Unix, MacOS X, and most Windows
compilers. SHELL is
>         > a no-op on Metrowerks compilers under
Windows.
>         > 
>         > 
>         > 
>         > On 3/22/07, Joshua ChaitinPollak
<jpollakkivasystems.com>
>         > wrote:
>         >         Hi,
>         >         
>         >         I'm using BJam, and I can't figure
out how to get
>         >         the shell script 
>         >         execution working. I know there
was a recent thread
>         >         about a COMMAND
>         >         patch for Jam, and I'm looking
forward to that, but
>         >         for now I'm using 
>         >         BJam and I don't have the time to
apply patches and
>         >         compile, etc. 
>         >         
>         >         I've ported most of my project to
Jam, but I have
>         >         one Makefile I
>         >         can't figure out how to ditch. I
have this Makefile
>         >         code:
>         >         
>         >         REVISION := $(shell svnversion)
>         >         OLD_REVISION := $(shell cat
revision.cpp
>         >         2> /dev/null)
>         >         
>         >         revision.cpp:
>         >         ifeq (,$(findstring
"",
>         >         $))
>         >            echo "void
config::getRevision(std::string& rev)
>         >         { rev = "$ 
>         >         "; } >>
revision.cpp
>         >         endif
>         >         
>         >         This (should) effectively
(re)builds revision.cpp if
>         >         the revision has
>         >         changed. My program depends in
revision.cpp, so if
>         >         revision has
>         >         changed, the file gets rebuild and
the program gets
>         >         rebuilt. 
>         >         
>         >         How would I do this in a Jam way?
I guess I could
>         >         call a shell script
>         >         to build the revision.cpp file all
the time, but I'd
>         >         rather not
>         >         unless its out of date.
>         >         
>         >         -Josh
>         >         
>         >         --
>         >         Joshua ChaitinPollak 
>         >         Software Engineer
>         >         Kiva Systems
>         >         
>         >        
_______________________________________________
>         >         jamming mailing list  - 
jammingperforce.com
>         >         http://maillist.perforce.com/mailman/listinfo/jamming 
>         > 
>         
>         
>         -- 
>         Joshua ChaitinPollak
>         Software Engineer
>         Kiva Systems
>         
>         
>         
>         
> 
_______________________________________________
jamming mailing list  -  jammingperforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

Re: BJam's command/shell execution
user name
2007-03-23 14:38:56
Unless bjam has changed the way a var is referenced, try:

Echo REV is $(REV) ;

(Note the parens ... I added the "REV is" so you can see the line, even if REV doesn't have a value.)

Diane

On 3/23/07, Josh Pollak < jpollakkivasystems.com">jpollakkivasystems.com> wrote:
On Fri, 2007-03-23 at 08:57 -0700, Diane Holt wrote:
>; I haven't used bjam myself, but have you tried:
>;
> REV = [ Shell "svnversion"; ] ;

That doesn't seem to work:

# Begin Jamfile
REV = [ Shell "svnversion"; ] ;

echo $REV ;
# End Jamfile

-------------------------------------

jpollakmoya:~/src/myproj$ jam
$REV
...found 8 targets...
...updating 1 target...
Shell svnversion
/bin/sh: Syntax error: redirection unexpected

awk  '
NR == 1 { print "#!/bin/sh"  ;}
NR == 1 && /^[#:]/
/^##/

' <  > svnversion

...failed Shell svnversion...
...failed updating 1 target...

Oh well, I'm sure I'm doing something wrong.

-Josh

> Diane
>
> On 3/23/07, Joshua ChaitinPollak < jpollakkivasystems.com"> jpollakkivasystems.com> wrote:
>; &nbsp; &nbsp; &nbsp; &nbsp; I saw that, but I can't figure out how to make it work...
&gt;
>
>; &nbsp; &nbsp; &nbsp; &nbsp; I thought the syntax would be something like:
>
>
>&nbsp;   ; &nbsp; &nbsp; Shell "svnversion"; : $REV ;
>
&gt;
>&nbsp; &nbsp; &nbsp;   ; But that doesn't work.
>
>
>&nbsp;   ; &nbsp; &nbsp; Also, and this may be because of the way I'm using bjam, but
>&nbsp; &nbsp;   ; &nbsp; it seems to be conflicting with Jam's Shell command (Which
&gt; &nbsp; &nbsp;   ;  seems to check the file is a shell script, and then chmod's
; &nbsp; &nbsp; &nbsp;  it?).
>
>
>&nbsp;   ; &nbsp; &nbsp; -Josh
>
  ; &nbsp; &nbsp;  On Mar 23, 2007, at 11:46 AM, Diane Holt wrote:
>;
>&nbsp; &nbsp; &nbsp;   ; > Boost Jam has this (it's what I patterned the Command
&gt; &nbsp; &nbsp; &nbsp;   > built-in after):
&gt; &nbsp; &nbsp; &nbsp;   >
>&nbsp;   ; &nbsp; &nbsp; >
>&nbsp;   ; &nbsp; &nbsp; > The SHELL Rule
>&nbsp;   ; &nbsp; &nbsp; > rule SHELL ( command )
>&nbsp; &nbsp;   ; &nbsp; >
>&nbsp;   ; &nbsp; &nbsp; > SHELL executes command, and then returns the standard output
>; &nbsp; &nbsp; &nbsp; &nbsp; > of command. SHELL only works on platforms with a popen()
&gt; &nbsp; &nbsp; &nbsp;   > function in the C library. On platforms without a working
> &nbsp;   ; &nbsp;  > popen() function, SHELL is implemented as a no-op. SHELL
>  ; &nbsp; &nbsp; &nbsp; > works on Unix, MacOS X, and most Windows compilers. SHELL is
>&nbsp; &nbsp; &nbsp;   ; > a no-op on Metrowerks compilers under Windows.
  ; &nbsp; &nbsp;  >
>&nbsp;   ; &nbsp; &nbsp; >
>&nbsp;   ; &nbsp; &nbsp; >
>&nbsp;   ; &nbsp; &nbsp; > On 3/22/07, Joshua ChaitinPollak < jpollakkivasystems.com">jpollakkivasystems.com>
> &nbsp;   ; &nbsp;  > wrote:
&gt; &nbsp; &nbsp;   ;  >   ; &nbsp; &nbsp;  Hi,
>&nbsp; &nbsp;   ; &nbsp; >
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  I'm using BJam, and I can't figure out how to get
>&nbsp; &nbsp;   ; &nbsp; >   ; &nbsp; &nbsp;  the shell script
>; &nbsp; &nbsp; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  execution working. I know there was a recent thread
&gt; &nbsp; &nbsp;   ;  >   ; &nbsp; &nbsp;  about a COMMAND
&gt; &nbsp; &nbsp; &nbsp;   >   ; &nbsp; &nbsp;  patch for Jam, and I'm looking forward to that, but
>&nbsp; &nbsp;   ; &nbsp; >   ; &nbsp; &nbsp;  for now I'm using
>  ; &nbsp; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  BJam and I don't have the time to apply patches and
>  ; &nbsp; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  compile, etc.
>&nbsp;   ; &nbsp; &nbsp; >
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  I've ported most of my project to Jam, but I have
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  one Makefile I
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  can't figure out how to ditch. I have this Makefile
  ; &nbsp; &nbsp;  >   ; &nbsp; &nbsp;  code:
>  ; &nbsp; &nbsp; &nbsp; >
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  REVISION := $(shell svnversion)
; &nbsp; &nbsp; &nbsp;  >   ; &nbsp; &nbsp;  OLD_REVISION := $(shell cat revision.cpp
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  2> /dev/null)
>&nbsp; &nbsp; &nbsp; &nbsp;  >
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  revision.cpp:
>&nbsp; &nbsp; &nbsp;   ; >   ; &nbsp; &nbsp;  ifeq (,$(findstring "{REVISION}";,
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  ${OLD_REVISION}))
>; &nbsp; &nbsp; &nbsp; &nbsp; >   ; &nbsp; &nbsp; &nbsp; &nbsp; echo "void config::getRevision(std::string&amp; rev)
>; &nbsp; &nbsp; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  { rev = "$
&gt; &nbsp; &nbsp; &nbsp;   >   ; &nbsp; &nbsp;  "; } >> revision.cpp
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  endif
>  ; &nbsp; &nbsp; &nbsp; >
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  This (should) effectively (re)builds revision.cpp if
>&nbsp; &nbsp; &nbsp;   ; >   ; &nbsp; &nbsp;  the revision has
>&nbsp; &nbsp;   ; &nbsp; >   ; &nbsp; &nbsp;  changed. My program depends in revision.cpp, so if
>&nbsp; &nbsp; &nbsp;   ; >   ; &nbsp; &nbsp;  revision has
>&nbsp; &nbsp;   ; &nbsp; >   ; &nbsp; &nbsp;  changed, the file gets rebuild and the program gets
>; &nbsp; &nbsp; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  rebuilt.
&gt; &nbsp; &nbsp;   ;  >
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  How would I do this in a Jam way? I guess I could
>  ; &nbsp; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  call a shell script
>; &nbsp; &nbsp; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  to build the revision.cpp file all the time, but I'd
&gt; &nbsp; &nbsp; &nbsp;   >   ; &nbsp; &nbsp;  rather not
>&nbsp; &nbsp;   ; &nbsp; >   ; &nbsp; &nbsp;  unless its out of date.
>  ; &nbsp; &nbsp; &nbsp; >
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  -Josh
>  ; &nbsp; &nbsp; &nbsp; >
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  --
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  Joshua ChaitinPollak
>&nbsp; &nbsp; &nbsp;   ; >   ; &nbsp; &nbsp;  Software Engineer
&gt; &nbsp; &nbsp;   ;  >   ; &nbsp; &nbsp;  Kiva Systems
&gt; &nbsp; &nbsp; &nbsp;   >
>&nbsp;   ; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  _______________________________________________
>  ; &nbsp; &nbsp; &nbsp; >   ; &nbsp; &nbsp;  jamming mailing list  -&nbsp;  jammingperforce.com">jammingperforce.com
>&nbsp; &nbsp; &nbsp;   ; >   ; &nbsp; &nbsp;  http://maillist.perforce.com/mailman/listinfo/jamming
>&nbsp; &nbsp; &nbsp; &nbsp;  >
>
>
>&nbsp; &nbsp;   ; &nbsp; --
>&nbsp; &nbsp; &nbsp;   ; Joshua ChaitinPollak
>&nbsp; &nbsp; &nbsp;   ; Software Engineer
&gt; &nbsp; &nbsp;   ;  Kiva Systems
&gt;
>
>;
>
>


Re: BJam's command/shell execution
user name
2007-03-23 14:53:12
On Fri, 2007-03-23 at 12:38 -0700, Diane Holt wrote:
> Unless bjam has changed the way a var is referenced,
try:
> 
> Echo REV is $(REV) ;
> 
> (Note the parens ... I added the "REV is" so
you can see the line,
> even if REV doesn't have a value.)


That doesn't seem to help... I'm not very up on awk, but it
looks like
it is trying to write #!/bin/sh to a file called
'svnversion' :

jpollakmoya:~/src/myproj$ jam
REV is
...found 8 targets...
...updating 1 target...
Shell svnversion
/bin/sh: Syntax error: redirection unexpected

awk  '
NR == 1 { print "#!/bin/sh"  }
NR == 1 && /^[#:]/ 
/^##/ 

' <  > svnversion 

...failed Shell svnversion...
...failed updating 1 target...
_______________________________________________
jamming mailing list  -  jammingperforce.com
http://maillist.perforce.com/mailman/listinfo/jamming

Re: BJam's command/shell execution
user name
2007-03-23 18:47:06
Well, the problem with you awk is that you have a redirect with nothing to redirect from -- but I wanted to find out if it was because REV really wasn't set, which is why I had you fix the Echo. Looks like it's not, so I guess theirs doesn't work that way -- and I don't know what way it does.

Diane

On 3/23/07, Josh Pollak < jpollakkivasystems.com">jpollakkivasystems.com> wrote:
On Fri, 2007-03-23 at 12:38 -0700, Diane Holt wrote:
>; Unless bjam has changed the way a var is referenced, try:
>
> Echo REV is $(REV) ;
>
>; (Note the parens ... I added the "REV is" so you can see the line,
&gt; even if REV doesn't have a value.)


That doesn't seem to help... I'm not very up on awk, but it looks like
it is trying to write #!/bin/sh to a file called 'svnversion' :

jpollakmoya :~/src/myproj$ jam
REV is
...found 8 targets...
...updating 1 target...
Shell svnversion
/bin/sh: Syntax error: redirection unexpected

awk  '
NR == 1 { print "#!/bin/sh"  ;}
NR == 1 && /^[#:]/
/^##/

' <  > svnversion

...failed Shell svnversion...
...failed updating 1 target...


[1-10]

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