Nokia

Nokia nmake Product Builder

 

Nokia nmake Product Builder
lu3.3 Release Notes

Table of Contents

Released: June 2000

1. Introduction
1.1 Supported Hardware

2. New Features Introduced in Release lu3.3
2.1 Improvements to Probe
2.2 Export nmake Variables to Shell
2.3 Lucent C++ Instrument Support
2.4 Include Makefile Expansion
2.5 More Control of :LIBRARY: for Shared Libraries
2.6 EXTRASTATE Engine Variable

3. Bug Fixes and Enhancements
3.1 cpp
3.2 Engine
3.3 Operators
3.4 Meta-rules
3.5 Probe
3.6 Variables
3.7 Miscellaneous

4. Changes Impacting lu3.2 Makefiles
4.1 Operators

5. Known Problems and Remarks
5.1 Known Problems
5.2 Remarks


1. Introduction

This document announces the new release of nmake version lu3.3. The version string lu3.3 distinguishes this as a product release from Lucent Technologies (lu) as opposed to AT&T's research versions. nmake is fully supported and is in wide production use throughout Lucent Technologies, AT&T, and elsewhere. nmake lu3.3 is in no way connected to any version of nmake from AT&T research.

These lu3.3 Release Notes discuss in detail the new features, highlights bug fixes, additional enhancements, and known problems.

1.1 Supported Hardware

The lu3.3 release has been ported to many UNIX-based systems. For a current list see the Availability Chart and the Download Page on the nmake web site, http://www.bell-labs.com/projects/nmake/. Or contact the Customer Support helpdesk at 908-582-5880, or send email to nmake@alcatel-lucent.com.


2. New Features Introduced in Release lu3.3

2.1 Improvements to Probe

The nmake probe tool runs various tests on the compiler to determine key characteristics of the compiler and system environment. Various improvements have been made to make probe more robust and user friendly. The most noticeable change in this release is the addition of comments in the generated make probe file to give users a better understanding of the probe setting.

2.2 Export nmake Variables to Shell

Variables set in a makefile can be exported to the shell and used by shell action blocks. In the past it was necessary to explicitly set a variable in the shell action block in order for shell commands in that action block to use the variable. In lu3.3 the MAKEEXPORT variable is a colon separated list of nmake variables which are to be exported to the shell environment for each shell action. The following example exports variables A and C to the shell. Notice C is being set on the command line.

    $ cat Makefile
    A = aaa
    B = bbb
    C = ccc

    MAKEEXPORT=A:C

    test :
	    : make variable A = $(A)
	    : make variable B = $(B)
	    : make variable C = $(C)
	    : shell variable A = ${A}
	    : shell variable B = ${B}
	    : shell variable C = ${C}


    $ nmake C=abc
    + A=aaa
    + C=abc
    + : make variable A = aaa
    + : make variable B = bbb
    + : make variable C = abc
    + : shell variable A = aaa
    + : shell variable B =
    + : shell variable C = abc

2.3 Lucent C++ Instrument Support

The Lucent C++ 4.1, and 5.x compilers accepts the flags --purify and --quantify to use the Purify and Quantify development tools respectively. lu3.3 recognizes compilers that support such options and will invoke the compile with the appropriate flag with the corresponding instrumentation tool. For example:

    $ nmake CC=/opt/CC/4.1/CC instrument=/opt/purify4.1/purify
    + /opt/CC/4.1/CC -O --prelink_copy_if_nonlocal -I- -D_INSTRUMENT_ -c hello.c
    + PURE_HOME=/opt/purify4.1 PATH=/opt/purify4.1$PATH /opt/CC/4.1/CC --purify
    -O --prelink_copy_if_nonlocal -o hello hello.o

2.4 Include Makefile Expansion

The new nmake -p flag can be used to expand the include statements in makefiles showing you which included makefiles are being referenced. The expansion shows the file name of the included makefile followed by the contents of the included makefile. Global makefiles specified with the -g flag are also expanded. Nested includes are fully supported, and include statements both inside and outside of action blocks are supported.

When the -p flag is used a .mi file (ie. Makefile.mi) is created which contains the fully expanded makefile. The .mi file can be examined when debugging makefiles using include statements. The following example shows the .mi file created after running nmake -p:

    $ cat Makefile
    include $(VROOT)/project.mk
    hello :: hello.c

    $ cat Makefile.mi
    /*Beginning Makefile*/

    include $(VROOT)/project.mk

    /*Beginning ../project.mk
    CC = cc
    CCFLAGS += -g
    Ending ../project.mk*/

    hello :: hello.c

    /*Beginning /tools/nmake/sparc5/lu3.3/lib/probe/C/make/BFE0A4FEobincc
    CC.CC = /tools/sun_workshop/SUNWspro/bin/cc
    CC.ALTPP.FLAGS =
    CC.ALTPP.ENV =
    ...
    Ending /tools/nmake/sparc5/lu3.3/lib/probe/C/make/BFE0A4FEobincc*/

    /*Ending Makefile*/

2.5 More Control of :LIBRARY: for Shared Libraries

Two new base rules variables, sharedlibvers and sharedliblinks, gives the user greater control over the creation of shared libraries using the :LIBRARY: operator.

sharedliblinks
The variable sharedliblinks will control the creation of the symbolic links during the install of a shared library. By default sharedliblinks is set to 1 which will cause the symbolic links to be made (consistent with previous behavior). Set sharedliblinks=0 to turn off the generation of the symbolic links.
sharedlibvers
The variable sharedlibvers will control the addition of the major.minor version string to the shared library filename. By default sharedlibvers is set to 1 (preserving previous behavior) which will add the version string to the end of the filename. Users may set sharedlibvers=0 to eliminate the version string and produce a plain libname.so (or libname.sl on HP) file instead of libname.so.1.0. Setting sharedlibvers=0 will effectively set sharedliblinks=0 since the symbolic links make no sense without a major.minor filename.

2.6 EXTRASTATE Engine Variable

The new EXTRASTATE engine variable can be used to specify the name of a makefile whose state information will be used by the primary makefile. For example, specifying EXTRASTATE=another will cause reading another.ms in addition to the current state file while processing the current makefile. EXTRASTATE uses multiple statefiles just like viewpathing, except now we can use more than one .ms file in a single vpath node. EXTRASTATE was introduced to support the :cc: synchronization of state files enhancement (see 990093).


3. Bug Fixes and Enhancements

3.1 cpp

  1. 980033 - cpp directives
    A "#" in the middle of a line is no longer incorrectly interpreted as a cpp directive.
  2. 980035 - cpp ANSI mode token-based preprocessing error
    Fixed the cpp ANSI dialect to correctly handle token-based processing. Given:
        #define MINUS -
        i=MINUS-j;
    The conforming output should be:
        i= - -j ;
    cpp output was:
        i=--j;
    Note that the result is semantically different; in the traditional case i is assigned the result of applying the prefix decrement operator to the value of j. In the ANSI case, i is assigned the result of applying the minus operator to the result of applying the minus operator to the value of j.
  3. 990014 - cpp dumps core with a huge string constant
    Fixed a bug where cpp dumped core when processing a huge string constant. cpp would write the value of the constant to the output buffer, but would core dump when the string was larger than the buffer. This is fixed and cpp now correctly handles huge string constants.
  4. 990052 - cpp C++ output ">>" should be "> >"
    Fixed a problem where cpp did not output a proper space between two consecutive angled brackets for C++ preprocessing. This caused errors from the C++ compiler, such as:
        Error: Invalid template parameter default        .
  5. 990067 - cpp hangs in transition mode
    cpp now preprocesses correctly and no longer hangs in transition mode.
  6. 990072 - cpp problem with macro replacement using # operator
    cpp now handles the "#" operator when preprocessing in the ANSI dialect.
    (Not available on the Amdahl UTS platform.)

3.2 Engine

  1. 980001 - export nmake variables to shell
    see New Features: Export nmake Variables to Shell
  2. 980013 - output of nmake print statement is delayed
    In previous releases the output of print statements would be delayed relative to subsequent shell actions. The output (not only print) is no longer delayed.
  3. 980068 - :L listing non-existent files
    Under certain conditions the :L edit operator would list files that did not exist. This happened when a file (file1) in the list had been scanned (to compile some code) and file1 included another file (file2) within a false #ifdef directive. In this case :L would list file2 even though file2 did not exist. This has been fixed.
  4. 990044 - detect corrupted .ms state files
    Now issue a proper warning message and exits when an existing state file is corrupt.
  5. 990069 - .SOURCE.mk does not work correctly in viewpathing
    Now properly detect when the state of an included makefile changes when using .SOURCE.mk to search for included makefiles.
  6. 990071 - simple and prefix include of same file leads to error
    Fixed a problem that an improper -I command line argument list is generated for the compiler resulting in the preprocessor being unable to find an include file. The behavior was produced when the same file was included by different source files, one using a path prefix to the include file and another using simply the filename, within the same makefile, and the makefile was executed more than once for different targets in the makefile.
  7. 990077 - warn for missing included makefiles
    If an included makefile is missing or deleted, a proper warning message is issued . To ignore missing included makefiles use 'include - "file.mk"' (notice the dash).
  8. 990083 - problem with .SYNC
    The .SYNC special atom is more reliable.
  9. 990084 - make include expansion
    see New Features: Include Makefile Expansion

3.3 Operators

  1. 980011 - :LINK: supports symbolic links
    Set symbolic_link=1 for :LINK: to create symbolic links, otherwise hard links are used.
  2. 980012 - :INSTALL: and :INSTALLDIR: not ignored
    The return code of install operations are no longer ignored.
  3. 980030 - :COMMAND: and .FUNCTIONAL unnecessary rebuilds
    In previous releases a prerequisite to a :COMMAND: or .FUNCTIONAL assertion would cause unnecessary rebuilds. This is no longer the case and prerequisites may be used with these assertions.
  4. 980044 - :cc: can't find library down the VPATH
    A makefile that used :cc: to build a library and link an executable with that library would not provide the path to the library when updating the executable when the library existed down the VPATH. This now works properly and the full path to the library is provided on the command line as expected when the library is down the VPATH.
  5. 990006 - :MAKE: executes more makefiles than expected
    :MAKE: no longer recurses to files named *.mk when the RHS is unspecified or *. By default these cases will only recurse to all subdirectories containing makefiles. To visit files you may specify *.mk on the RHS. See Changes Impacting lu3.2 Makefiles.
  6. 990015 - :: (double colon) recompiles .c file unexpectedly
    Under certain conditions the :: operator would create dependencies between two targets causing files to be recompiled when nothing changed. For example, the following makefile would make gvaS.o depend on gvaC.o and vise versa, so compiling one would make the other out of date. This is now fixed and the improper dependency is not created.
        %S.c %C.c %.h : %.idl
    	idl -s S.c -c C.c -h .h $(>:B:S)
    
        gvaS.o :: gva.idl
        gvaC.o :: gva.idl
  7. 990064 - :LIBRARY: build output
    Cleaned up build output generated from :LIBRARY: when when checking prerequisite libraries.
  8. 990085 - more control of :LIBRARY: for shared libraries
    see New Features: More Control of :LIBRARY: for Shared Libraries
  9. 990093 - :cc: synchronization of state files
    The use of the :cc: operator spawns another nmake process which results in a separate state file. In the past this spawned nmake process did not have any knowledge of the state information from the parent. This lack of sharing could result in files rebuilding unexpectedly. Now the spawned :cc: process reads the state information of the parent to prevent such behavior. See also New Features: EXTRASTATE Engine Variable.

3.4 Meta-rules

  1. 990034 - .ACCEPT not obeyed for meta-rule targets
    The .ACCEPT special atom now works as expected for meta-rule targets.
  2. 990050 - cyclic meta-rule causes core dump
    No more core dumps when cyclic meta-rules are encountered. Now issue an error message identifying the cyclic meta-rules.

3.5 Probe

  1. 990031 - localprobe fixes: PROBE, PROBEBASE, -I-D
    Set default PROBE=probe. Fixed a problem where the reference to a local probe file may have filename truncated if the filename includes a ".". Fixed a problem where the -I-D compile line argument, when using localprobe=vpath, may reference the local probe file using a relative path, however cpp, which uses the -I-D argument, does not handle the relative path. All references were changed to use the full path to the local probe file.
  2. 990032 - CC.ALTPP.FLAGS not correct for CC with invalid option
    Fixed a problem that caused probe variables to be set incorrectly when an invalid compiler option is set as part of the CC variable.
  3. 990033 - gcc cannot compile to file with "dynamic" in name
    Some older versions of gcc fail to compile when the output filename begins with the string "dynamic". This caused the probe variable CC.SUFFIX.SHARED to be set incorrectly. The probe scripts now work around this problem so the probe information is correct for these compilers.
  4. 990048 - core dump about probe
    Under certain conditions probe would core dump when using localprobe=vpath. This has been fixed.
  5. 990061 - error when processing /usr/include/dce/cma_config.h on HP-UX
    A missing cpp directive from HP-UX probe files would result in the following error when including <dce/cma_config.h>:
        "/usr/include/dce/cma_config.h", line 243: read error
    This has been fixed and HP-UX platforms now get '#pragma pp:nocdir "-"' properly defined in the pp probe file.
  6. 990079 - CC.AROPTS not set correctly on HP
    For legacy reasons the probe variable CC.AROPTS was set to "f" on HP-UX machines. The "f", given as an argument to ar, caused the archive member names to be truncated to 14 characters to be compatible with older HP-UX releases. This is no longer necessary and undesirable and has been removed from the probe setting. Archive member names will no longer be truncated on HP-UX machines.
  7. 990086 - attach comments to items in probe information file
    The make probe file now contains comments for variable so users can better understand the meaning of the probe file contents. Also see New Features: Improvements to Probe.
  8. 990102 - change the default value of CC.PIC for Solaris C++ compiler
    The Solaris C++ compiler treats -KPIC slightly different than -Kpic. In some cases -Kpic is not sufficient for compiling code and -KPIC must be used. probe now picks up -KPIC if it is supported before -Kpic for the value of CC.PIC. This will impact any compiler that supports both -KPIC and -Kpic, however most compiler treat the two flags equally.

3.6 Variables

  1. 990046 - CC.PROFILE set wrong for instrument usage
    CC.PROFILE is now set correctly when using instrumentation, such as instrument=purify.
  2. New engine variable EXTRASTATE - see New Features: EXTRASTATE Engine Variable
  3. New engine variable MAKEEXPORT - see New Features: Export nmake Variables to Shell
  4. New base rules variables sharedlibvers and sharedliblinks - see New Features: More Control of :LIBRARY: for Shared Libraries
  5. New base rules variable symbolic_link - see 980011

3.7 Miscellaneous

  1. 990000 - typo in .ARPROFILE
    A typo (missing "$") has been corrected. Now able to pick up libraries named such as libname_g.a when the -g CCFLAG is used. Note that this impacts the use of an underscore in the library name, not a dash. The search order is libname-g.a, libname_g.a, libname.a.
  2. 990028 - hostinfo reports wrong number of CPUs for Solaris
    The hostinfo command now uses the mpstat command to get the correct number of processors on Solaris platforms.
  3. 990045 - instrument changes for Lucent C++
    see New Features: Lucent C++ Instrument Support
  4. 990049 - extraneous output on HP-UX
    The ksh supplied with current HP-UX systems caused unexpected verbose output during install and clobber operations. This has been worked-around so the typical output will now be displayed when using HP's ksh.
  5. 990062 - update makelog package
    Fixed an infrequent problem where action block tag IDs are not recognized due to unexpectedly short tag strings (provided by $COTEMP). Removed some tracing code to reduce run-time overhead.
  6. 990063 - prerequisite library specified on ar command line
    When archiving a library, prerequisite libraries in addition to the .o files on the ar command line are included. For example:
        liba.a :: a.c -lbb
    
        + ar r liba.a a.o libbb.a
        ar: libbb.a is in archive format - embedded archives are not allowed
    This fixed and namke no longer passes the prerequisite library to ar.
  7. 990078 - x.c is recompiled when x.o is found in another directory
    When building x.o from x.c in the current directory, and the .SOURCE.o paths contain another x.o, the local x.c would be unnecessarily recompiled when the viewpath was used. This has been fixed, and the x.o found in .SOURCE.o no longer throws the local x.o out-of-date.
  8. 990118 - coshell version string is wrong
    The coshell version string now correctly identifies coshell.

4. Changes Impacting lu3.2 Makefiles

The changes in this release are largely backward compatible with lu3.2 and 3.1.2. Every effort was made to insure code changes did not change the documented behavior of nmake features. For makefiles that conform to the documentation there will be no makefile updates necessary to migrate from 3.1.2 or lu3.2 based release to lu3.3. Some minor changes may be necessary in cases where actual usage has drifted from the documentation. These changes are listed below.

4.1 Operators

  1. :MAKE: unspecified or "*" RHS
    Using ":MAKE:" (with nothing specified on the RHS) or ":MAKE: *" will result in recursing to all subdirectories containing a Makefile. Previous releases would unexpectedly recurse to all *.mk files in the same directory as well as the subdirectories containing a Makefile. Now files are not visited unless explicitly stated. You can tell nmake to visit both subdirectories and all .mk files using ":MAKE: * *.mk".

5. Known Problems and Remarks

5.1 Problems

The following is a list of known problems:

  1. The problem about using link=* to install targets in any adjacent nodes in viewpathing still exists. You may still use link=* to install, but only in alternate nodes.
  2. If a C file is built by using :cc: and this C file shares a generated header file with a C++ file specified in the same makefile, the generated header file may get regenerated during the build causing the source files to keep recompiling. This can be avoided by building the C++ files before the C files, or by generating the header file in a separate makefile at an earlier time during the build.

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. .STD.INCLUDE and .LCL.INCLUDE attributes are assigned to the header file, and this can result in incorrect -I lists in the compiler command lines generated by nmake.

Last Update: Friday,12-Aug-2016 12:31:21 EDT