Article View: gnu.utils.bug
Article #112Can GNU make remove *.o when using archives and explict dependencies
From: J.T. Conklin
Date: Tue, 07 Apr 1992 09:43
Date: Tue, 07 Apr 1992 09:43
19 lines
1043 bytes
1043 bytes
With the following Makefile: >libfoo.a: libfoo.a(tar.o) libfoo.a(foo.o) libfoo.a(bar.o) Gnu Make 3.62 will create libfoo.a from tar.c, foo.c, and bar.c; then remove the *.o files automaticaly. But if I add explicit dependencies to the makefile (so libfoo.a is updated if tar.h, foo.h, or bar.h is changed), >libfoo.a: libfoo.a(tar.o) libfoo.a(foo.o) libfoo.a(bar.o) > >tar.o: tar.c tar.h >foo.o: foo.c foo.h >bar.o: bar.c bar.h Gmake no longer removes the *.o files. Is there a way to get the same behavior as with the implict dependancies, or do I have to add an `rm' to the Makefile to clean up myself?
Technical Details
Message-ID:
<9204072343.AA05465@genoa.gain.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gain.com!jtcShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gain.com!jtc From: jtc@gain.com (J.T. Conklin) Subject: Can GNU make remove *.o when using archives and explict dependencies Message-ID: <9204072343.AA05465@genoa.gain.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 7 Apr 1992 09:43:28 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 23