Dear LazyWeb - FreeBSD makefiles

Mark Blackman mark at blackmans.org
Thu Nov 19 11:07:49 GMT 2009


On 19/11/2009 08:26, Simon Wistow wrote:
> I have a Makefile (actually a Makefile.am from autoconf but that's
> not important, I think( and it has the rule
>
> %.1: -rm -f $@ pod2man --center="TimeSpliceDB Documentation" --lax \
> --release='$(VERSION)' $(@).pod>  $@
>
>
> Which takes everything of the form<name>.1.pod and truns it into a
> man page.
>
> Which works fine and lovely on my available Mac and Linux boxen but
> fails dismally on my FreeBSD box.
>
> How does one do wildcard Make fules in bsdmake? Please tell me I
> don't have to add 20 nearly identical rules because that will make me
> cry.
>

I believe BSD make would normally handle these as transformations (with
specific suffix pairs) and they look like (adapted from
/usr/share/doc/psd/12.make/paper.ascii.gz)

.SUFFIXES       : .pod .l
.l.pod          :
                 -rm -f $@
                 pod2man --center="TimeSpliceDB Documentation" \
                 --lax --release='$(VERSION)' $< > $@

I've no idea if recent versions have a more gnumake-ish options.

- Mark









More information about the london.pm mailing list