From nobody@FreeBSD.org  Mon Aug  6 12:53:50 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id A9F1B37B403
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  6 Aug 2001 12:53:45 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f76Jrj182810;
	Mon, 6 Aug 2001 12:53:45 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200108061953.f76Jrj182810@freefall.freebsd.org>
Date: Mon, 6 Aug 2001 12:53:45 -0700 (PDT)
From: Joseph Mallett <jmallett@xMach.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: usr.bin/vi/Makefile has superfluous conditionals
X-Send-Pr-Version: www-1.0

>Number:         29489
>Category:       bin
>Synopsis:       usr.bin/vi/Makefile has superfluous conditionals
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 06 13:00:07 PDT 2001
>Closed-Date:    Thu Aug 9 00:03:14 PDT 2001
>Last-Modified:  Thu Aug 09 00:04:01 PDT 2001
>Originator:     Joseph Mallett
>Release:        4.3-STABLE
>Organization:
xMach.org
>Environment:
FreeBSD Dalek.xMach.ORG 4.3-STABLE FreeBSD 4.3-STABLE #0: Mon Jun 18 07:07:16 EDT 2001     jmallett@Dalek.xMach.ORG:/usr/home/jmallett/vmunix.build  i386
>Description:
rather than test for definition and test for lack of definition, using an else conditional (as is shown in the fix)
>How-To-Repeat:
look at the Makefile ?
>Fix:
--- Makefile.orig       Mon Aug  6 15:50:49 2001
+++ Makefile    Mon Aug  6 15:51:25 2001
@@ -66,9 +66,9 @@
 .if !defined(TKNVI)
 DPADD+=                ${LIBNCURSES}
 LDADD+=                -lncurses
-.endif

-.if defined(TKNVI)
+.else
+
 .PATH:         ${SRCDIR}/tk
 LDADD+=                -L/usr/local/lib -L/usr/X11R6/lib -ltk41 -lX11
 CFLAGS+=       -I/usr/local/include -I/usr/X11R6/include
Dalek# cd ../..
pwDalek# pwd
/usr/src
Dalek# diff -u usr.bin/vi/Makefile.orig usr.bin/vi/Makefile
--- usr.bin/vi/Makefile.orig    Mon Aug  6 15:50:49 2001
+++ usr.bin/vi/Makefile Mon Aug  6 15:51:25 2001
@@ -66,9 +66,9 @@
 .if !defined(TKNVI)
 DPADD+=                ${LIBNCURSES}
 LDADD+=                -lncurses
-.endif

-.if defined(TKNVI)
+.else
+
 .PATH:         ${SRCDIR}/tk
 LDADD+=                -L/usr/local/lib -L/usr/X11R6/lib -ltk41 -lX11
 CFLAGS+=       -I/usr/local/include -I/usr/X11R6/include

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Thu Aug 9 00:03:14 PDT 2001 
State-Changed-Why:  
applied, thanks.  I think the synopsis is a little misleading; nothing was 
superfluous, it just could've been written better.  I.e., this was a 
style fix. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29489 
>Unformatted:
