|
|||
Why do my files rebuild when nothing has changed?nmake can explainThe first thing to know is the nmake -e (explain) flag, which causes nmake to provide output "explaining" why it is taking certain actions. If things rebuild when you think they shouldn't try running 'nmake -e' and examine the output (it is not nearly as rough as the debug output.) The following example shows that hello.c was recompiled because an included header file had changed:
include/hello.h [Feb 10 09:35:32 2000] has changed [Feb 10 09:35:18 2000]
+ ppcc -i /tools/nmake/sparc5/lu3.2/lib/cpp cc -O -I-D/tools/nmake/sparc5
/lu3.2/lib/probe/C/pp/D586199Dobincc -Iinclude -I- -c hello.c
+ ppcc -i /tools/nmake/sparc5/lu3.2/lib/cpp cc -O -o hello hello.o
Makefile issuesMost often unnecessary rebuilds are caused by problems in the makefiles. Typical mistakes are the following:
Source code issuesIncluding the same header in an inconsistent manor in multiple source files managed by the same makefile may cause code to rebuild. For example, one peice of code may use the follwing include directive:
#include </usr/include/sys/wait.h>
While other code uses the more correct directive:
#include <sys/wait.h>
This inconsistency can cause nmake to rebuild some of the files in the makefile. In this example changing the first source file to use <sys/wait.h> will solve the problem. Release 3.1.2 problemThere is a known problem in release 3.1.2 which may cause files to rebuild under the conditions below. The problem is fixed in release lu3.2.
Still rebuilding?If you still cannot figure out why things are rebuilding send details to technical support, we will help you identify the cause of such problems. Last Update: Wednesday,20-Dec-06 13:22:00 CST
|
|||