svn commit: r235268 - in head: gnu/usr.bin/sort share/mk tools/build/options usr.bin

Gabor Kovesdan gabor at FreeBSD.org
Fri May 11 12:47:22 UTC 2012


Author: gabor
Date: Fri May 11 12:47:21 2012
New Revision: 235268
URL: http://svn.freebsd.org/changeset/base/235268

Log:
  - Hook up BSD sort to the build.  By default, it will be installed as
    "bsdsort" and GNU sort will be the default "sort".  When WITH_BSD_SORT
    is set, BSD sort will be the default "sort" and GNU sort will be installed
    as "gnusort".

Added:
  head/tools/build/options/WITH_BSD_SORT   (contents, props changed)
Modified:
  head/gnu/usr.bin/sort/Makefile
  head/share/mk/bsd.own.mk
  head/usr.bin/Makefile

Modified: head/gnu/usr.bin/sort/Makefile
==============================================================================
--- head/gnu/usr.bin/sort/Makefile	Fri May 11 12:37:16 2012	(r235267)
+++ head/gnu/usr.bin/sort/Makefile	Fri May 11 12:47:21 2012	(r235268)
@@ -3,7 +3,18 @@
 SORTDIR= ${.CURDIR}/../../../contrib/gnu-sort
 .PATH: ${SORTDIR}/lib ${SORTDIR}/src ${SORTDIR}/man
 
+.include <bsd.own.mk>
+
+.if ${MK_BSD_SORT} != "yes"
 PROG=	sort
+.else
+PROG=	gnusort
+
+CLEANFILES+= gnusort.1
+gnusort.1: sort.1
+	cp ${.ALLSRC} ${.TARGET}
+.endif
+
 SRCS=   sort.c \
 	__fpending.c \
 	argmatch.c \

Modified: head/share/mk/bsd.own.mk
==============================================================================
--- head/share/mk/bsd.own.mk	Fri May 11 12:37:16 2012	(r235267)
+++ head/share/mk/bsd.own.mk	Fri May 11 12:47:21 2012	(r235268)
@@ -413,6 +413,7 @@ __DEFAULT_YES_OPTIONS = \
 
 __DEFAULT_NO_OPTIONS = \
     BSD_GREP \
+    BSD_SORT \
     BIND_IDN \
     BIND_LARGE_FILE \
     BIND_LIBS \

Added: head/tools/build/options/WITH_BSD_SORT
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/build/options/WITH_BSD_SORT	Fri May 11 12:47:21 2012	(r235268)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Install BSD-licensed sort as 'sort' instead of GNU sort.

Modified: head/usr.bin/Makefile
==============================================================================
--- head/usr.bin/Makefile	Fri May 11 12:37:16 2012	(r235267)
+++ head/usr.bin/Makefile	Fri May 11 12:47:21 2012	(r235268)
@@ -141,6 +141,7 @@ SUBDIR=	alias \
 	shar \
 	showmount \
 	sockstat \
+	sort \
 	split \
 	stat \
 	stdbuf \


More information about the svn-src-head mailing list