Dear LazyWeb - FreeBSD makefiles

Mark Blackman mark at blackmans.org
Thu Nov 19 11:24:59 GMT 2009


On 19/11/2009 11:07, Mark Blackman wrote:
> 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.

And that example unintentionally reversed the dependency order
as well as leaving out the 'do all such files' bit.

It should have been '.pod.l' and needs a pseudo target like 'all'
to trigger the transformation rules.

- Mark



More information about the london.pm mailing list