diff options
author | gabor <gabor@FreeBSD.org> | 2012-05-11 12:47:21 +0000 |
---|---|---|
committer | gabor <gabor@FreeBSD.org> | 2012-05-11 12:47:21 +0000 |
commit | 52bc32b6b5375223eeb386b2825c3d811166c8ba (patch) | |
tree | 051de9c11eb2cfc3d761225e1c0ac15748116135 | |
parent | 3c7b03ea74b862095c3b09bcccda2b9e58124cac (diff) | |
download | FreeBSD-src-52bc32b6b5375223eeb386b2825c3d811166c8ba.zip FreeBSD-src-52bc32b6b5375223eeb386b2825c3d811166c8ba.tar.gz |
- 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".
-rw-r--r-- | gnu/usr.bin/sort/Makefile | 11 | ||||
-rw-r--r-- | share/mk/bsd.own.mk | 1 | ||||
-rw-r--r-- | tools/build/options/WITH_BSD_SORT | 2 | ||||
-rw-r--r-- | usr.bin/Makefile | 1 |
4 files changed, 15 insertions, 0 deletions
diff --git a/gnu/usr.bin/sort/Makefile b/gnu/usr.bin/sort/Makefile index e3a005d..a116a63 100644 --- a/gnu/usr.bin/sort/Makefile +++ b/gnu/usr.bin/sort/Makefile @@ -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 \ diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 6b5180a..9802e79 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -413,6 +413,7 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ BSD_GREP \ + BSD_SORT \ BIND_IDN \ BIND_LARGE_FILE \ BIND_LIBS \ diff --git a/tools/build/options/WITH_BSD_SORT b/tools/build/options/WITH_BSD_SORT new file mode 100644 index 0000000..a9e654d --- /dev/null +++ b/tools/build/options/WITH_BSD_SORT @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install BSD-licensed sort as 'sort' instead of GNU sort. diff --git a/usr.bin/Makefile b/usr.bin/Makefile index ce8e48c..bcdfbcd 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -141,6 +141,7 @@ SUBDIR= alias \ shar \ showmount \ sockstat \ + sort \ split \ stat \ stdbuf \ |