Released: July 2010
1.1 Supported Hardware
1.2 Hardware Requirements
1.3 Software Requirements
1.4 Customer Support
2. New Features and Significant Enhancements
2.1 Capture of Triggered Target Explain Data
2.2 New Variable Edit Operators to Access Explain Data
2.3 Long --name Style Options
2.4 New --version Command Line Option
3. Bug Fixes and Enhancements
3.6 Build Log
4. Changes Impacting nmake 11 Makefiles
5. Known Problems and Remarks
5.1 Known Problems
This document announces the new release of nmake version 12. nmake is fully supported and is in wide production use throughout Alcatel-Lucent, AT&T, and elsewhere.
These nmake 12 Release Notes discuss in detail the new features, and highlight bug fixes, additional enhancements, and known problems.
The nmake 12 release has been ported to many UNIX-based and UNIX-like systems. For a current list see the Download Chart on the nmake web site, http://www.bell-labs.com/project/nmake/. Or contact the Customer Support helpdesk below.
The nmake 12 release is available for HP-UX, Linux, Solaris, AIX, and Windows (under SFU/Interix). See the nmake 12 download page for a listing of available distribution packages. nmake is generally upward compatible with later OS releases in a series (for example, the series Solaris 2.5 through 2.10); contact Technical Support with any compatibility questions or requests for porting to other systems.
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.
nmake 12 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 12 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
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.
We provide patch support, where code changes are required, for the latest 2 point releases of nmake (currently releases nmake 12 and 11). 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 machines.
Contact Customer Support for any questions regarding nmake.
This new feature provides enhanced build diagnostics by capturing the reason
each target is triggered for an update. "Explain" data is recorded in the
state files and structured build logs
to provide reasons describing why certain actions were taken during the
build as seen in output when using the explain
-e) option. Explanations can be retrieved
after a build is complete whether or not the explain option
was used and are associated with the triggered target
to give more meaning than the standard explain option.
Accessing the explain data for a completed build provides useful
diagnostics, such as determining the cause of unexpected rebuilds, without
manually tracing dependencies or reproducing the build which can be time
consuming and error prone.
The feature is controlled by the new explainlog option. By default the option is enabled and explain data is recorded in the state file. Use the --noexplainlog form to disable the feature and exclude the data from the state file. Note that disabling the feature does not affect the structured build logs nor the new variable edit operators (see New Variable Edit Operators to Access Explain Data), it only affects the state files.
To dump the explain information from a state file use the list
-l) and explain (
-e) options and
specify the state file with the file (
In the following example a header file changed causing the object and
executable to be updated.
$ nmake -lef Makefile.ms /* Explain */ hello : include/hello.h [Jun 10 10:58:36 2010] has changed [Jun 10 10:42:23 2010] hello.o : include/hello.h [Jun 10 10:58:36 2010] has changed [Jun 10 10:42:23 2010]
Explain data is captured by default in structured build logs created using
Capture of explain data is controlled by the
variable. See the
Structured Build Logs Overview
for more information about the handling of explain data in structured build
logs. HTML build logs generated from the structured logs by
include the reason in the target's attribute table.
The following figure shows the above
hello.o target in the
lib/make/explain.mapis included in the nmake distribution to show the mapping of numeric codes to the corresponding message and parameter fields, where
%sindicates a string field and
%ta time stamp field.
Three new variable edit operators are available to access and format explain data during a build.
|$(VAR:T=QE)||Query the Explain Message. Returns the explain message, if it has been set, for each token in a useful presentation format, otherwise returns null. Typically the explain message is set for targets that have been triggered.|
|$(VAR:T=QEU)||Query the Unformatted Explain Data. Returns the raw explain data, if it has been set, for each token, otherwise returns null. Same as QE but the message is returned in a compact fielded format allowing easy extraction of data using standard nmake tokenization operations.|
|$(VAR:F=%(explain)S)||Formats the raw explain data in a useful presentation format.|
The following simple example shows the output from the three edit operators.
In this example a header was touched causing the target to update. Notice
:F=%(explain)S operator formats the coded string from
$ cat Makefile CC = gcc TARGETS = hello .SOURCE.h : include hello :: hello.c .DONE : .MAKE print :T=QE - $(TARGETS:T=QE) print :T=QEU - $(TARGETS:T=QEU) print :F=%(explain)S - $(TARGETS:T=QEU:F=%(explain)S) $ nmake + gcc -O -Iinclude -I- -c hello.c + gcc -O -o hello hello.o :T=QE - include/hello.h [Jun 11 14:07:13 2010] has changed [Jun 11 14:06:04 2010] :T=QEU - "6 include/hello.h 1276279633 1276279564" :F=%(explain)S - include/hello.h [Jun 11 14:07:13 2010] has changed [Jun 11 14:06:04 2010]
The next example shows how to use for-loops to access each field of the
unformatted explain data from multiple targets. Note that
lib/make/explain.map in the nmake distribution can
be used to map the first field code number to the corresponding message.
$ cat Makefile CC = gcc TARGETS = hello aloha .SOURCE.h : include :ALL: hello :: hello.c aloha :: aloha.c .DONE : .MAKE local msg field for msg $(TARGETS:T=QEU) print msg: $(msg) for field $(msg) print fld: $(field) end end $ nmake + gcc -O -Iinclude -I- -c hello.c + gcc -O -o hello hello.o + gcc -O -I- -c aloha.c + gcc -O -o aloha aloha.o msg: 6 include/hello.h 1276281965 1276281904 fld: 6 fld: include/hello.h fld: 1276281965 fld: 1276281904 msg: 6 aloha.c 1276281965 1276281904 fld: 6 fld: aloha.c fld: 1276281965 fld: 1276281904
Long command line options are now supported. Long options use the existing option names preceded by -- (dash dash) and take the form --[no]name[=value], where name is the option name, value is an additional parameter used by some options, and no negates the option. The table below shows the long form of some of the more common options. For a full list of options see the nmake(1) man page or Reference Manual.
|short option||long option||description|
|-d level||--debug=level||Provide debug trace output at the specified level.|
|-e||--explain||Print explanation for actions taken.|
|-f makefile||--file=makefile||Read the specified makefile or state file.|
|-F||--force||Force all active targets to be out of date.|
|-g makefile||--global=makefile||Read the specified global makefile.|
|-k||--keepgoing||Continue working if the shell action for the current target returns an error.|
|-j level||--jobs=level||Execute up to level concurrent jobs.|
The --version command line option is now supported to print the version string and exit. There is no short option form.
$ nmake --version Alcatel-Lucent (Bell Labs) nmake 12 06/09/2010
:LIBRARY:operator and linked to an executable in the same makefile, using
force_shared=1did not relink the executable when the shared library was updated. This is fixed so the executable is relinked as expected.
cc++/file.h") no longer triggers the common action to compile in a sub-directory with the specified compiler flags.
.mo) causing warnings and incorrect option settings on subsequent builds. This has been fixed so the value specified in the makefile is correctly compiled into the nmake object file.
.ofiles in the viewpath when a copy of the archive was in the current node. This has been fixed so
.ofiles are now picked up from the viewpath.
.ACTIONWRAPis enabled, such as when using
nmakelogfor output serialization.
<makelog>elements in a structured build log. The problem was seen primarily on Interix platforms.
.ENTRIESattribute now works as expected on AIX platforms. Support for AIX big format archives has been added so nmake can internally recognise and scan all AIX archive libraries.
:JAR:failed to archive members when the local
findcommand did not support the
-followoption. It now works with
findcommands that support
:JAR:operator no longer creates a zero sized jar file when no members are found when using JDK 1.1.x, except when all the members are removed in an update.
:JAVA:operator was fixed so it no longer needlessly recompiles java source files when the
.SCAN.javascan rule is applied to class files.
:JAVA:operator no longer exits with an error when the
clobbercommon action is used with no java source code present.
buildlog2htmlnow uses the build-name from the --info build:... option when specified instead of the compressed build id.
buildlog2htmlcommand now checks the version of Graphviz (
neatocommands) and Java to avoid and report compatibility issues. Environment variables
JAVAVERallow the user to override required minimum versions in the format of major.minor or set to 0 to skip the version check.
makelog_formatvariable was updated to allow specification of explain message capture in structured build logs. For details see - New Features and Enhancements: Capture of Triggered Target Explain Data
buildlog2htmlin the triggered target's attribute table. For details see - New Features and Enhancements: Capture of Triggered Target Explain Data
buildlog2htmldetects and executes the
javacommand. It now uses
java.exeon Interix platforms. The exptools search locations is user configurable with the
JAVA_EXPTOOLS_SEARCHenvironment variable. The default exptools search no longer includes j2sdk1.4 since it requires special configuration. The environment variable
JAVA_PATH_SEARCHhas been introduced to configure the PATH search.
nmakelogman page incorrectly identified an environment variable as
nmakelog_format. It has been corrected to
GVVER- see 090024.
JAVAVER- see 090024.
makelog_format- see 100002.
JAVA_EXPTOOLS_SEARCH- see 100013.
JAVA_PATH_SEARCH- see 100013.
--explainlog- see 070040.
--version- see 020013.
The changes in nmake 12 are largely backward compatible with nmake 11. 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 there will be no makefile updates necessary to migrate from nmake 11 based release to nmake 12.
The following is a list of known problems:
linkvariable) 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.
CC.REPOSITORYis defined and
::is used to trigger the metarule. Note that
CC.DIALECTare defined as such in the probe file for some C++ compilers. The work-around is to add
::assertion, or to not use the
::assertion (such as add the target to
%.c, the first metarule defined matching an existing file will be triggered instead of the metarule matching the explicit file prerequisite.
SHELLenvironment 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
SHELLto another version of ksh that does not generate the warning, such as ksh88.