summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2008-06-16 05:48:15 +0000
committerdougb <dougb@FreeBSD.org>2008-06-16 05:48:15 +0000
commitaab693d38cf65888cc33b7b946ce34c1913846d1 (patch)
tree99c6827a2e7144624bf91733ea77fd80d6aaffb5
parenta7b386d2c5903efa1dfcce5093ee074e399e23d2 (diff)
downloadFreeBSD-src-aab693d38cf65888cc33b7b946ce34c1913846d1.zip
FreeBSD-src-aab693d38cf65888cc33b7b946ce34c1913846d1.tar.gz
1. Make the BSD version of cpio the default [1]
a. The BSD version will be built and installed unless WITHOUT_BSD_CPIO is defined. b. The GNU version will not be built or installed unless WITH_GNU_CPIO is defined. If this is defined, the symlink in /usr/bin will be to the GNU version whether the BSD version is present or not. When these changes are MFCed the defaults should be flipped. 2. Add a knob to disable the building of GNU grep. This will make it easier for those that want to test the BSD version in the ports. Approved by: kientzle [1]
-rw-r--r--gnu/usr.bin/Makefile12
-rw-r--r--gnu/usr.bin/cpio/Makefile2
-rw-r--r--share/mk/bsd.own.mk3
-rw-r--r--tools/build/options/WITHOUT_BSD_CPIO3
-rw-r--r--tools/build/options/WITHOUT_GNU_GREP2
-rw-r--r--tools/build/options/WITH_GNU_CPIO6
-rw-r--r--usr.bin/Makefile6
-rw-r--r--usr.bin/cpio/Makefile2
8 files changed, 30 insertions, 6 deletions
diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile
index b54f840..10f2300 100644
--- a/gnu/usr.bin/Makefile
+++ b/gnu/usr.bin/Makefile
@@ -5,7 +5,7 @@
SUBDIR= bc \
${_binutils} \
${_cc} \
- cpio \
+ ${_cpio} \
${_cvs} \
dc \
dialog \
@@ -13,7 +13,7 @@ SUBDIR= bc \
diff3 \
${_gdb} \
${_gperf} \
- grep \
+ ${_grep} \
${_groff} \
${_man} \
patch \
@@ -30,10 +30,18 @@ _groff= groff
.endif
.endif
+.if ${MK_GNU_CPIO} == "yes"
+_cpio= cpio
+.endif
+
.if ${MK_CVS} != "no"
_cvs= cvs
.endif
+.if ${MK_GNU_GREP} != "no"
+_grep= grep
+.endif
+
.if ${MK_MAN} != "no"
_man= man
.endif
diff --git a/gnu/usr.bin/cpio/Makefile b/gnu/usr.bin/cpio/Makefile
index 211b068..96ac02a 100644
--- a/gnu/usr.bin/cpio/Makefile
+++ b/gnu/usr.bin/cpio/Makefile
@@ -62,9 +62,7 @@ CFLAGS+=-I${.OBJDIR} -I${.CURDIR} -I${CPIODIR}/lib -DHAVE_CONFIG_H \
gcpio.1: ${CPIODIR}/doc/cpio.1
cat ${CPIODIR}/doc/cpio.1 >gcpio.1
-.if !defined(WITH_BSDCPIO)
SYMLINKS=gcpio ${BINDIR}/cpio
MLINKS=gcpio.1 cpio.1
-.endif
.include <bsd.prog.mk>
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 04d59e5..e358e31 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -287,6 +287,7 @@ WITH_IDEA=
ATM \
AUDIT \
AUTHPF \
+ BSD_CPIO \
BIND \
BIND_DNSSEC \
BIND_ETC \
@@ -312,6 +313,7 @@ WITH_IDEA=
GCOV \
GDB \
GNU \
+ GNU_GREP \
GPIB \
GROFF \
HTML \
@@ -374,6 +376,7 @@ MK_${var}:= yes
#
.for var in \
BIND_LIBS \
+ GNU_CPIO \
HESIOD \
IDEA
.if defined(WITH_${var}) && defined(WITHOUT_${var})
diff --git a/tools/build/options/WITHOUT_BSD_CPIO b/tools/build/options/WITHOUT_BSD_CPIO
new file mode 100644
index 0000000..9c722ee
--- /dev/null
+++ b/tools/build/options/WITHOUT_BSD_CPIO
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to not build the BSD licensed version of cpio based on
+.Xr libarchive 3 .
diff --git a/tools/build/options/WITHOUT_GNU_GREP b/tools/build/options/WITHOUT_GNU_GREP
new file mode 100644
index 0000000..23f8de1
--- /dev/null
+++ b/tools/build/options/WITHOUT_GNU_GREP
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to not build GNU grep as a part of the base system.
diff --git a/tools/build/options/WITH_GNU_CPIO b/tools/build/options/WITH_GNU_CPIO
new file mode 100644
index 0000000..b4e756a
--- /dev/null
+++ b/tools/build/options/WITH_GNU_CPIO
@@ -0,0 +1,6 @@
+.\" $FreeBSD$
+Set to build GNU cpio as a part of the base system,
+and symlink
+.Pa /usr/bin/cpio
+to this version.
+(This will override the symlink to the BSD version.)
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 241d3eb..02ae8b4 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -43,7 +43,7 @@ SUBDIR= alias \
comm \
compile_et \
compress \
- cpio \
+ ${_cpio} \
cpuset \
csplit \
${_csup} \
@@ -257,6 +257,10 @@ _nsupdate= nsupdate
_bluetooth= bluetooth
.endif
+.if ${MK_BSD_CPIO} != "no"
+_cpio= cpio
+.endif
+
.if ${MK_CALENDAR} != "no"
_calendar= calendar
.endif
diff --git a/usr.bin/cpio/Makefile b/usr.bin/cpio/Makefile
index cc5c106..52d23f0 100644
--- a/usr.bin/cpio/Makefile
+++ b/usr.bin/cpio/Makefile
@@ -9,7 +9,7 @@ CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\"
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
LDADD+= -larchive -lz -lbz2
-.if defined(WITH_BSDCPIO)
+.if ${MK_GNU_CPIO} != "yes"
SYMLINKS=bsdcpio ${BINDIR}/cpio
MLINKS= bsdcpio.1 cpio.1
.endif
OpenPOWER on IntegriCloud