We are proud to announce the general availability of nmake release lu3.7. This release provides several new features and enhancements, including:
- Introduction of support for the Windows® platform via Microsoft Services for Unix (Interix), allowing the use of nmake on Windows® 2000 and Windows® Server 2003 operating systems running SFU 3.5.
- Support for the new Java release JDK 5.0 (through a coordinated release of JavaDeps 2.2).
- A new option to disable probe, which allows users of build rules that do not involve a C or C++ compiler to conveniently bypass automatic probe and continue. The option is also useful to administrators who want to prevent end users from kicking off a probe.
- Support for HP-UX nonstandard shared library names, such as
libdbm.1, which generates a
-l:namecommand line option for linking the library.
- The quoteinclude feature has been enhanced to optionally warn only for quoted headers within the viewpath that inherit a directory prefix. This new feature is useful with compilers that provide means to override automatic search of quoted include files in the current directory but do not support prefix include processing, in cases where the nmake cpp is not used.
- The nmake cpp now supports ISO C99 standard variadic macros.
- Lock file handling has been enhanced to provide information about the process that created the lock file, and under certain conditions stale lock files are automatically detected and cleaned up.
- A new option to suppress umask change, which may be used to prevent nmake from changing the umask to match the current directory's group and other write permissions.
For a more detail about the new features and the full list of changes see the lu3.7 release notes.
JavaDeps release JavaDeps 2.2 is now available. JavaDeps is an optional package and only required for projects building Java code using the nmake supplied :JAVA: operator. nmake release lu3.7 requires JavaDeps 2.2 for java dependency scanning, but JavaDeps 2.2 is also backwards compatible with previous Lucent® nmake releases.
JavaDeps 2.2 features initial support for the 7 language enhancements introduced in JDK 5.0: enhanced for loop, variable-length argument list, autoboxing/unboxing, static imports, typesafe enumerations, metadata or program annotations, and generics. The language support in JavaDeps 2.2 is current as of JDK 5.0 beta 2. JavaDeps 2.2 also supports the new JDK 5.0 class naming format.
Improvements in the new JavaDeps 2.2 Java dependency analyzer tool yield substantial performance improvements. Measurements of dependency analysis times for large Java projects (in the range of 700-1000 files per project) yield speedups of 5 to 6 times times compared with JavaDeps 2.1.
For a full list of changes and to download JavaDeps see the JavaDeps page.
We are interested to know what Linux® distributions and releases our customers are using so we can provide better support. If you are using or plan to use nmake on Linux please send a note to email@example.com and let us know which distributions and releases you are using. If you plan to move to different distributions/platforms in the future let us know your future plans too. Thanks!
The quoteinclude feature was first introduced in release lu3.5 to allow the
integration of tools that do not support
-I- for referencing
include files in the viewpath. This is done by identifying files that use
#include "..." directive inside the viewpath when the viewpath
contains more than one node. Such files can then be changed to use
#include <...> directives which do not require
-I- for viewpath support. See the
Issue 12: Quoteinclude article
for more details on the original feature.
Release lu3.7 adds a new
enhancement to the quoteinclude feature to limit the file identification
to files that also inherit a directory prefix. This makes the feature
useful for compilers that support
-I- or similar, but do
not support prefixinclude.
To enable the quoteinclude feature set the
variable as follows:
quoteinclude = 1|2|3 [prefix]
A value of 1 or 2 will cause nmake to issue warnings. A value of 3 will
cause nmake to exit with an error. The optional
will enable the new feature and limit the warnings or errors to files
that inherit a directory prefix.
The motivation for the enhancement was actually to support the
-I@ option in a Wind River compiler, which is similar but not
quite the same as
-I@ option changes
when to search the parent file's directory for include files, where
-I- says don't search the parent's directory at all. With
-I@ at the end of the
-I list the compiler will
search the parent's directory for an include file at the end of the search
if the file isn't otherwise found in the
-I list. This allows
the compiler to pick up many headers in the viewpath correctly, but can pose
a problem when the parent file was included using a prefix directory (such
#include "dir/file1.h") and the parent includes a file in
the same directory without the prefix (
In this case
file2.h could be picked up from the wrong node
of the viewpath if both
exist in the same node down the viewpath and only a newer
exists in the top node.
For example, consider the following set of files using VPATH=dev:off.
dev/ file.c Makefile dir/ file2.h off/ dir/ file1.h file2.h
The following compile line for the Wind River compiler will silently pick up
file2.h from the
off node since
is there, instead of getting the newer
file2.h from the
cc -I. -I/off -I@ -c file.c
Using the quoteinclude prefix feature we can identify these potential issues so they can be corrected.
First we will try the original quoteinclude feature, without the prefix
file1.h are identified
since they both use a
#include "..." directive.
$ cat Makefile quoteinclude = 2 nativepp = -1 targ :: file.c $ nmake make: *** error file.c uses quoted include for dir/file1.h make: *** error /off/dir/file1.h uses quoted include for file2.h + cc -O -I. -I/off -I@ -c file.c + cc -O -o targ file.o
Now using the new prefix option, only
is identified since
file2.h inherits the
dir/ directory from it.
$ cat Makefile quoteinclude = 2 prefix nativepp = -1 targ :: file.c $ nmake make: *** error /off/dir/file1.h uses quoted include for file2.h + cc -O -I. -I/off -I@ -c file.c + cc -O -o targ file.o
The problem can be corrected one of two ways.
file1.hto use '
file1.hto use '
#include <file2.h>' and add '
.SOURCE.h : dir' to the makefile.
The quoteinclude prefix enhancement allows the minimum set of files to
be modified to use the viewpath for such a compiler. Note that the prefix
option should not be used with compilers that do not support a
-I- style option.
Dependency information can be generated from nmake using the mam translator dependency reporting tools introduced in release lu3.2. There are 4 mam translator commands, some of which are used to feed other tools to generate charts of the dependencies. The commands are:
- mamdep - translate to simple text format
- mamdag - translate to dag format
- mamdot - translate to dot format
- mamdt - translate to dt format
To use the translator commands a mam (make abstract machine)
file must first be generated. Use the nmake flags
-Mdynamic:mamfile::/. Here is an example:
$ cat Makefile .SOURCE.h : include inc2 abc :: a.c b.c $ nmake -x -Mdynamic:mamfile::/ + cc -O -Iinclude -Iinc2 -I- -c a.c + cc -O -I- -c b.c + cc -O -o abc a.o b.o $ ls -l mamfile -rw-r--r-- 1 richb richb 1818 Nov 10 10:32 mamfile
Now mamdep is used to get the dependency information from the mamfile.
-a flag ignores atoms matching the specified shell
$ cat mamfile | mamdep -a"*Makefile*" 1 /tools/nmake/sparc5/lu3.7/lib/probe/C/make/958E98F3obincc 1 /home/richb/n18/mam/abc 2 /home/richb/n18/mam/a.o 3 /home/richb/n18/mam/a.c 4 /home/richb/n18/mam/include/b.h 4 /home/richb/n18/mam/include/a.h 5 /home/richb/n18/mam/inc2/abc.h 3 /tools/nmake/sparc5/lu3.7/lib/probe/C/make/958E98F3obincc 3 /home/richb/n18/mam 2 /home/richb/n18/mam/b.o 3 /home/richb/n18/mam/b.c 4 /usr/include/stdio.h 5 /usr/include/sys/va_list.h 5 /usr/include/sys/feature_tests.h
The number in the left-hand column shows the level of the dependency.
abc is level 1, nothing depends on it.
The level 3 file
a.c depends on the level 4 files
abc.h for a level 5 dependency. We can
also see that
which includes both
Here is the same example using mamdt and the dt command to create an ascii graph.
$ cat mamfile | mamdt -a"*Makefile*" | /opt/exp/bin/dt -l70 1 all 2 \__/tools/nmake/sparc5/lu3.7/lib/probe/C/make/958E98F3obincc 3 |__/home/richb/n18/mam/abc 4 \__/home/richb/n18/mam/a.o 5 | \__/home/richb/n18/mam/a.c 6 | | \__/home/richb/n18/mam/include/b.h 7 | | |__/home/richb/n18/mam/include/a.h 8 | | \__/home/richb/n18/mam/inc2/abc.h 9 | |__/tools/nmake/sparc5/lu3.7/lib/probe/C/make/958E98F3obincc 10 | |__/home/richb/n18/mam 11 |__/home/richb/n18/mam/b.o 12 \__/home/richb/n18/mam/b.c 13 \__/usr/include/stdio.h 14 \__/usr/include/sys/va_list.h 15 |__/usr/include/sys/feature_tests.h
Postscript or gif files can be generated using mamdot and the dot command with flags -Tps or -Tgif. Here is an example gif file.
$ cat mamfile | mamdot -a"*Makefile*" | /opt/exp/bin/dot -Tgif > mamdot.gif
nmake -x -Mdynamic:mamfile::/ from the top of the build
tree will create different mamfiles for each directory, named as
mamfile.<subdir1>.<subdir2> etc. All the mamfiles
be in the top of tree where the build was started.
You can then use the following to process all the mamfiles:
$ cat mamfile* | mamdep -a"*Makefile*"