NetBSD Problem Report #50550

From www@NetBSD.org  Mon Dec 14 09:58:12 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 237837ABDD
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 14 Dec 2015 09:58:12 +0000 (UTC)
Message-Id: <20151214095811.12A6E7ACBE@mollari.NetBSD.org>
Date: Mon, 14 Dec 2015 09:58:11 +0000 (UTC)
From: carsten.kunze@arcor.de
Reply-To: carsten.kunze@arcor.de
To: gnats-bugs@NetBSD.org
Subject: Deleting suffixes with an empty .SUFFIXES line causes issues in make
X-Send-Pr-Version: www-1.0

>Number:         50550
>Category:       toolchain
>Synopsis:       Deleting suffixes with an empty .SUFFIXES line causes issues in make
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 14 10:00:00 +0000 2015
>Last-Modified:  Sun Dec 04 07:05:00 +0000 2016
>Originator:     Carsten Kunze
>Release:        at least 7.0 up to CURRENT
>Organization:
>Environment:
NetBSD pcdd146.dmosdesign.com 7.99.23 NetBSD 7.99.23 (GENERIC.201512040830Z) #0: Fri Dec  4 09:27:03 UTC 2015  builds@b45.netbsd.org:/home/builds/ab/HEAD/amd64/201512040830Z-obj/home/source/ab/HEAD/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
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

.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.  So deleting suffixes with an empty .SUFFIXES line may cause issues.

(This problem was found while building current groff which does not work on NetBSD currently.)
>How-To-Repeat:
Create a file named test.1.man and a makefile with the contents shown in "Full description".  Run "make test.1" -> failes.  If ".SUFFIXES" is removed *and/or* ".man" is put at begin of the list it works.
>Fix:

>Audit-Trail:
From: Carsten Kunze <carsten.kunze@arcor.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/50550
Date: Sun, 4 Dec 2016 08:01:44 +0100 (CET)

 Tested, solution is working.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.