Nokia nmake Product Builder
Customer Support Newsletter

http://www.bell-labs.com/project/nmake/newsletters/

Issue No. 19 - March 2005
Contacts
Highlights
  1. Release lu3.7 patch 1
  2. lu3.7 User Documentation
  3. JavaDeps lu2.2.1
  4. Release lu3.6 patch 4
  5. Linux Platform Query part 2
Tidbits
  1. Silent Tips

Highlights

Release lu3.7 patch 1

Patch 1 for nmake release lu3.7 was released in January, 2005. We recommend lu3.7 users upgrade if you haven't already done so. The patch contains the following fixes:

For a more details and downloads see the lu3.7 patch 1 notes.

index

lu3.7 User Documentation

If you have been using nmake lu3.7 you may have noticed the user manuals were not available at the time of release. We are glad to say the User's Manual and Reference Guide have been updated and are available for download in PDF format. Get them from the lu3.7 release page.

index

JavaDeps 2.2.1

JavaDeps 2.2.1 was also released in January, 2005. JavaDeps is an optional package and only required for projects building Java code using the nmake supplied :JAVA: operator. The update includes the following fixes:

For a full list of changes and to download JavaDeps see the JavaDeps page.

index

Release lu3.6 patch 4

Patch 4 for nmake release lu3.6 was released in February, 2005. We recommend lu3.6 users upgrade. Patch 4 contains one fix:

For a more details and downloads see the lu3.6 patch 4 notes.

index

Linux Platform Query part 2

We are considering dropping support for Red Hat 6 and need to know if this would impact anyone. If you responded to our previous Linux® query there is no need to respond again unless your plans have changed (and thank you for responding!) But if we didn't hear from you and you are using, or plan to use, nmake on Linux please send us a quick note at nmake@alcatel-lucent.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. Thank you!

index


Tidbits

Silent Tips

If you use custom nmake rules then you have probably used or seen silent in some shell action blocks. silent is used to suppress the shell trace output for the command which follows it.

For example, without silent you see something like this:

abc :
        echo making target $(<)

$ nmake
+ echo making target abc
making target abc

With silent the trace output is gone:

abc :
        silent echo making target $(<)

$ nmake
making target abc

The use of silent can get tricky with more complex shell actions. Take the following sample makefile:

abc :
        dir=../db
        if test ! -d $dir
        then
            mkdir $dir
            initdb $dir
        fi
        dumpdb -o $(<) $dir

$ nmake
+ dir=../db
+ test ! -d ../db
+ mkdir ../db
+ initdb ../db
+ dumpdb -o abc ../db

Say we don't want the variable assignment and the test in the output since it adds clutter and the other commands show us what is happening. We add silent commands, but it doesn't work as we expect.

abc :
        silent dir=../db
        silent if test ! -d $dir
        then
            mkdir $dir
            initdb $dir
        fi
        dumpdb -o $(<) $dir

$ nmake
ksh[55]: syntax error at line 5 : `then' unexpected

silent wants to execute the command that follows it. In this case silent eats the if statement so the shell interprets the then without the if. Place the silent command after if and before test.

abc :
        silent dir=../db
        if silent test ! -d $dir
        then
            mkdir $dir
            initdb $dir
        fi
        dumpdb -o $(<) $dir

$ nmake
silent[10]: dir=../db:  not found
make: *** exit code 1 making abc

Oops! Another error! This time the error is from the variable assignment. silent tries to execute the command following it. So rather than assigning the variable, the shell tries to run a command called dir=../db which does not exist. We can fix this by adding an eval statement:

abc :
        silent eval dir=../db
        if silent test ! -d $dir
        then
            mkdir $dir
            initdb $dir
        fi
        dumpdb -o $(<) $dir

$ nmake
+ mkdir ../db
+ initdb ../db
+ dumpdb -o abc ../db

Success!

Another option is to turn the shell trace on and off by using set +x and set -x.

cat Makefile 
abc :
        set +x ; dir=../db ; set -x
        if silent test ! -d $dir
        then
            mkdir $dir
            initdb $dir
        fi
        dumpdb -o $(<) $dir

$ nmake
+ mkdir ../db
+ initdb ../db
+ dumpdb -o abc ../db

Using set +/-x is useful to turn the trace off for large blocks of the shell action.

abc :
        set +x
        dir=../db
        if silent test ! -d $dir
        then
            mkdir $dir
            initdb $dir
        fi
        set -x
        dumpdb -o $(<) $dir

$ nmake
+ dumpdb -o abc ../db

But don't get too carried away. It is good to have enough output for an accurate record of what steps the build executed.

index

<<home / newsletters