Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site iitcs.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ihnp4!iitcs!draughn
From: draughn@iitcs.UUCP (Mark Draughn)
Newsgroups: net.unix
Subject: Problem with make.
Message-ID: <145@iitcs.UUCP>
Date: Thu, 11-Jul-85 16:20:48 EDT
Article-I.D.: iitcs.145
Posted: Thu Jul 11 16:20:48 1985
Date-Received: Sat, 13-Jul-85 09:33:38 EDT
Reply-To: draughn@iitcs.UUCP (Mark draughn)
Distribution: net
Organization: Illinois Institute of Technology, Chicago Il.
Lines: 27
Summary: 

This is probably a case of stupidity on my part, but here is my problem:

I'm trying to use make to maintain an archive of .o files.  I want
the archive modules to depend directly on the source files, so I don't
need to keep the object files around.  From the documentation, I thought
a dependency declaration like this would work in the makefile:

library.a(module.o) : module.c
        cc -c module.c
        ar r library.a module.o
        rm module.o

The problem is that the commands are executed every time, even if the module
is up to date.  The problem also arises if I make the module depend on
the .o file.  I tried it like this:

library.a(module.o) :
        cc -c module.c
        ar r library.a module.o
        rm module.o

and it still fails which means that make doesn't even realize it exists.
Is this a problem with make or am I just being a luser who isn't
abusing make properly?
Any help would be appreciated.

                                     Mark Draughn