From slaven@rezic.de  Tue Aug 20 18:49:35 2013
Return-Path: <slaven@rezic.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 918D11CC
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Aug 2013 18:49:35 +0000 (UTC)
	(envelope-from slaven@rezic.de)
Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187])
	(using TLSv1 with cipher RC4-SHA (128/128 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 0D81B2404
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Aug 2013 18:49:34 +0000 (UTC)
Received: from localhost.localdomain (g230112161.adsl.alicedsl.de [92.230.112.161])
	by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis)
	id 0MFbev-1VH22z1ptV-00EbxX; Tue, 20 Aug 2013 20:49:32 +0200
Received: from cvrsnica.herceg.de (cvrsnica.herceg.de [192.168.1.10])
	by biokovo.herceg.de (8.14.3/8.14.3) with ESMTP id r7KInLGC070644
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Aug 2013 20:49:21 +0200 (CEST)
	(envelope-from eserte@cvrsnica.herceg.de)
Received: from cvrsnica.herceg.de (localhost [127.0.0.1])
	by cvrsnica.herceg.de (8.14.5/8.14.5) with ESMTP id r7KInLgM074305
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Aug 2013 20:49:21 +0200 (CEST)
	(envelope-from eserte@cvrsnica.herceg.de)
Received: (from eserte@localhost)
	by cvrsnica.herceg.de (8.14.5/8.14.5/Submit) id r7KInKfb074304;
	Tue, 20 Aug 2013 20:49:20 +0200 (CEST)
	(envelope-from eserte)
Message-Id: <201308201849.r7KInKfb074304@cvrsnica.herceg.de>
Date: Tue, 20 Aug 2013 20:49:20 +0200 (CEST)
From: Slaven Rezic <slaven@rezic.de>
Reply-To: slaven@rezic.de
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: /usr/bin/file cannot detect BSD makefiles
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         181436
>Category:       bin
>Synopsis:       file(1) cannot detect BSD makefiles
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 20 18:50:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Wed Aug 21 01:24:32 UTC 2013
>Originator:     Slaven Rezic
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
www.rezic.de
>Environment:
System: FreeBSD cvrsnica.herceg.de 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64


	The behavior is visible with FreeBSD 9.0 (file-5.03) and
	FreeBSD 10.0 (file-5.11).

>Description:
	Most BSD makefiles are not recognized by /usr/bin/file as
	such. Worse, if less is configured to use lesspipe from the
	ports (misc/lesspipe), then many BSD makefiles are recognized
	as troff files, causing unreadable input.

>How-To-Repeat:
	For example:

	    cd /usr/share/mk
	    /usr/bin/file * | grep -i troff | wc -l

	Or configure less to use lesspipe as per lesspipe's manpage
	(see FILTER ACTIVATION section) and try to use less on any of
	misrecognized BSD makefiles.

>Fix:

	Maybe adding keywords as ".if", ".include", ".else" etc. as
	BSD makefile keywords before the troff section could help.


>Release-Note:
>Audit-Trail:
>Unformatted:
