Thomas Dickey <> wrote:
> On Tue, Dec 15, 2015 at 04:01:41PM +0100, Carsten Kunze wrote:
> > current groff doesn't build on FreeBSD.  I had noticed the same issue some
> > months ago on NetBSD and cross checked on FreeBSD and it had worked on
> > FreeBSD.  There must have somethig changed since then.  How to reproduce:
> > 
> > When there is a file "" and a makefile:
> > 
> > .SUFFIXES: .roff .in .ps .mom .pdf .me .ms .ps .html .txt .texi .dvi .pdf
> > .xhtml .man .c .cpp .log .o .obj .sed .sin .test .test$(EXEEXT) .trs .ypp
> According to POSIX
>     Prerequisites of .SUFFIXES shall be appended to the list of known
> suffixes
>     and are used in conjunction with the inference rules (see Inference
> Rules). 
>     If .SUFFIXES does not have any prerequisites, the list of known
> suffixes
>     shall be cleared.
> and goes on to list the expected suffixes:
> .SUFFIXES: .o .c .y .l .a .sh .f .c? .y? .l? .sh? .f?

Why is this relevant?  The first "empty" .SUFFIXES line in the example
above clears all default (or previously set) suffixes and the second one
sets the project relevant suffixes.  So I can assume that for the following
suffix rules *these* specified suffixes are used.

> > .man:
> >         @echo Making $@ from $<
> >         rm -f $@
> >         @LC_ALL=C \
> >          sed -e "s|foo|bar|g" \
> >          $< >$@
> > 
> > "make test.1" results in "make: don't know how to make test.1. Stop".
> > 
> > When ".man" is put to the start of the list it works.  It also works when
> > the first .SUFFIXES line is removed.
> > 
> > The answer from NetBSD is that this is very likely a bug in make.  May
> > this
> > also be the case for FreeBSD?
> That's ironic, considering that a while back they were adamant that if
> the suffix wasn't in the list cited in POSIX, then it was a bug in the
> makefile.

I agree, but ".man" is in the list.
> Your example does not list a suffix for ".1".  It would be harmless to
> update groff's makefile to provide that, and a corresponding suffix-rule.

Please don't consider .1 as a suffix here.  The task is to make "test.1", it
could also be named test_1 or whatever.  So according to the known
suffixes make looks for a file "test.1<suffix>" until it finds "".
So the ".man:" rule generates a <file> from a <file>.man, in this case
test.1 from  So I do not really see a bug in the makefile.

_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to