uhhh, use Make as The Creator intended (was Re: help with make needed)

Svante Lindahl zap at front.se
Tue May 2 21:29:37 AEST 1989


In article <4351 at omepd.UUCP>, merlyn at intelob.intel.com (Randal L. Schwartz @ Stonehenge) writes:
> Whoa, whoa, whoa.  Why not just:

> $(TARGET):: Makefile
> 	-rm -f $@
> 
> $(TARGET):: fred.o barney.o wilma.o betty.o
> 	ar r $@ $?

Yes! A pair of double colon rules works nicely for this situation.
Although I think the second rule should be:

$(TARGET)::	$(OBJECTS)
		ranlib $@

as suggested by Root Boy Jim in another posting, and Leo de Wit in a
posting that didn't make it out, but which was mailed to me.

Thank you, everybody!

Svante



More information about the Comp.unix.questions mailing list