[comp.os.msdos.programmer] Microsoft Nmake Problem

andy@balr.com (Andrew Little) (12/28/90)

I am having a problem with the $? macro in Microsoft's Nmake version
1.11.  Consider the following fragment (directly from the help
examples):

trig.lib : sin.obj cos.obj arctan.obj
        !lib trig.lib -+$?;

This is supposed to update trig.lib with an object file if one of
the objects (or source) is newer than trig.lib by running lib once
for each changed object.  If trig.lib is newest, nothing happens
(correct).  But if a single object is newer, then lib is run THREE
times, and adds each object instead of running once and adding only
the new object.  This is clearly not what is intended (by me, or by
Microsoft according to the docs).

Am I missing something here?  Or is there a problem with this
version of nmake?  Is there a newer version that handles this
correctly?

All comments welcome.

Andy Little
andy@balr.com

"That's what dads do - yell, and barbeque" - The Golden Girls

edwill@earth.lerc.nasa.gov (Glenn L. Williams) (01/04/91)

In article <1990Dec28.143140.16096@balr.com>, andy@balr.com (Andrew Little) writes...
>I am having a problem with the $? macro in Microsoft's Nmake version
>1.11.  Consider the following fragment (directly from the help
>examples):
> 
>trig.lib : sin.obj cos.obj arctan.obj
>        !lib trig.lib -+$?;
> 
>This is supposed to update trig.lib with an object file if one of
>the objects (or source) is newer than trig.lib by running lib once
>for each changed object.  If trig.lib is newest, nothing happens
>(correct).  But if a single object is newer, then lib is run THREE
>times, and adds each object instead of running once and adding only
>the new object.  This is clearly not what is intended (by me, or by
>Microsoft according to the docs).
> 
>Am I missing something here?  Or is there a problem with this
>version of nmake?  Is there a newer version that handles this
>correctly?
> 
>All comments welcome.
> 
>Andy Little
>andy@balr.com
> 
>"That's what dads do - yell, and barbeque" - The Golden Girls

I haven't checked the versions , but Microsoft has a low-cost
maintenance update to C6.0.