Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site wateng.UUCP Path: utzoo!watmath!wateng!joe From: joe@wateng.UUCP (Joe Morrison) Newsgroups: net.unix Subject: Re: Problem with make. Message-ID: <2684@wateng.UUCP> Date: Thu, 18-Jul-85 16:38:15 EDT Article-I.D.: wateng.2684 Posted: Thu Jul 18 16:38:15 1985 Date-Received: Fri, 19-Jul-85 01:08:08 EDT References: <145@iitcs.UUCP> Reply-To: joe@wateng.UUCP (Joe Morrison) Distribution: net Organization: U of Waterloo, Ontario Lines: 28 Summary: In article <145@iitcs.UUCP> draughn@iitcs.UUCP (Mark draughn) writes: >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. Since adding something to an archive updates the timestamp, you could use a makefile like the one below. This lists in one place the fact that the archive is dependent on all the files. If any files change, the ones that have changed (this is what $? does) are recompiled and stuffed back into the archive. --------------------------------------------------------------------------- FILES = routine1.c \ routine2.c \ routine3.c stuff.a: $(FILES) cc -c -O $? ar rv stuff.a *.o ranlib stuff.a rm *.o --------------------------------------------------------------------------- -- Joe Morrison Systems on Silicon Group @ University of Waterloo -- -- -- -- decvax ! -- -- -- -- allegra ! watmath ! wateng ! joe -- -- -- -- -- ihnp4 !