Nokia nmake Product Builder
Customer Support Newsletter

http://www.bell-labs.com/project/nmake/newsletters/

Issue No. 34 - June 2010
Contacts
Articles
  1. nmake 12 Beta
  2. Structured Build Log Documentation Update
  3. Solaris 10 ksh Compatibility Issue
  4. Feedback and Suggestions

nmake 12 Beta

The nmake 12 beta trial is currently under way and scheduled to end 7/16/2010. Feedback from the beta helps the final release maintain compatibility with existing project makefiles and build environments. If you are interested in trying the beta please let us know at nmake@alcatel-lucent.com, all feedback is welcome. Here is the current list of user visible changes in the beta.

index

Structured Build Log Documentation Update

The Structured Build Log Documentation has been updated to include new features in the upcoming nmake 12 release. nmake 12 adds support for target trigger-time capture of explain data, providing explanations for why certain actions were taken during a build. The documentation includes discussions of new XML elements introduced to support this data and examples of an HTML formatted log including the explain data. For folks interested, the updated documentation gives a glimpse of the upcoming nmake 12 release.

With the structured build log feature nmake can output build logs in an XML structured format to facilitate automated build log processing and analysis. For details on all the build log documentation see the Structured Build Logs page.

index

Solaris 10 ksh Compatibility Issue

Update 11/18/2010: A fix for this issue is targeted for the nmake 13 release.

The Solaris 10 system ksh includes a change in behavior from previous Solaris releases that may impact use with nmake. It now initializes the PWD environment variable to the absolute, physical path of the current directory with no symbolic links. If /bin/ksh is started in a directory under a symbolic link then PWD is set to the path with no links which gives PWD a different value than the parent environment. The change is documented on OpenSolaris bug id 4763915 and appears to be intentional.

Here is a simple example showing the behavior. The current directory is /home/richb/node1, which is a symbolic link and $PWD contains this path. When a new shell is spawned $PWD is changed to the path without the link.

$ uname -sr
SunOS 5.10

$ pwd
/home/richb/node1

$ ls -l /home/richb/node1
lrwxrwxrwx 1 richb richb 9 Jun 22 14:35 /home/richb/node1 -> builds/v1

$ echo $PWD 
/home/richb/node1

$ /bin/ksh

$ echo $PWD
/home/richb/builds/v1

When using nmake this behavior will cause a problem with the viewpath since the value of $PWD must be under the first node in the VPATH. During a recursive build nmake spawns new ksh and nmake processes to build sub-directories and makefiles. If a build is started under a symbolic link and the Solaris 10 ksh is spawned then $PWD will not match the VPATH node and the viewpath will be ignored.

Here is an example showing the problem with nmake. Notice the build under the src directory is correct since $PWD is already set to the proper value. But the recursive make run under the abc sub-directory spawns a new /bin/ksh which changes the path in $PWD and results in the VPATH and related variables VROOT and VOFFSET to be set incorrectly. This will cause errors in any build using the viewpath or those variables.

$ uname -sr
SunOS 5.10

$ pwd
/home/richb/node1/src

$ ls -l
total 8
-rw-r--r-- 1 richb richb  130 Jun 22 15:31 Makefile
drwxr-xr-x 2 richb richb 4096 Jun 22 15:32 abc

$ cat Makefile 
:MAKE: abc

.INIT :
        silent echo === src/Makefile
        : PWD = $(PWD)
        : VPATH = $(VPATH)
        : VROOT = $(VROOT)
        : VOFFSET = $(VOFFSET)

$ cat abc/Makefile
abc :
        silent echo === src/abc/Makefile
        : PWD = $(PWD)
        : VPATH = $(VPATH)
        : VROOT = $(VROOT)
        : VOFFSET = $(VOFFSET)

$ echo $PWD
/home/richb/node1/src

$ echo $VPATH
/home/richb/node1

$ type ksh
ksh is /bin/ksh

$ nmake
=== src/Makefile
+ : PWD = /home/richb/node1/src
+ : VPATH = /home/richb/node1
+ : VROOT = ..
+ : VOFFSET = src
abc:
=== src/abc/Makefile
+ : PWD = /home/richb/builds/v1/src/abc
+ : VPATH =
+ : VROOT = .
+ : VOFFSET = .

To avoid problems use the ksh included in the Solaris nmake package, nmake_install_root/bin/ksh. The nmake ksh must be in the PATH before the system ksh. Below is the same example, this time using the nmake ksh. Notice the build in the abc sub-directory now has correct values for the VPATH, VROOT and VOFFSET variables.

$ echo $PWD
/home/richb/node1/src

$ echo $VPATH
/home/richb/node1

$ type ksh
ksh is /tools/nmake/sparc5/11/bin/ksh

$ nmake
=== src/Makefile
+ : PWD = /home/richb/node1/src
+ : VPATH = /home/richb/node1
+ : VROOT = ..
+ : VOFFSET = src
abc:
=== src/abc/Makefile
+ : PWD = /home/richb/node1/src/abc
+ : VPATH = /home/richb/node1
+ : VROOT = ../..
+ : VOFFSET = src/abc

The problem may also appear in the top level make if $PWD does not match the VPATH when nmake is run. As an additional precaution you can 'cd' to the first VPATH node to insure $PWD is set correctly. If your home directory is under a symbolic link then adding 'cd' to the end of your .profile will set $PWD to $HOME when you login.

index

Feedback and Suggestions

We are interested in any feedback you might have about nmake. Please send comments / suggestions to nmake@alcatel-lucent.com.

We're also open to suggestions for future articles. If there is anything you would like to see in the newsletter please send us a note to nmake@alcatel-lucent.com. Thanks for your support!

index

<<home / newsletters