possible bug in build utility?

OK, I’m probably missing something simple here, but this annoyed me for a
bit… I am not sure if it is me or if this is a bug in build.exe, and I
was curious if anyone else had seen this…

I am using a single parent directory to hold source code, and
subdirectories to hold makefile and sources files for building for
different platforms.

Example:

driverdir\ - holds the actual source code
driverdir\nt4 - holds both a ‘sources’ file and a ‘makefile’
driverdir\amd64 - holds both a ‘sources’ file and a ‘makefile’

Both ‘sources’ files use '…' prefixes in the SOURCES macro to reference
source code in ‘driverdir’.
Now, using the win2k build environment from the DDK (3790), I cd to
‘driverdir\nt4’ and do build -cZew. This *should* only build what is
specified in ‘driverdir\nt4\sources’ (I don’t include any other sources
files, there are no ‘dirs’ files, nada). Amazingly, the build utility
proceeds to process my ‘driverdir\nt4\sources’ file, *and then* processes
my ‘driverdir\amd64\sources’ file. I have NO references to the
‘amd64\sources’ file whatsoever in my nt4\sources file. If the
‘amd64\sources’ file has a different SOURCES macro than the ‘nt4\sources’
file, the ‘amd64\sources’ one is chosen and used to decide which files to
compile.
If I rename the ‘amd64’ directory to something other than ‘ia64’ or
‘i386’, then the ‘nt4’ directory builds as expected. So I can work around
it, but I was just curious if this is a bug or not.

I couldn’t find this ‘feature’ documented anywhere… and it may well be
that I just didn’t see it, but I figured I’d check… I have a simple
directory structure with 2 sources files that demonstrates this behavior,
so I know this isn’t unique to my actual project… and the behavior is
the same on DDKs 2600, 2600.1106, and 3790. The NT4 ddk, however, does not
have the problem…

If I’m missing something obvious, feel free to let me know (it wouldn’t be
the first time!)

sean

I cannot duplicate the problem. I had nt4 and amd64 as subdirectories and
built in nt4.

xxxxx@stg.com wrote:

Now, using the win2k build environment from the DDK (3790), I cd to
‘driverdir\nt4’ and do build -cZew. This *should* only build what is
specified in ‘driverdir\nt4\sources’ (I don’t include any other sources
files, there are no ‘dirs’ files, nada). Amazingly, the build utility
proceeds to process my ‘driverdir\nt4\sources’ file, *and then* processes
my ‘driverdir\amd64\sources’ file. –

If replying by e-mail, please remove “nospam.” from the address.

James Antognini
Windows DDK MVP

Perhaps you have a “dirs” file sitting around?

-Jeff

-----Original Message-----
From: James Antognini [mailto:xxxxx@mindspring.nospam.com]
Sent: Thursday, August 14, 2003 2:20 PM
To: Windows System Software Developers Interest List
Subject: [ntdev] Re: possible bug in build utility?

I cannot duplicate the problem. I had nt4 and amd64 as subdirectories and
built in nt4.

xxxxx@stg.com wrote:

Now, using the win2k build environment from the DDK (3790), I cd to
‘driverdir\nt4’ and do build -cZew. This *should* only build what is
specified in ‘driverdir\nt4\sources’ (I don’t include any other sources
files, there are no ‘dirs’ files, nada). Amazingly, the build utility
proceeds to process my ‘driverdir\nt4\sources’ file, *and then* processes
my ‘driverdir\amd64\sources’ file. –

If replying by e-mail, please remove “nospam.” from the address.

James Antognini
Windows DDK MVP


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.
**********************************************************************

I have quite a few dirs files, but none under the directory where the source
files were located, which the original appender called driverdir.

“Curless, Jeffrey” wrote:

Perhaps you have a “dirs” file sitting around?


If replying by e-mail, please remove “nospam.” from the address.

James Antognini
Windows DDK MVP

I put the sample zip file here:
http://www.stg.com/employees/sean/ddkbug/test.zip

This is what I get with 3790’s win2k checked environment:

---- snip ----
D:\test\nt4>dir
Volume in drive D is ddrive
Volume Serial Number is C0F1-48DA

Directory of D:\test\nt4

08/12/2003 03:57 PM

.
08/12/2003 03:57 PM ..
08/06/2003 03:13 PM 267 makefile
08/12/2003 03:52 PM 271 sources
2 File(s) 538 bytes
2 Dir(s) 17,967,808,512 bytes free

D:\test\nt4>build -cZew
BUILD: Adding /Y to COPYCMD so xcopy ops won't hang.
BUILD: Object root set to: ==> objchk_w2K_x86
BUILD: Compile and Link for i386
BUILD: Examining d:\test\nt4 directory for files to compile.
BUILD: Compiling d:\test\nt4 directory
NMAKE : U1073: don't know how to make
'objchk_w2K_x86\i386\this_should_not_be_c
ompiled.obj'
BUILD: nmake.exe failed - rc = 2
BUILD: Done

---- snip ----

Note that the only place that "this_should_not_be_compiled.c" is specified
is in the amd64\sources file, which isn't referenced at all...

or I could be missing something else that is simple :\