From owner-freebsd-current@freebsd.org Sat Dec 19 20:31:31 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3F9EA4CD36 for ; Sat, 19 Dec 2015 20:31:31 +0000 (UTC) (envelope-from carsten.kunze@arcor.de) Received: from mail-in-01.arcor-online.net (mail-in-01.arcor-online.net [151.189.21.41]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.arcor.de", Issuer "Thawte SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 77DB311D2 for ; Sat, 19 Dec 2015 20:31:31 +0000 (UTC) (envelope-from carsten.kunze@arcor.de) Received: from mail-in-02-z2.arcor-online.net (mail-in-02-z2.arcor-online.net [151.189.8.14]) by mx.arcor.de (Postfix) with ESMTP id 3pNJcV1mdgzFR64; Sat, 19 Dec 2015 21:31:22 +0100 (CET) Received: from mail-in-10.arcor-online.net (mail-in-10.arcor-online.net [151.189.21.50]) by mail-in-02-z2.arcor-online.net (Postfix) with ESMTP id 30F3F718141; Sat, 19 Dec 2015 21:31:22 +0100 (CET) Received: from webmail20.arcor-online.net (webmail20.arcor-online.net [151.189.8.201]) by mail-in-10.arcor-online.net (Postfix) with ESMTP id 3pNJcV1CPsz8Rtf; Sat, 19 Dec 2015 21:31:22 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-10.arcor-online.net 3pNJcV1CPsz8Rtf DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1450557082; bh=ejLh1KpkAg6WMTBHjpUJUWhPlBCieYPoJYBwjairYo4=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type:Content-Transfer-Encoding; b=E3i8JB3IvYufrmrcKJE515pWP6/A5tknUltpyAam5VWtbBVyZjmDS8PF6bda45ayl zTMDSAUz4SkXJyrDLQdG0KYxSXG5wUu0mNrfLRsuEQewuQ64BpwDb7ZtVcsw6zWA9D BRmyroNY936kNvQZio2P2tdQmUv5jprogj49YX8A= Received: from [84.179.13.20] by webmail20.arcor-online.net (151.189.8.201) with HTTP (Arcor Webmail); Sat, 19 Dec 2015 21:31:21 +0100 (CET) Date: Sat, 19 Dec 2015 21:31:22 +0100 (CET) From: Carsten Kunze To: freebsd-current@freebsd.org Cc: bertrand.garrigues@laposte.net Message-ID: <1234906713.211619.1450557082156.JavaMail.ngmail@webmail20.arcor-online.net> In-Reply-To: <20151219151006.GA7132@vmw-debian7-64.jexium-island.net> References: <20151219151006.GA7132@vmw-debian7-64.jexium-island.net> <958008149.499994.1450191701294.JavaMail.ngmail@webmail08.arcor-online.net> Subject: Aw: Re: make .SUFFIXES bug? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-ngMessageSubType: MessageSubType_MAIL X-WebmailclientIP: 84.179.13.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2015 20:31:32 -0000 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 "test.1.man" and a makefile: > > > > .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 > > .SUFFIXES > 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" until it finds "test.1.man". So the ".man:" rule generates a from a .man, in this case test.1 from test.1.man. So I do not really see a bug in the makefile. Carsten