One more real life scenario where removing TARGETPATH caused problems.
Originally, I expected I’m not affected with the change and all I need
is to edit my SOURCES file for Win7 drivers. But I am. I have a trace
library which is shared between all drivers I have. It is pretty stable
and nothing changed there for years. Because of a friendly nature of
build it has to be built as a library and linked to drivers. So it has
to have its own SOURCES file. There was of course TARGETPATH defined
because it was mandatory in times when I wrote it. Now it broke the
build of Win7 driver because library is always built by WDK used for
given project (which is IMO the only safe way).
Well, let’s remove it and everything will be OK. But I can’t. I have
some old drivers built by 3790.1830 and even 2600.1106 DDKs where it was
mandatory. Drivers are only built for upgrade scenarios when they’re
used to extract files from old encrypted images to a new format handled
by diffent software. But they have to be built event with the newest
software to be included there. The requirement is nothing really change,
only version info which has to be current. That’s why I can’t switch
these projects to newer DDKs because they would have to be completely
retested (call it paranoia but we resist on it).
Well, I solved it, but it costed some time and one broken nighty build.
Please, for the future, never remove what was mandatory in the past. It
isn’t very funny:
DDK 3790.1830:
!IFNDEF TARGETPATH
! ERROR Your .\sources. file must define the TARGETPATH= macro
!ENDIF
WDK 7000:
!if defined(TARGETPATH)
!error $(MAKEDIR): TARGETPATH is no longer allowed. Remove it.
!endif
My temporary solution for the shared library:
!IFNDEF _NT_TARGET_VERSION_WIN7
TARGETPATH=obj
!ENDIF
Best regards,
Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@microsoft.com
Sent: Tuesday, January 20, 2009 7:43 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WDK7 custom target path
Thanks all for the feedback!
Binplace can do more, TARGETPATH will be restored. We will
consider customizing the _NTTREE and intemediate output so
they can be redirected as desired. Right now they are
predefined in setenv.bat (_NTTREE and OBJECT_ROOT).
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer