Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Dec 2015 10:10:06 -0500
From:      Thomas Dickey <dickey@his.com>
To:        Carsten Kunze <carsten.kunze@arcor.de>
Cc:        freebsd-current@freebsd.org
Subject:   Re: make .SUFFIXES bug?
Message-ID:  <20151219151006.GA7132@vmw-debian7-64.jexium-island.net>
In-Reply-To: <958008149.499994.1450191701294.JavaMail.ngmail@webmail08.arcor-online.net>
References:  <958008149.499994.1450191701294.JavaMail.ngmail@webmail08.arcor-online.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--0OAP2g/MAC+5xKAE
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Dec 15, 2015 at 04:01:41PM +0100, Carsten Kunze wrote:
> Hello,
>=20
> current groff doesn't build on FreeBSD.  I had noticed the same issue som=
e months ago on NetBSD and cross checked on FreeBSD and it had worked on Fr=
eeBSD.  There must have somethig changed since then.  How to reproduce:
>=20
> When there is a file "test.1.man" and a makefile:
>=20
> .SUFFIXES:
> .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

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html

=2ESUFFIXES
    Prerequisites of .SUFFIXES shall be appended to the list of known suffi=
xes
    and are used in conjunction with the inference rules (see Inference Rul=
es).=20
    If .SUFFIXES does not have any prerequisites, the list of known suffixes
    shall be cleared.

and goes on to list the expected suffixes:

=2ESUFFIXES: .o .c .y .l .a .sh .f .c=CB=9C .y=CB=9C .l=CB=9C .sh=CB=9C .f=
=CB=9C

> .man:
>         @echo Making $@ from $<
>         rm -f $@
>         @LC_ALL=3DC \
>          sed -e "s|foo|bar|g" \
>          $< >$@
>=20
> "make test.1" results in "make: don't know how to make test.1. Stop".
>=20
> When ".man" is put to the start of the list it works.  It also works when=
 the first .SUFFIXES line is removed.
>=20
> The answer from NetBSD is that this is very likely a bug in make.  May th=
is
> 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.

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.

--=20
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net

--0OAP2g/MAC+5xKAE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlZ1c04ACgkQcCNT4PfkjttkKACbBqWX6D7RvtHQOXAAV/yoFOec
+5EAoKaQUON2okU2NHs8Keb0MlRoCUWw
=4vzj
-----END PGP SIGNATURE-----

--0OAP2g/MAC+5xKAE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151219151006.GA7132>