Hi,
I am using NTTARGETFILE1 macro in the sources file, to create a specific
file during driver build (through build utility). It creates the file, as
expected. But it creates the files twice. DDK says "NTTARGETFILE1 is invoked
on pass one or later passes". I think the command specified in the
makefile.inc to create the file is invoked twice ( pass 1 and at the time of
linking). Because of this unwanted second time execution of the command,
compilation takes more time. Is there anything to avoid this unwanted stuff.
Something which gets executed only once, either at the time of compilation or
at the time of linking.
I have used the macro like...
In sources file...
.
.
NTTARGETFILE1=CreateMyFile

In makefile.inc ...
.
.
CreateMyFile:
CommandToCreateTheFile


Thanks,
--
MK

Re: Using NTTARGETFILE1 macro in driver build process by Ivan

Ivan
Fri Mar 14 10:37:34 CDT 2008

Can you express a dependency on the target that you have in the makefile.inc
?
This way it will be build only after the dependency has been built as well.

--

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"MK" <MK@discussions.microsoft.com> wrote in message
news:BFF926D4-0063-4862-84E0-8F9DDF6CCDED@microsoft.com...
> Hi,
> I am using NTTARGETFILE1 macro in the sources file, to create a specific
> file during driver build (through build utility). It creates the file, as
> expected. But it creates the files twice. DDK says "NTTARGETFILE1 is
> invoked
> on pass one or later passes". I think the command specified in the
> makefile.inc to create the file is invoked twice ( pass 1 and at the time
> of
> linking). Because of this unwanted second time execution of the command,
> compilation takes more time. Is there anything to avoid this unwanted
> stuff.
> Something which gets executed only once, either at the time of compilation
> or
> at the time of linking.
> I have used the macro like...
> In sources file...
> .
> .
> NTTARGETFILE1=CreateMyFile
>
> In makefile.inc ...
> .
> .
> CreateMyFile:
> CommandToCreateTheFile
>
>
> Thanks,
> --
> MK



Re: Using NTTARGETFILE1 macro in driver build process by MK

MK
Tue Mar 18 10:11:01 CDT 2008

Thanks for the reply.
I have few queries...
How to express this dependency?
Do we have any macro to express the dependency?

Thanks
--
MK


"Ivan Brugiolo [MSFT]" wrote:

> Can you express a dependency on the target that you have in the makefile.inc
> ?
> This way it will be build only after the dependency has been built as well.
>
> --
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of any included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
>
> "MK" <MK@discussions.microsoft.com> wrote in message
> news:BFF926D4-0063-4862-84E0-8F9DDF6CCDED@microsoft.com...
> > Hi,
> > I am using NTTARGETFILE1 macro in the sources file, to create a specific
> > file during driver build (through build utility). It creates the file, as
> > expected. But it creates the files twice. DDK says "NTTARGETFILE1 is
> > invoked
> > on pass one or later passes". I think the command specified in the
> > makefile.inc to create the file is invoked twice ( pass 1 and at the time
> > of
> > linking). Because of this unwanted second time execution of the command,
> > compilation takes more time. Is there anything to avoid this unwanted
> > stuff.
> > Something which gets executed only once, either at the time of compilation
> > or
> > at the time of linking.
> > I have used the macro like...
> > In sources file...
> > .
> > .
> > NTTARGETFILE1=CreateMyFile
> >
> > In makefile.inc ...
> > .
> > .
> > CreateMyFile:
> > CommandToCreateTheFile
> >
> >
> > Thanks,
> > --
> > MK
>
>
>

Re: Using NTTARGETFILE1 macro in driver build process by Ivan

Ivan
Tue Mar 18 13:13:07 CDT 2008

There is no need to express Inter-Pass dependencies.
Same pass dependencies are expressed in the usual makefile form:

<target> : <predecessor target>
<build command>

--

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"MK" <MK@discussions.microsoft.com> wrote in message
news:920E3DF0-18DC-40DF-92E1-9C8E76AC279D@microsoft.com...
> Thanks for the reply.
> I have few queries...
> How to express this dependency?
> Do we have any macro to express the dependency?
>
> Thanks
> --
> MK
>
>
> "Ivan Brugiolo [MSFT]" wrote:
>
>> Can you express a dependency on the target that you have in the
>> makefile.inc
>> ?
>> This way it will be build only after the dependency has been built as
>> well.
>>
>> --
>>
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> Use of any included script samples are subject to the terms specified at
>> http://www.microsoft.com/info/cpyright.htm
>>
>>
>> "MK" <MK@discussions.microsoft.com> wrote in message
>> news:BFF926D4-0063-4862-84E0-8F9DDF6CCDED@microsoft.com...
>> > Hi,
>> > I am using NTTARGETFILE1 macro in the sources file, to create a
>> > specific
>> > file during driver build (through build utility). It creates the file,
>> > as
>> > expected. But it creates the files twice. DDK says "NTTARGETFILE1 is
>> > invoked
>> > on pass one or later passes". I think the command specified in the
>> > makefile.inc to create the file is invoked twice ( pass 1 and at the
>> > time
>> > of
>> > linking). Because of this unwanted second time execution of the
>> > command,
>> > compilation takes more time. Is there anything to avoid this unwanted
>> > stuff.
>> > Something which gets executed only once, either at the time of
>> > compilation
>> > or
>> > at the time of linking.
>> > I have used the macro like...
>> > In sources file...
>> > .
>> > .
>> > NTTARGETFILE1=CreateMyFile
>> >
>> > In makefile.inc ...
>> > .
>> > .
>> > CreateMyFile:
>> > CommandToCreateTheFile
>> >
>> >
>> > Thanks,
>> > --
>> > MK
>>
>>
>>