aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2008-06-16 05:48:15 +0000
committerDoug Barton <dougb@FreeBSD.org>2008-06-16 05:48:15 +0000
commit6973701a00e3228aeb354768f596e5c35663bdb2 (patch)
tree99c6827a2e7144624bf91733ea77fd80d6aaffb5
parent076a71a21e4f85ed1a0efd9fb72f6a104dede512 (diff)
downloadsrc-6973701a00e3228aeb354768f596e5c35663bdb2.tar.gz
src-6973701a00e3228aeb354768f596e5c35663bdb2.zip
Notes
-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 b54f8409655d..10f230080e16 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 211b068cf60b..96ac02a86dba 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 04d59e5a2829..e358e31239ea 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 000000000000..9c722ee01851
--- /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 000000000000..23f8de115d49
--- /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 000000000000..b4e756ae18b0
--- /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 241d3eb4cf81..02ae8b4a4a23 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 cc5c1065f251..52d23f09c116 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