Further Adventures w/MS Make

Doug Asherman doug at gethen.UUCP
Tue Aug 16 13:44:44 AEST 1988


I am (again) having a slight problem with the Microsoft make utility.
I'll go through this step by step...bear with me, OK?

I have the following inference rules set up in TOOLS.INI in the UTIL
directory:

.c.obj
    cl -c $(CFLAGS) *.c

.obj.exe:
    link $(LFLAGS) $**,$@,$(MAP),$(LIBS);

and of course I've set the environment variable INIT to C:\UTIL.

So...I use the following makefile (called DEMO):

#makefile for DEMO.EXE
a.obj : a.c

b.obj : b.c

demo.exe : a.obj b.obj
#end of makefile

    The problem here is:  a.obj and b.obj are both built successfully.
However, demo.exe is not created.  If I change the name of either a or
b to demo, though, everything goes without a hitch.  I can only assume
from this that you can -only- build a .exe file if one of your .obj files
has the same name.  However, in the MS documentation on MAKE, they have
a file called TEST.EXE built from 3 .obj files called MOD1, MOD2, and
MOD3.  (Do I trust the docs?  Well, up till now...)

So...what am I doing wrong?  Everything I've read seems to indicate that
I should have no trouble, yet...

Any help on this would be greatly appreciated.


-- 
Current Address:                    :  "Get used to disappointment"
                                    :         -William Goldman
{ sun, ptsfa }                      :              from
!hoptoad!unisoft!gethen!doug        :         "The Princess Bride"



More information about the Comp.lang.c mailing list