Add build opton MK_LS_COLORS to control whether ls(1) supports colors

(and thus needs to depend on libtermcap). Embedded systems may not
want or need colors.

Obtained from:	Juniper Networks, Inc.
This commit is contained in:
Marcel Moolenaar 2012-05-19 18:05:00 +00:00
parent aa39c44746
commit 6663ff446e
2 changed files with 5 additions and 1 deletions
bin/ls
share/mk

@ -1,12 +1,15 @@
# @(#)Makefile 8.1 (Berkeley) 6/2/93 # @(#)Makefile 8.1 (Berkeley) 6/2/93
# $FreeBSD$ # $FreeBSD$
.include <bsd.own.mk>
PROG= ls PROG= ls
SRCS= cmp.c ls.c print.c util.c SRCS= cmp.c ls.c print.c util.c
DPADD= ${LIBUTIL} DPADD= ${LIBUTIL}
LDADD= -lutil LDADD= -lutil
.if !defined(RELEASE_CRUNCH) .if !defined(RELEASE_CRUNCH) && \
${MK_LS_COLORS} != no
CFLAGS+= -DCOLORLS CFLAGS+= -DCOLORLS
DPADD+= ${LIBTERMCAP} DPADD+= ${LIBTERMCAP}
LDADD+= -ltermcap LDADD+= -ltermcap

@ -367,6 +367,7 @@ __DEFAULT_YES_OPTIONS = \
LOCALES \ LOCALES \
LOCATE \ LOCATE \
LPR \ LPR \
LS_COLORS \
MAIL \ MAIL \
MAILWRAPPER \ MAILWRAPPER \
MAKE \ MAKE \