Nokia

Nokia nmake Product Builder

 

Nokia nmake Product Builder
nmake 15 Release Notes

Table of Contents

Released: August 2013

1. Introduction
1.1 Supported Platforms
1.2 Software Requirements
1.3 Customer Support

2. New Features and Significant Enhancements
2.1 Eclipse Sub-directory Builds
2.2 New Special Atom to Identify Directories
2.3 New Edit Operator Options to Identify Existing Files, Directories or Links
2.4 New Edit Operator options to Quote nmake Metacharacters
2.5 New inode Rule Trigger
2.6 Enhanced Pipe Support for read Statement

3. Detailed List of Changes
3.1 Baserules
3.2 cpp
3.3 Engine
3.4 Operators
3.5 Probe
3.6 Build Log
3.7 Miscellaneous
3.8 Variables
3.9 Options

4. Changes Impacting nmake 14 Makefiles

5. Known Problems and Remarks
5.1 Known Problems
5.2 Remarks


1. Introduction

This document announces the new release of nmake version 15. nmake is fully supported and is in wide production use throughout Alcatel-Lucent, AT&T, and elsewhere.

These nmake 15 Release Notes discuss in detail the new features, and highlight bug fixes, additional enhancements, and known problems.

1.1 Supported Platforms

The nmake 15 release has been ported to many UNIX-based and UNIX-like systems and is available for HP-UX, Linux, Solaris, and Windows (under SFU/Interix). For a current list of platforms and available distribution packages see the nmake 15 release page on the nmake web site, http://www.bell-labs.com/project/nmake/. nmake is generally upward compatible with later OS releases in a series (for example, the series Solaris 2.5 through 2.10). Contact the Customer Support helpdesk (see below) with any compatibility questions or requests for porting to other systems.

1.2 Software Requirements

nmake 15 provides dependency-based Java build support. This feature currently requires an external Java source scanner called JavaDeps to extract inter-modules dependencies from Java source. nmake 15 requires JavaDeps release lu2.2.4 or greater. The latest version is downloadable from the nmake JavaDeps page. Installation instructions are also on that page. THIS PACKAGE IS ONLY REQUIRED BY PROJECTS PERFORMING JAVA BUILDS USING THE :JAVA: ASSERTION OPERATOR. JavaDeps release lu2.2.4 is itself written in Java; it requires jdk1.2.1 or higher version on its PATH in order to run. (Note that this does not restrict the project being built to jdk1.2.1 or higher.)

The buildlog2html command requires Java runtime 1.5 or above. It will also use Graphviz dot and neato commands, if available, to generate diagrams showing build log structure. Graphviz versions 2.16 or above are known to work. buildlog2html generates an HTML log from a structured build log.

The Windows-based version of nmake is based on the Windows Services for UNIX (SFU/Interix) porting/development environment from Microsoft and requires installation of the SFU package in order to run. The SFU package must be obtained from Microsoft and installed following their installation procedure. For more information see the Support for Windows page.

1.3 Customer Support

We provide patch support, where code changes are required, for the latest 2 point releases of nmake (currently releases nmake 15 and 14). Customers using older releases can still acquire help in using the product, but genuine problems found in older releases will not be fixed. Such problems may require an upgrade to a current release or, when possible, a makefile work-around will be provided.

Fee-based services are also available. These include makefile rewrites, conversion of non-nmake makefiles to nmake, integration with vendor tools, build assessments, and porting nmake to new platforms.

Contact Customer Support for any questions regarding nmake.


2. New Features and Significant Enhancements

2.1 Eclipse Sub-directory Builds

Integration with Eclipse has been enhanced to support sub-directory builds launched through Eclipse CDT custom make targets. Eclipse sets the PWD environment variable to the root of the project which caused problems when nmake was not launched from the root. nmake now verifies PWD and corrects the value if necessary allowing Eclipse sub-directory builds to run as expected.

2.2 New Special Atom to Identify Directories

The .DIRECTORY Special Atom has been added to mark atoms bound to directories. It is analogous to the .REGULAR Special Atom for marking regular files. .DIRECTORY can be used with the :A edit operator to identify bound directories. For example, $(VAR:A=.DIRECTORY) will list the bound directories in variable VAR .

2.3 New Edit Operator Options to Identify Existing Files, Directories or Links

The :P=X edit operator (unbound existing files) has been extended to optionally list only regular files, directories, symbolic links or any combination of the three. The default :P=X behavior is unchanged to preserve compatibility. The options are as follows.

edit operator description
:P=X current behavior - list existing files of any type
:P=XP list existing files using physical test (symbolic links are not followed)
:P=X[P]=F list existing regular files
:P=X[P]=D list existing directories
:P=X[P]=L list existing symbolic links

Any combination of FDL may be specified, such as :P=X=FD, :P=XP=DLF, etc. Note that :P=X=L lists nothing since symbolic links are followed and will resolve as files or directories. To test links use :P=XP=L.

2.4 New Edit Operator options to Quote nmake Metacharacters

The :Q edit operator (shell quote) has been extended to allow quoting for regular expression and shell pattern metacharacters used by nmake. The edit operator quotes each token to remove the special meaning of any syntactical constructs to allow interpretation as a literal string. The default :Q behavior is unchanged to preserve compatibility. Only one option may be used at a time. The options are as follows.

edit operator description
:Q quote for the shell - current behavior
:Q=C quote for :C edit operator regular expression metacharacters
:Q=M quote for :M edit operator regular expression metacharacters
:Q=N quote for :N edit operator shell pattern metacharacters

2.5 New inode Rule Trigger

The new .TRIGGER.inode Special Atom can be used to add an inode comparison to a rule. When a target with .TRIGGER.inode is made an extra check is done to compare the target's inode with the inode of the first file prerequisite. An update is triggered if the inodes are different. This is in addition to the normal date check and other triggers. The inode check works for both hard and symbolic links. .TRIGGER.inode is now used by the :LINK: assertion.

Here is a simple example.

$ cat Makefile
t1 : p1 .TRIGGER.inode
        ln -f $(*) $(<)

$ nmake
+ ln -f p1 t1

$ ls -li p1 t1
514882 -rw-r--r-- 2 richb richb 3 Jun  7 10:27 p1
514882 -rw-r--r-- 2 richb richb 3 Jun  7 10:27 t1

$ rm t1

$ cp -p p1 t1

$ ls -li p1 t1
514882 -rw-r--r-- 1 richb richb 3 Jun  7 10:27 p1
514883 -rw-r--r-- 1 richb richb 3 Jun  7 10:27 t1

$ nmake -e
inode mismatch: t1 : p1
+ ln -f p1 t1

2.6 Enhanced Pipe Support for read Statement

The nmake read statement reads input and assigns the content to a variable. With the new -l option it will read one line at a time, which is useful for reading from pipes. Also two previously undocumented options have been documented. The -n option suppresses reading input if no variable is specified, allowing a process to be initialized for reading without immediately reading input. The -u[0-9] option reads input from the specified file descriptor.


3. Detailed List of Changes

3.1 Baserules

  1. 990099 - metarules not searched when CC.REPOSITORY is set
    When the CC.REPOSITORY probe variable was set certain custom metarules would not be searched when making :: targets. This is now fixed so custom metarules are searched and used as expected. Note, CC.REPOSITORY gets set for some C++ compilers.
  2. 010031 - clobber doesn't clean files under $LIBDIR and $BINDIR
    The clobber common action will now remove targets that are built directly in BINDIR and LIBDIR without the install action. The clobber.install common action should continue to be used to remove installed targets.
  3. 020092 - -g user interface inconsistencies
    The -g option for specifying a global makefile could lead to an error where nmake was unable to open the global makefile when it recursed into a sub-directory. The error occurred when the global makefile existed in the local viewpath node and was specified with a relative path to the -g option. In this case when nmake recursed into a sub-directory it would try to reference the global makefile using the same relative path which was no longer correct. This has been fixed so recursive builds refer to the global makefile using the absolute path even when the relative path is originally specified.
  4. 120009 - clobber interface
    New variables clean_extra and clobber_extra can be used to specify additional files to be removed by the clean and clobber common actions respectively. Use the variables to remove files that nmake may not know about, such as files not specified as targets in the makefile but are created as a side-effect of some action or command. Files are listed separated by spaces and may be any mix of file names, shell patterns, nmake variables, nmake functions, and sub-shell commands. The default value of both variables is null.

3.2 cpp

  1. No changes to cpp in this release.

3.3 Engine

  1. 990051 - request for RE metacharacter quote operator
    The :Q edit operator (shell quote) has been extended for quoting regular expression and shell pattern metacharacters used by the nmake :C, :M and :N edit operators. The quoting style is specified by the options :C=C, :C=M and :C=N respectively.
    See also New Features and Enhancements: New Edit Operator options to Quote nmake Metacharacters .
  2. 030014 - confusing results with MAKEPATH
    An error could arise under certain conditions when the MAKEPATH variable was set to a directory holding a prerequisite file with its target created with the same file name in the current directory. During incremental builds the $(*) and $(>) automatic variable could expand to null leading to an error from the shell action. This is fixed so the automatic variables expand correctly and the rule is not triggered unnecessarily.
  3. 060001 - read/write to/from pipe
    The new -l option has been added to the nmake read statement to read one line at a time. This option restores the old behavior of the read statement from release v3.1.2 before it was changed to read an entire file at a time in release lu3.2. Reading a line at a time can be useful for reading from pipes.
    See also New Features and Enhancements: Enhanced Pipe Support for read Statement.
  4. 060027 - :JAR:/nmakelog fix for interix
    The :JAR: assertion operator is now compatible with the nmakelog output serializer on Interix.
  5. 060053 - file expansion after binding
    Under certain conditions applying .UNBIND and then .BIND to a file or directory could result in missing path information in its bound name. This has been fixed.
  6. 080008 - enhancement: tell if a token is an existing directory
    Two new features have been added to identify directories. The new .DIRECTORY Special Atom marks atoms bound to directories, similar to the .REGULAR Special Atom for regular files. Also the :P=X edit operator has been extended with the F, D and L options to identify only regular files, directories or symbolic links.
    See also New Features and Enhancements: New Special Atom to Identify Directories.
    See also New Features and Enhancements: New Edit Operator Options to Identify Existing Files, Directories or Links.
  7. 100009 - inode rule triggers
    Target updates can now be triggered by comparing the inode of the target to the inode of the first file prerequisite. Specify the .TRIGGER.inode Special Atom on the right-hand-side of the rule to add the inode trigger. The :LINK: operator now uses .TRIGGER.inode by default.
    See also New Features and Enhancements: New inode Rule Trigger.
  8. 100011 - add more attribute space
    Space for more internal attributes has been added to the engine.
  9. 110007 - include unfiltered explain messages in debug trace
    When using debug level 5 or higher the explain message are now output in the debug trace with the usual "debug-level" tags and a new "explain:" label so they are easy to find.
  10. 120014 - simplify setup for subdirectory builds in Eclipse CDT
    nmake now updates the value of PWD in the environment if it does not match the current directory. A level 2 debug message is emitted when PWD is reset.
    See also New Features and Enhancements: Eclipse Sub-directory Builds.
  11. 130000 - inode checks need corresponding device checks
    A code review identified a few inode comparisons that were missing a corresponding device comparison, which would make files on different devices with the same inode number look like the same file. These were updated to check devices as needed.
  12. 130004 - core dump from long filename prereq
    A buffer overflow was fixed so a file name prerequisite of 1032 characters or more no longer causes a core dump or crash.

3.4 Operators

  1. 010002 - cannot suppress install of .so files from :LIBRARY:
    The default installation of :LIBRARY: shared library targets into LIBDIR can now be disabled by using the :INSTALLDIR: operator with nothing on the left-hand-side and the library listed on the right-hand-side. This is documented behavior for :INSTALLDIR: but was previously not working for shared libraries created by :LIBRARY:.
  2. 020071 - :MAKE: support for relative paths in MAKEFILES variable
    The :MAKE: operator now supports file names specified with relative paths in the MAKEFILES variable which lists the makefiles to look for when recursing into a directory when no makefile is specified. Previously the files were assumed to be in the current directory only. A warning is now issued for absolute paths in MAKEFILES, which is not supported.
  3. 060068 - :LINK: fails to relink
    A problem was fixed where :LINK: would fail to relink a target when the source of the link was updated by another rule and under certain, rare conditions the link was broken during the update but after its time stamp was touched. The files are now relinked as expected.

3.5 Probe

  1. 120013 - enhance CC.LD probe
    The probe script provides better analysis between the compiler and the ld command to better detect when the compiler can be called in place of ld. In particular, it can now handle cases where the ld command in the PATH is not the ld command native to the compiler being probed.
  2. 130006 - /bin/dash fails to run probe scripts
    The probe script no longer fails when run with the dash shell, which is the default /bin/sh shell on Debian Linux systems. The script detects shells lacking the needed function support and then relaunches itself with ksh or bash.

3.6 Build Log

  1. 100008 - add timezone to start/end times in detailed makefile buildlog view
    HTML build logs generated by buildlog2html now include time zone information with the time stamps. Hours are also now padded to two digits for consistency (minutes and seconds were already padded).
  2. 110028 - MAKE=xmakelog
    An invalid XML file would be created by xmakelog when MAKE=xmakelog was set in the environment. This would cause recursive builds to run xmakelog instead of nmake and leave incomplete XML output files in each directory instead of one complete file for the entire build. Now, the xmakelog command will issue a warning and unset the MAKE variable if it is set.

3.7 Miscellaneous

  1. 120003 - port man pages to Linux/Groff
    All the man pages now work and are supported on both troff and groff based systems. Several miscellaneous rendering issues have been fixed.
  2. 120008 - man page html conversion with groff 1.20
    Man pages have been updated to support conversion to HTML and Postscript using groff. URLs are click-able in viewers that support it. The table in the cpp man page has been fixed to eliminate rendering problems on HP-UX and Linux.
  3. 130002 - sync and add missing man pages
    Information from the manual pages in the Reference Manual have been merged into the on-line man pages bringing everything up-to-date. The HTML man pages for :JAVA:, :JAR: and npwj have been moved to proper on-line man pages and updated. Man pages for the ignore, silent and mamdep commands have been added. A section on the probe hints feature was added to the probe man page. Rendering problems have been fixed on HP-UX. Going forward, the man pages included in the Reference Manual will be generated directly from the on-line man pages, ensuring that both man page versions stay in sync.

3.8 Variables

  1. New baserules variable clean_extra - see 120009
  2. New baserules variable clobber_extra - see 120009

3.9 Options

  1. Enhancement to nmake option -g / global - see 020092
  2. New read statement option -l - see 060001
  3. Update to nmake option -d5 / debug=5 - see 110007

4. Changes Impacting nmake 14 Makefiles

The changes in nmake 15 are largely backward compatible with nmake 14. Every effort has been made to insure code changes do not unexpectedly change the documented behavior of nmake features. For makefiles that conform to nmake's documentation, no makefile updates should be necessary to migrate from nmake 14 to nmake 15.


5. Known Problems and Remarks

5.1 Known Problems

The following is a list of known problems:

  1. 980009 - problem in link=*
    The problem about using linking (specified using the link variable) to install targets in any adjacent nodes in viewpathing still exists. You may still use linking to install, but only in alternate nodes -- installation using copying must alternate with installation using linking. The problem occurs with both symbolic and hard linking.

5.2 Remarks

  1. :LINK: does not handle archive files that are generated by :: or :LIBRARY: assertion operators. Users should avoid use of :LINK: on archive files.
  2. When the cpp -I-S flag is on, -D-M is disabled. Users should not use these two flags together.
  3. Users should avoid including the same header file with both <...>-style and "..."-style #include statements in source files managed by a single makefile. nmake will assign .STD.INCLUDE and .LCL.INCLUDE attributes to the header file, and this can result in incorrect -I lists in the compiler command lines generated.
  4. When the SHELL environment variable points to ksh93 you may get the following warnings when building your shell scripts: warning: line 1: `...` obsolete, use $(...). The warning is generated running your script with ksh -n. To eliminate the warning either update your shell scripts as indicated by the message or set SHELL to another version of ksh that does not generate the warning, such as ksh88.
  5. nmake does not have large file support and cannot reference files over 2 GiB in size on 32-bit systems.

Last Update: Friday,12-Aug-2016 12:26:52 EDT