Makefile for Compressed files (.o.Z)

Dan Gill dan at systech.UUCP
Wed Apr 17 03:00:39 AEST 1991


In article <4807 at gumby.Altos.COM>, clp at gumby.Altos.COM (Chuck L. Peterson) writes:
> >   the appropriate file when it is needed.  Let's limit the discussion
> >   to just .o files.
> >
> > It seems that one would want to define a rule to take *.o.Z files and
> >   make them into *.o files:
> >       .o.Z.o:
> >               uncompress $<
> >   but I think that the multiple '.'s in the rule confuses MAKE.  I
> Ever tried cake? There you can write something like:
> %.o.Z: %.o
>         uncompress %.o
> Joachim

I have found that if you want do this that you need to escape the
first `.', and then make is happy.  

Try this:

.SUFFIXES:
.SUFFIXES: .o\.Z .o

.o\.Z.o:
	uncompress $<

I have tried this on a sun3/60, and it works good.

Dan



More information about the Comp.unix mailing list