Help needed with Makefile rules

John M Sellens jmsellens at watmath.UUCP
Tue May 21 12:25:40 AEST 1985


The paper "Make -- A Program for Maintaining Computer Programs" by S.I. Feldman
of Bell Labs, Murray Hill, dated August 15, 1978 only mentions rules for use
when creating a file with a suffix from another file of the same name but with
a different suffix e.g. the .c.o rule.  (I believe that this is the original
documentation and specification of Make.)

The 4.2bsd make does not allow you to specify a rule with only one suffix
but the System Vr2 make does.  For example, a rule to create executables from
.o files could be
    .o:
	    cc -o $* $*.o  # $* is the common prefix

A trick that is used here at Waterloo is to use a .o.out rule to create
something.out and make a symbolic link to it with the appropriate suffix-less
name.

John



More information about the Comp.unix mailing list