Nokia

Nokia nmake Product Builder

 

Nokia nmake Product Builder
lu3.6 Release Notes

Table of Contents

Released: June 2003

1. Introduction
1.1 Supported Hardware
1.2 Hardware Requirements
1.3 Customer Support

2. New Features Introduced in Release lu3.6
2.1 Jar File Support
2.2 Batched concurrent Java builds now supported
2.3 Engine queue feature for batch compilations

3. Bug Fixes and Enhancements
3.1 Baserules
3.2 cpp
3.3 Engine
3.4 Operators
3.5 Probe
3.6 Variables

4. Changes Impacting lu3.5 Makefiles

5. Known Problems and Remarks
5.1 Known Problems
5.2 Remarks


1. Introduction

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

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

1.1 Supported Hardware

The lu3.6 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 below.

1.2 Hardware Requirements

1.3 Customer Support

We provide patch support, where code changes are required, for nmake releases lu3.6 and lu3.5 (the latest two releases.) 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.


2. New Features Introduced in Release lu3.6

2.1 Jar File Support

The new :JAR: assertion builds and maintains jar files, with support for viewpathing, index files, and manifest files. Multiple :JAR: assertions are supported in a single Makefile.

The :JAR: operator has the format:

    name.jar :JAR: [manifest-file][JARROOT=root_dir] files...

File prerequisites are specified using full ksh-style shell patterns allowing directories to be recursively searched for matching files. If a manifest file is specified its contents is merged to the target jar file as one part of the internal manifest file.

When using jdk1.2 or higher jar files are generated by stepping through the viewpath and adding the necessary files from each node to the jar file. Jar files are updated incrementally with the new or modified files. Since the older jar command does not support the update feature, compatibility with jdk1.1 is preserved by using a temporary directory to collect the files from each node in the viewpath and generating the jar target file from the temporary directory.

The following example picks up all the *.class and *.png files recursively under the classes/ sub-directory. manifest.mf will be merged with the internal manifest file. All the files in the jar will be specified relative to classes as defined by JARROOT.

$ cat jar.mk
JARROOT = classes
stc.jar :JAR: manifest.mf classes/*.(class|png)

$ nmake -f jar.mk
-- Making stc.jar --
+ cd /home/richb/v2/classes
+ jar cf /home/richb/v1/stc.jar com/lucent/stc/C.class com/lucent/stc/im
ages/logo.png
+ cd /home/richb/v1/classes
+ jar uf /home/richb/v1/stc.jar com/stc/A.class com/stc/B.class
+ jar umf /home/richb/v2/manifest.mf /home/richb/v1/stc.jar
+ jar i /home/richb/v1/stc.jar

$ jar tvf stc.jar
    98 Wed May 07 18:16:46 EDT 2003 META-INF/INDEX.LIST
     0 Wed May 07 18:16:42 EDT 2003 META-INF/
    57 Wed May 07 18:16:44 EDT 2003 META-INF/MANIFEST.MF
     0 Wed May 07 18:12:04 EDT 2003 com/lucent/stc/C.class
     0 Wed May 07 18:12:40 EDT 2003 com/lucent/stc/images/logo.png
     0 Wed May 07 10:18:26 EDT 2003 com/stc/A.class
     0 Wed May 07 10:17:30 EDT 2003 com/stc/B.class

At this time the :JAR: and :JAVA: assertions cannot be used in the same makefile for building classes and generating the corresponding jar file. Please see the man page, docs/jarman.html, included with the nmake package, for full details and options for using the new :JAR: operator.

Note: the new :JAR: operator has a different usage than the jar rules from our newsletter. Some makefile changes will be necessary if you are migrating to the new :JAR: operator.
See Changes Impacting lu3.4 Makefiles: Jar File Support for details.

2.2 Batched concurrent Java builds now supported

Java files are optionally compiled in batches to minimize expensive calls to javac. This performance enhancement feature is called batched compilation. However, in previous releases, batched compilation could not be used together with another performance enhancing feature, concurrent compilation. In this release, batched concurrent builds are now supported. This is enabled simply by setting the -j option. The following example will run up to 5 jobs concurrently while batching 10 java source files per compile.

$ nmake maxjavac=10 -j5 -f java.mk

2.3 Engine queue feature for batch compilations

Special atoms, .BATCH, .BATCHED, and target.BATCH have been added to support batch compilation. These special atoms are used in conjunction to allow safe concurrent builds for batched file generation.

.BATCH
.BATCH is a dynmaic attribute used to mark jobs which compile a batch of files.
.BATCHED
.BATCHED is a dynamic attribute used to mark targets that are collected for batch compilation. When set it indicates the target has not been created and is just a false file. Targets that have .BATCHED prerequisites are blocked.
target.BATCH
target.BATCH is a dynamic list which contains the queued targets for batch job target. When a .BATCH job completes, nmake clears the .BATCH attribute for target and clears the .BATCHED attribute for each prerequisite of target.BATCH, which allows the blocked dependent jobs on the queue to run.

3. Bug Fixes and Enhancements

3.1 Baserules

  1. 990096 - cc- does not support adding to existing CCFLAGS
    The nmake man page was updated to include the cca- feature.
  2. 020036 - allow to rename globaljavadeps
    The filename for globaljavadeps can be redefined using the GLOBALJAVADEPS variable. The default is GLOBALJAVADEPS=globaljavadeps.
  3. 020037 - default JAVACFLAGS
    The JAVACFLAGS variable no longer defaults to -O, there is no default value now. The Sun jdk1.3 man page for javac(1) indicates the -O flag does nothing, and the flag is completely absent from the jdk1.4 man page. If you still want to compile with -O you must define JAVACFLAGS manually.
  4. 020040 - shared lib warning cannot be suppressed
    When building a shared library using the double colon (::) operator, the warning message issued if the target library name does not begin with "lib" can now be suppressed by setting variable sharedlib_name_warning to null. Also note the variable name was changed from sharelib_name_warning to sharedlib_name_warning.
  5. 020042 - coshell server has no advantage for java package build
  6. 020045 - nmake clobbers makefiles
    Fixed a problem where running clobber would delete a makefile. This would occur when a parent makefile uses :MAKE: to recurse to children makefiles. If one of the children makefiles had an error, running clobber on the parent would remove the children makefiles.
  7. 020046 - :JAVA: eats error codes
    There were a few cases where nmake did not recognize errors codes from javac and exit the build. This has been corrected.
  8. 020053 - pass up targets in Java local build
    $ nmake B.class
    /home/richb/work/src
    + nmake classdir/java/p53/B.class -f 020053.mk javasdir=java/p53 ja
    varhs=*.java javaclassdest=../../classdir
    + javac -d classdir -classpath classdir:. java/p53/B.java
    
  9. 020054 - pass up command line args in java local build
    Command line arguments are now passed up from a local, inside-package java build to the package root makefile.
  10. 020055 - recurse message in Java local build
    The standard recurse message is now printed when recursing from a local, inside-package java build to the package root. This includes support for variables recurse_begin_message recurse_end_message.
  11. 020067 - variable expands to null
    When using :cc: in conjunction with :COMMAND:, the variable set by :COMMAND: would sometimes expand to null when it should have some value. This has been fixed.
  12. 020068 - nmake creates 0 size class file when a older java file found
    A zero sized class file is no longer created when the date stamp of a .java source file is older than the previous build.
  13. 020070 - JAVA.mk needs to see jdeps exit code
    nmake now recognizes an error code from javadeps and exits when an error occurs.
  14. 020086 - unnecessary -I flags from prefixinclude
    When using prefixinclude (which is on by default) with a compiler with native support for -I- nmake would generate redundant -I flags on the compile lines. Under certain conditions nmake could also specify -I flags in the wrong order of the viewpath. Both problems are fixed.
  15. 030020 - JAVA.mk cannot set javadeps=1 in makefile
    The javadeps variable was initialized in JAVA.mk in such a way that setting javadeps in a makefile was ignored, it only worked when set on the command line. Defining javadeps in the makefile now works.
  16. 030021 - JAVA.mk does not see new java code
    The list of java files to maintain was being compiled into the makefile .mo file, which caused new java source files to not be compiled in incremental builds. JAVA.mk now builds the list of java files at run time so new source files are picked up and compiled when javadeps=1.

3.2 cpp

  1. 020076 - add new pragma which provides #line-directive line output
    A new cpp pragma, lineid, has been added which corresponds with the -D-L flag to specify the line number control output directive. The usage is: #pragma lineid line-directive

3.3 Engine

  1. 990088 - compiled global makefile does not build targets
    When using the -g flag to reference a compiled global makefile that contains metarules, nmake would not build the targets in the makefile. This is fixed.
  2. 990109 - cyclic meta-rule causes core dump
    Three or more chained metarules which result in a cycle caused nmake to core dump. nmake now displays an error message for such a chain and shows the chain so the user can identify the cycle.
  3. 010019 - directory cache problem
    After the contents of a directory was cached there was no way to clear the cache in case the directory was deleted. If the directory was deleted and a new one created that used the same inode number the contents of the old and new directories would be merged in the cache even though the old files were actually removed. The special atoms .UNBIND and -SCANNED will now clear the cache for the specified directories.
  4. 010034 - $(*) behaves differently when -F is used
    For metarules with a secondary pattern prerequisite, if a file matching the secondary prerequisite did not exist the $(*) variable would include the filename of the missing file when the -F (force) flag was used but not when -F was not used. The behavior is now consistent both when forced and not forced, and $(*) does not expand the secondary pattern prerequisite if a matching file does not exist.
  5. 010035 - $(>) only bind one prerequisite file when metarule is used
    In metarules defined with multiple prerequisites, the $(>) variable will now expand the primary prerequisite plus the out of date secondary prerequisites. Previously $(>) failed to expand any secondary prerequisites.
  6. 010070 - $(var:T=F) doesn't work right when var ending with "/"
    The :T=F variable edit operator would not expand relative directories specified with a slash (/) at the end. This has been fixed and such directories are expanded if they exist.
  7. 020017 - Variables lose auxiliary value
    A variable with an auxiliary value defined (set using &=) and no primary value would get the auxiliary value expanded on the first nmake run, but subsequent incremental builds would expand the variable to null. Now the auxiliary value is always expanded if it is defined regardless of the primary value.
  8. 020019 - prerequisite .jar file in vpath causes rebuild
    Fixed unnecessary rebuilds caused by prerequisite .jar files in the VPATH. When building in a new, empty node, the dependent class files would be rebuilt although they were already up to date. This happened when using the official :JAVA: assertion. The problem was caused by the expansion of the .SOURCE.class atom which contained the prerequisite .jar files. A new special atom has been introduced, .NOCROSSPRODUCT.%., which suppresses the cross product expansion of %.<pattern> files in the specified .SOURCE. special atom while still giving us the first occurrence of %.<pattern> in the viewpath. The following is predefined in the base rules:
  9. .SOURCE.class : .NOCROSSPRODUCT.%.jar .NOCROSSPRODUCT.%.zip
    
  10. 020035 - nmakelog doesn't work right when .MAKE is used in action
    .ACTIONWRAP could not handle .MAKE immediate rules and would generate an error from ksh trying to execute .MAKE. .MAKE rules are now handled properly by .ACTIONWRAP and thus work with nmakelog.
  11. 020043 - problems with generated header
    Under certain conditions when a header file was generated in a directory other than the current directory and the header was referenced by some source code in the same makefile, the generated header was not scanned for include files. Header files generated under these conditions are now scanned.
  12. 020050 - custom archive rule cannot handle vpath
    The $(*) variable would not expand through the viewpath when the target of the rule was an archive library. This could cause locally defined archive rules to fail when updating in the viewpath. This now works and $(*) is expanded through the viewpath for archive targets.
  13. 020061 - engine queue feature for batch compilations
    Batched and concurrent compilation are now supported at the same time. For example, java batch compiles can be run concurrently for maximum performance. New special atoms, .BATCH and .BATCHED were introduced to support this.
    See also New Features: Batched concurrent Java builds now supported,
    and New Features: Engine queue feature for batch compilations.
  14. 020069 - .IMMEDIATE doesn't trigger its action block
    .IMMEDIATE rules (with .IMMEDIATE on the lhs) will now trigger their action blocks as well as making their prerequisites.

3.4 Operators

  1. 990174 - :cc: causing unnecessary installs
    The :cc: operator will no longer cause targets of :: and :LIBRARY: to reinstall when they have not changed.
  2. 020038 - :: support for libname$(CC.SUFFIX.SHARED) target
    CC.SUFFIX.SHARED can now be used to define shared library targets with the :: operator to produce platform independent makefiles. For example, the following will make libabc.so on Solaris and libabc.sl on HP-UX.
  3. libabc$$(CC.SUFFIX.SHARED) :: a.c
    
  4. 030022 - jar file support
    Jar files can be generated and maintained using the new :JAR: operator.
    See also New Features: Jar File Support.

3.5 Probe

  1. 990167 - suppress -ptr flags with Sun C++ 6.0 compiler
    The probe variable CC.REPOSITORY is no longer set for compilers that do not use the -ptr flag to refer to the repository directory. This eliminates unnecessary -ptr flags from the compile line for such compilers.
  2. 010005 - shared libs built with aCC on HP don't work
    Shared libraries were being generated using ld. With C++ code this would sometimes result in unusable libraries. The compiler is now used for linking shared libraries and executables when the compiler supports it. In this case the probe variable CC.LD is set to the compiler instead of the ld command.
  3. 010066 - improve probe script for prelink test
    The probe script now performs a more rigorous test to check support for --prelink_copy_if_nonlocal for setting the CC.PRELINK variable. In the past it could be set for some compiler that didn't support the flag causing errors when compiling.
  4. 020020 - examine CC.STDINCLUDE directories for Solaris 2.8
    Probe now has better support for determining the standard include directories for the Sun compilers on Solaris 2.8 and 2.9.
  5. 020044 - probe HP C_STDINCLUDE should have /usr before /opt/aCC
    Some of the HP-UX aCC headers includes system headers as include/file.h which requires /usr to be searched for include files. Probe will now detect when /usr is required and include it in the default standard include directories.
  6. 020079 - add testing scripts for lineid in preprocessing
    The cpp probe now sets the line directive using the lineid pragma when necessary. See also 020076.

3.6 Variables

  1. New variable GLOBALJAVADEPS - see 020036.
  2. Variable JAVACFLAGS default changed - see 020037.
  3. Variable sharelib_name_warning changed to sharedlib_name_warning - see 020040.
  4. New variable java_warp_target - see 020053.
  5. Fix for automatic variable $(*) - see 010034, 020050.
  6. Fix for automatic variable $(>) - see 010035.
  7. Fix for variable auxiliary value - see 020017.

4. Changes Impacting lu3.5 Makefiles

The changes in release lu3.6 are largely backward compatible with lu3.5. Every effort has been made to insure code changes do not unexpectedly change the documented behavior of nmake features.

The following enhancements required small changes to functionality as described below.

  1. 030022 - Jar File Support
    Description
    The :JAR: assertion operator is new in release lu3.6. However, some folks may be using our preliminary jar support rules published in our newsletter. The lu3.6 :JAR: assertion has a different usage from the rules published in the newsletter. The prerequisite can no longer be directory name, it must be a shell pattern to determine the files to pick up. Consequently the JARTYPES variable is depreciated since it is no longer needed. Also, support for a manifest file prerequisite has been added.
    See also New Features: Jar File Support
    Who is affected
    Projects using the older jar rules from our newsletter who wish to migrate to the official :JAR: assertion. Those who do not wish to migrate can continue using the old jar rules, your local jar rules will override the default rules.
    What to do
    Remove the JARTYPES variable and replace it with shell patterns in the prerequisite list.
    For example:
    /* old jar rules assertion */
    file.jar :JAR: classes JARROOT=classes JARTYPES=.class|.jpg
    
    The above assertion using the old rules can be rewritten as:
    /* lu3.6 assertion */
    file.jar :JAR: classes/*.class classes/*.jpg JARROOT=classes
    
    Or further simplified as:
    /* lu3.6 assertion */
    file.jar :JAR: classes/*.(class|jpg) JARROOT=classes
    


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 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. 030042 - :cc: generated header rebuild
    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.
  3. 990099 - metarules not searched when CC.REPOSITORY is set
    The metarules may not be searched under the following conditions: there is a user defined metarule for a non-compiled file, variable CC.REPOSITORY is defined, and :: is used to trigger the metarule. Note that CC.REPOSITORY is defined automatically for some C++ compilers in the probe file. The work-around is to add .IMPLICIT to the :: assertion, or to not use the :: assertion (such as add the target to :ALL: instead.)
  4. 020018 - adding shared lib building in same makefile won't relink
    An executable target will not be relinked when a shared library that is built in the same makefile is added as a prerequisite to the executable. The work-around is to set force_shared=1.
  5. 020062 - archive libraries rebuild when using arclean
    Archive libraries may be rebuilt when two or more libraries share at least one object file and the arclean variable is defined. The shared object files are typically recompiled and re-archive every other build.
  6. 020077 - code rebuilds with localprobe=vpath
    Under certain conditions source files will be recompiled when using localprobe=vpath. This can happen when the probe file is moved from one viewpath node to another node, or when adding a new, empty node to the front of the viewpath and the viewpath root nodes differ by more than one directory level at the end of their paths (for example, VPATH=/build/x1:/build/y1 will not rebuild, but VPATH=/build/x1/x2:/build/y1/y2 will.)
  7. 020095 - multiple shared lib targets get extra .o files
    When using a compiler that supports -xar (such as Sun's Solaris C++ compiler) and using the :: operator to build a shared library, the library will be generated with the object file prerequisites from all :: assertions in the makefile. This may result in link errors or the library containing more code than intended.
  8. 020051 - first metarule is used by mistake
    When multiple metarules generate the same source file target, such as %.c, the first metarule defined will be triggered instead of the metarule matching the file prerequisite suffix.
  9. 030038 - inconsistent include prefixes causes dropped -I flag
    When two source files in the same makefile include the same header file using different path prefixes (for example #include "dir/file.h" and #include "file.h") incremental builds may have compilation errors due to missing -I flags on the compile line. The work-around is to use consistent directory prefixes in the include statements. Re-ordering the source code in the makefile may also cure the problem.
  10. 030041 - missing -I flags when using prefixinclude
    Under rare conditions some compiler -I flags are omitted from the compile line. This has been observed when a rule triggered from .INIT copies header files to some directory, the header copies are #included by source code in the same makefile, and prefixinclude=1. The work-around is to disable prefixinclude by setting prefixinclude=0.

5.2 Remarks

  1. AIX - The AIX package does not have the global version strings in the binary executables.
  2. :LINK: does not handle archive files that are generated by :: or :LIBRARY: assertion operators. Users should avoid use of :LINK: on archive files.
  3. When the cpp -I-S flag is on, -D-M is disabled. Users should not use these two flags together.
  4. 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.

Last Update: Friday,12-Aug-2016 12:32:22 EDT