Nokia Networks Home

Nokia nmake Product Builder

Quick Links

Related Products

Release Notes -- Nokia nmake lu3.6

June 2003
[Table of Contents] [Previous Section] [Next Section]

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. 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
JARROOT = classes
stc.jar :JAR: classes/*.(class|png)

$ nmake -f
-- Making stc.jar --
+ cd /home/richb/v2/classes
+ jar cf /home/richb/v1/stc.jar com/lucent/stc/C.class com/lucent/stc/im
+ 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/ /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

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 is a dynmaic attribute used to mark jobs which compile a batch of files.
.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 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.

[Table of Contents] [Previous Section] [Next Section]

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