Alcatel-Lucent nmake Product Builder
Release Notes -- Alcatel-Lucent nmake 3.1.2
1997
[Table of Contents]
[Previous Section]
[Next Section]
2. Bug Fixes
2.1 Unending recursion causes core dump
A core dump caused by unending recursion during automatic variable expansion has been fixed. The following makefile demonstrates the problem:
%.x gen_%.C : %.C
touch $(<)
main : .MAKE
print $("main.x":G=%.o)
2.2 Lost prerequisites when expanding $(!)
The value stored in an internal global buffer was occasionally clobbered during the expansion of $(!). The behavior is illustrated by the next example, which involves viewpathing and $(!):
mkdir n1 n2
export VPATH=$PWD/n1:$PWD/n2
Put the following files in directory n1,
main.c:
#include <stdio.h>
main(){}
Makefile:
main :: main.c
test : .MAKE
print First try: $(!main)
print Second try: $(!main)
and leave directory n2 empty. Build main with
nmake
and type,
nmake test
and you only get the right answer from the second print statement:
First try:
Second try: main.o main.c /usr/5include/stdio.h
The problem has been fixed in this release.
2.3 :T=G in .PREFIX.INCLUDE. can force early bindfile()
.SCAN.c generates a .PREFIX.INCLUDE. call when a local include file is found, but the call always happens before the.LCL.INCLUDE attribute is assigned to the included file. Things can break when the included file name doesn't end in .h, because the :T=G used by .PREFIX.INCLUDE. triggers a bindfile() call that won't use .SOURCE.%.LCL.INCLUDE when looking for the file.
The symptom is a build that fails the first time, but succeed after that because .LCL.INCLUDE is assigned to the included file and saved in the statefile. Here's a simple example that illustrates the behavior:
Makefile:
SOURCE.h : hdr
a :: a.c
a.c:
#include "test"
main() {}
Create an empty hdr/test file, run nmake when there's no statefile, and you get,
make: don't know how to make a : a.o : a.c : test
but after that the build works. The problem has been fixed in release 3.1.2 by explicitly assigning .LCL.INCLUDE to the included file in .PREFIX.INCLUDE. before the :T=G edit operator is used.
2.4 The T scan rule can't access matched pattern
The token rule of scan strategies is for matching literal patterns, but a simple omission in the nmake engine meant the action associated with the rule couldn't reference the matched pattern. The mistake has been fixed in this release.
2.5 Incomplete -I list
A header file included by files at different levels in a source tree can, under unusual circumstances, result in an incomplete -I list in the compiler command line generated. You can duplicate the problem using the directory structure,
hdr/
hdr/first.h
hc/
hc/second.h
hc/src/
hc/src/fails.c
hc/src/works.c
and the following source files:
works.c:
#include "first.h"
main(){}
fails.c:
#include "../../hc/second.h"
first.h:
#include "../hc/second.h"
Makefile:
.SOURCE.h : ../../hdr
xxx :: works.c fails.c
Run nmake and fails.c won't compile because the -I list is incomplete. The problem happens because second.h is included by source files (first.h and fails.c) that are at different levels in the directory tree. The mistake has been fixed in release 3.1.2.
2.6 A scan strategy enhancement
The enhancement allows attribute removal directly from scan rules (e.g., .SCAN.c). The Scanrules.mk syntax looks something like,
I| \# include <%>|A-.LCL.INCLUDE|A.STD.INCLUDE|
which eliminates .LCL.INCLUDE using the new attribute removal technique before assigning .STD.INCLUDE. The default version of .SCAN.c in Scanrules.mk doesn't currently use the enhancement, but the required code is in the nmake engine, so the technique is available as a work-around.
2.7 Makerules.mk
The following fixes were made in Makerules.mk:
- Use of the Lucent C++ 4.0 compiler's --prelink_copy_if_nonlocal option in CCFLAGS has been corrected.
- Missing $(CCFLAGS) when instrument is used has been fixed.
- Missing -ptr flags when using Sun's C++ compiler to build libraries has been added.
2.8 cpp
The following fixes were made in cpp:
- cpp no longer goes into an infinite loop when handed
#define X XX <T> x; - An obscure cpp boundary problem has been fixed. The mistake only surfaced when cpp dealt with 20 character macro names that end in 'L'.
- The incorrect processing of header files that don't end with a newline has been corrected.
2.9 ppcc
The following fixes were made in ppcc:
- ppcc now recognizes .cc suffix file name as input.
- The compiler's -PIC option is no longer handed to cpp.
- The -D-M and -I-D flags that control cpp are no longer passed to cc.
- ppcc now accepts any file suffix when the -E or -P options are used.
- Added an ERR to trap to catch compiler error exit code.
- Changed the srcpp initialization to avoid a null value that occasionally caused problems.
2.10 probe
The following fixes were made in make probe:
- A minor fix for testing PREROOT
- A fix in probing for CC.STDLIB when in uts preroot situation
- A fix in probing for C++'s --prelink_copy_if_nonlocal option
- and CC.REQUIRE.++ again
The following fixes made in pp probe:
- A fix for the cpp of HP's C++ where __STDC__ is not defined but it is ANSI cpp
- A fix for C++ with compatibility or transition mode
[Table of Contents] [Previous Section] [Next Section]







