Stanford S. Guillory | 6 Nov 01:07 1999

Setting a Jam variable and not getting a space at the end

I have the following rule:

actions vEncryptFile1
{
    $(ENCRYPTFILE_EXPORT)
 set ICU_DATA="$(THIRDPARTY)$(SLASH)icu$(SLASH)data$(SLASH)winnt"
   $(ENCRYPT) $(>)
}

The encrypt invocation uses the environment variable to attach
additional directory components
to the path. However, jam insists on puttint a space on the end of the
line, so the actual
environment variable is:

[ICU_DATA="$(THIRDPARTY)$(SLASH)icu$(SLASH)data$(SLASH)winnt" ],

so there is this space in the path. How does one get rid of this?

Thanks,
Stan

Diane Holt | 6 Nov 20:57 1999
Picon

Re: Setting a Jam variable and not getting a space at the end

It wasn't clear to me from your example how having the trailing space was
getting in the way, but I can tell you where it comes from:

lists.c:  
  list_print( l )
  LIST    *l;
  {
        for( ; l; l = list_next( l ) ) 
            printf( "%s ", l->string );
  }

The space is there so things don't get mooshed together:
  Echo foo bar blat ;
results in:
  foo bar blat
instead of:
  foobarblat

I suppose you could swap it around and have a leading space, if that would be
better for you -- or you could get rid of the space in list_print, and be
responsible for it in your rules/targets (but that could get messy pretty
fast).

Alternatively, since your example was an "actions", you could just use the
shell to get rid of it.

Diane

=====
(holtdl <at> yahoo.com)
(Continue reading)

Amaury FORGEOT-d'ARC | 8 Nov 10:21 1999
Picon

Re : Setting a Jam variable and not getting a space at the end


I also had the same problem.
It comes from the var_string() function, which expands strings containing
variables.
This function adds a space after each item in the expanded variable, even for
the last.
I modified variable.c and added a line before line 203 :

          for( ; l; l = list_next( l ) )
          {
              int so = strlen( l->string );

              if( out + so >= oute )
               return -1;

              strcpy( out, l->string );
              out += so;

==>           if( list_next( l ) )
                   *out++ = ' ';
          }

          list_free( l );

This removes the last space in variable expansion.

Amaury.

Sven Havemann | 8 Nov 14:11 1999
Picon
Picon

Jam/Irix 6.5

Hi!
===

The jam Makefile contains a target

all: jam0
        jam0

For careful people who don't have . in their $PATH (like me) this should
be changed to 

all: jam0
        ./jam0

Greetings, Sven.

--

-- 
__________________________________________________________________
 dipl-inform. Sven Havemann        Institut fuer ComputerGraphik
 Odastrasse 6                      Rebenring 18
 38122 Braunschweig - Germany      38106 Braunschweig - Germany
 Tel. 0531/2808955                 Tel. 0531/391-2108, Fax: -2103
 mailto:s.havemann <at> tu-bs.de        http://www.cg.cs.tu-bs.de

Graeme Gill | 8 Nov 00:32 1999
Picon

Re: Re: Setting a Jam variable and not getting a space at the end

From: Diane Holt <holtdl <at> yahoo.com>
> lists.c:  
>   list_print( l )
>   LIST    *l;
>   {
>         for( ; l; l = list_next( l ) ) 
>             printf( "%s ", l->string );
>   }
> I suppose you could swap it around and have a leading space, if that would be
> better for you -- or you could get rid of the space in list_print, and be
> responsible for it in your rules/targets (but that could get messy pretty
> fast).

How about this:

void
list_print( l )
LIST        *l;
{
    int ptd = 0;
    for( ; l; ptd = 1, l = list_next( l ) )
        printf( "%s%s", ptd ? " " : "", l->string );

}

Graeme Gill.

Frot | 28 Nov 00:46 1999
Picon

(no subject)

Hello !

Recently I have signed up with GoToWorld.com

This company is paying you money when you surf using their webbrowser. This webbrowser will show a ads-window and thats how you earn your money. But also get others to sign up, and you also earn money when they surf the net.

Please use following link when you sign up, or if you sign up otherwise, make sure you refer to me using my ID 1039871383 !!

        http://www.gotoworld.com/getpaid/default.asp?rid=1039871383

You can download your copy of the browser and start earning money.

Regards, Frot


Regards, Frot
 
Homepage : www.abcs.com/frot
/* Elvis has left the building */
Hoff, Todd | 29 Nov 17:47 1999

simultaneous builds in jam?

Can jam handle builds from multiple CPUs in the same 
directory tree? I've parallelized our build into 3 simultaneous
phases and i'm seeing build failures i don't see when
the build is done serially. I'm wondering if this a jam
issue or something we have done.

The first step is to completely sync the build area with sources.
Then 3 build targets are executed in jam simultaneously
on 3 different hosts. So, multiple builds are running
at the same time in the same tree. The build targets
should be non-overlapping. For example, windoze libraries
and vxworks libraries are built at the same time. There
shouldn't be a conflict.

The problem i'm seeing is:

MkDir1 Z:\x\build\obj\Actor 

mkdir  Z:\x\build\obj\Actor 

A subdirectory or file Z:\x\build\obj\Actor already exists.

mkdir  Z:\x\build\obj\Actor 

...failed MkDir1 Z:\x\build\obj\Actor ...
...skipped Z:\x\build\obj\Actor\win32 for lack of Z:\x\build\obj\Actor...
...skipped Z:\x\build\obj\Actor\win32\debug for lack of
Z:\x\build\obj\Actor\win32...
...skipped <Build!obj!Actor!win32!debug>Actor.obj for lack of
Z:\x\build\obj\Actor\win32\debug...
...skipped lib_Actor_win32_dbg.lib for lack of
<Build!obj!Actor!win32!debug>Actor.obj...

What seems to be happening is the first target to reach a certain directory
wins. The other
two targets will not be built. In the above example the vxworks release
target was built, but
the win32 and vxworks debug targets were skipped.

Any thoughts?

thanx

-----------------------------------------
todd.hoff <at> lightera.com
Time is a debt i pay only momentarily. 

Olivier Brand | 29 Nov 19:37 1999

Jam and Java

I am working on a way to define makefiles for big projects. I have came
with a solution mixing gmake,  jikes and perl (to build dependencies).

Everything works pretty good but I cannot express the following:

- Circular dependencies.
- Ordering the files to compile. (Build a hierachy tree)

Is it possible with Jam to do these 2 things ?
Where can I find Java resources for Jam ?

Thanks for any help

Olivier

Hoff, Todd | 2 Dec 00:19 1999

RE: simultaneous builds in jam?

Steve Babiak suggested changing the make directory rule to:
      actions MkDir1
      {
         if not exist $(1)\nul $(MKDIR) $(1)
      }

This gates the make directory and works for me! Steve's explanation is:
   The "if not exist" is understood to test for existence of a file, not
   a directory, in NT.  That is why the "nul" file is tacked onto the end
   of $(1).  So, if the nul file does not exist in the directory, then
   call MKDIR.  The MKDIR on NT creates a directory _and _ that directory
   will contain a nul file always!

Much appreciated!!

> -----Original Message-----
> From: Hoff, Todd [mailto:Todd.Hoff <at> ciena.com]
> Sent: Monday, November 29, 1999 8:47 AM
> To: 'jamming <at> perforce.com'
> Subject: [jamming] simultaneous builds in jam?
> 
> 
> Can jam handle builds from multiple CPUs in the same 
> directory tree? I've parallelized our build into 3 simultaneous
> phases and i'm seeing build failures i don't see when
> the build is done serially. I'm wondering if this a jam
> issue or something we have done.
> 
> The first step is to completely sync the build area with sources.
> Then 3 build targets are executed in jam simultaneously
> on 3 different hosts. So, multiple builds are running
> at the same time in the same tree. The build targets
> should be non-overlapping. For example, windoze libraries
> and vxworks libraries are built at the same time. There
> shouldn't be a conflict.
> 
> The problem i'm seeing is:
> 
> MkDir1 Z:\x\build\obj\Actor 
> 
> mkdir  Z:\x\build\obj\Actor 
> 
> A subdirectory or file Z:\x\build\obj\Actor already exists.
> 
> mkdir  Z:\x\build\obj\Actor 
> 
> ...failed MkDir1 Z:\x\build\obj\Actor ...
> ...skipped Z:\x\build\obj\Actor\win32 for lack of 
> Z:\x\build\obj\Actor...
> ...skipped Z:\x\build\obj\Actor\win32\debug for lack of
> Z:\x\build\obj\Actor\win32...
> ...skipped <Build!obj!Actor!win32!debug>Actor.obj for lack of
> Z:\x\build\obj\Actor\win32\debug...
> ...skipped lib_Actor_win32_dbg.lib for lack of
> <Build!obj!Actor!win32!debug>Actor.obj...
> 
> What seems to be happening is the first target to reach a 
> certain directory
> wins. The other
> two targets will not be built. In the above example the 
> vxworks release
> target was built, but
> the win32 and vxworks debug targets were skipped.
> 
> Any thoughts?
> 
> thanx
> 
> -----------------------------------------
> todd.hoff <at> lightera.com
> Time is a debt i pay only momentarily. 
> 
> 
> _______________________________________________
> jamming mailing list  -  jamming <at> perforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming
> 


Gmane