cvs commit [HEAD] src/gnu/usr.bin/cpio Makefile
Doug Barton
dougb at FreeBSD.org
Sun Jun 15 06:39:26 UTC 2008
Doug Barton wrote:
> Tim Kientzle wrote:
>> This case is a little unusual: by default, I want to
>> install both 'cpio' programs and symlink the common name
>> to one of them.
>
> I'm not sure how that relates to Jeremie's (valid) point that these
> flags need to be part of the system in bsd.own.mk. I admit that getting
> stuff in there was a little intimidating to me at first, but Ruslan has
> created a nice automated system, and he'll be glad to help you if you
> need it.
>
>> How about this:
>> WITH_GCPIO (default) - installs gcpio, symlinks 'cpio' unless
>> WITH_BSDCPIO defined
>> WITHOUT_GCPIO - does not install gcpio at all
>> WITH_BSDCPIO (default) - installs bsdcpio, symlinks 'cpio'
>> WITHOUT_BSDCPIO - does not install bsdcpio at all
>
> If by "not install" you mean "build or install" then I'm with you, but I
> think it might be a little complicated. I'm not sure why you want to
> build and install both by default (except maybe to ease people's
> concerns in the interim period) but if it were me, in HEAD I would do this:
>
> WITH_BSDCPIO (default) build, install, and symlink to cpio
> WITHOUT_GCPIO (default) do not build or install
>
> Then if WITHOUT_BSDCPIO is defined you don't build or install it, and if
> WITH_GCPIO is defined you build, install, and symlink it, regardless of
> the state of the BSDCPIO knob.
>
> When this gets MFC'ed I would just flip the defaults.
I've attached a patch which does what I described above for CPIO, and
adds a knob to turn off building of GNU grep. When we get to the point
where bsd grep is imported into the base system, I would do the same
in HEAD/8-current for bsd grep as I am proposing we do for cpio. But
for now it is a step forward to be able to disable the grep build to
allow for easier testing.
If this stuff makes anyone happy I'm glad to commit it. Note that
after you add the options files you have to run the makeman script in
that directory, and redirect the output to
src/share/man/man5/src.conf.5 then commit the changes there too.
Side note to gabor, I noticed right away when I set up the test
tonight that anything which expects there to be a grep in /usr/bin
only fails, and that the base grep has 9 links, but your port only
installs 6. The difference is that the base version installs links for
{bze|bzf|bz}grep too. If I were you I would offer an option to create
symlinks in /usr/bin, and install the bz* stuff as well.
hth,
Doug
--
This .signature sanitized for your protection
-------------- next part --------------
Index: usr.bin/Makefile
===================================================================
--- usr.bin/Makefile (revision 179788)
+++ usr.bin/Makefile (working copy)
@@ -43,7 +43,7 @@
comm \
compile_et \
compress \
- cpio \
+ ${_cpio} \
cpuset \
csplit \
${_csup} \
@@ -257,6 +257,10 @@
_bluetooth= bluetooth
.endif
+.if ${MK_BSD_CPIO} != "no"
+_cpio= cpio
+.endif
+
.if ${MK_CALENDAR} != "no"
_calendar= calendar
.endif
Index: usr.bin/cpio/Makefile
===================================================================
--- usr.bin/cpio/Makefile (revision 179788)
+++ usr.bin/cpio/Makefile (working copy)
@@ -9,7 +9,7 @@
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
Index: gnu/usr.bin/cpio/Makefile
===================================================================
--- gnu/usr.bin/cpio/Makefile (revision 179788)
+++ gnu/usr.bin/cpio/Makefile (working copy)
@@ -62,9 +62,7 @@
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>
Index: gnu/usr.bin/Makefile
===================================================================
--- gnu/usr.bin/Makefile (revision 179788)
+++ gnu/usr.bin/Makefile (working copy)
@@ -5,7 +5,7 @@
SUBDIR= bc \
${_binutils} \
${_cc} \
- cpio \
+ ${_cpio} \
${_cvs} \
dc \
dialog \
@@ -13,7 +13,7 @@
diff3 \
${_gdb} \
${_gperf} \
- grep \
+ ${_grep} \
${_groff} \
${_man} \
patch \
@@ -30,10 +30,18 @@
.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
Index: share/mk/bsd.own.mk
===================================================================
--- share/mk/bsd.own.mk (revision 179788)
+++ share/mk/bsd.own.mk (working copy)
@@ -287,6 +287,7 @@
ATM \
AUDIT \
AUTHPF \
+ BSD_CPIO \
BIND \
BIND_DNSSEC \
BIND_ETC \
@@ -312,6 +313,7 @@
GCOV \
GDB \
GNU \
+ GNU_GREP \
GPIB \
GROFF \
HTML \
@@ -374,6 +376,7 @@
#
.for var in \
BIND_LIBS \
+ GNU_CPIO \
HESIOD \
IDEA
.if defined(WITH_${var}) && defined(WITHOUT_${var})
More information about the cvs-src
mailing list