From 07917fe88dd28ff7c60b1137ee6c8f3f6688bf0c Mon Sep 17 00:00:00 2001 From: zrj Date: Sun, 12 Nov 2017 12:03:58 +0200 Subject: [PATCH] games: Move out non (6) utilities from /usr/games/. The strfile(8) and unstr(8) are pretty generic on their own and do not belong in /usr/games/ (with all NO_GAMES stuff). All (6) utilities are still in games. * Move stfile(8) and unstr(8) to usr.bin/. * Move out strfile from btools and convert it to hostprog (like nvi). * Compile strfile.nx only if NO_SHARE is not set. While there, apply 3rd to usr.bin/vi too (somehow skipped it in bf31779ebd). --- Makefile.inc1 | 5 +---- Makefile_upgrade.inc | 2 ++ games/fortune/Makefile | 4 ++-- games/fortune/datfiles/Makefile | 3 +-- games/fortune/fortune/Makefile | 2 +- games/fortune/strfile/Makefile | 12 ++++++------ usr.bin/Makefile | 2 ++ {games/fortune => usr.bin}/strfile/Makefile | 1 - {games/fortune => usr.bin}/strfile/strfile.8 | 0 {games/fortune => usr.bin}/strfile/strfile.c | 0 {games/fortune => usr.bin}/strfile/strfile.h | 0 {games/fortune => usr.bin}/unstr/Makefile | 1 - {games/fortune => usr.bin}/unstr/unstr.c | 0 usr.bin/vi/Makefile | 3 +-- 14 files changed, 16 insertions(+), 19 deletions(-) copy {games/fortune => usr.bin}/strfile/Makefile (83%) rename {games/fortune => usr.bin}/strfile/strfile.8 (100%) rename {games/fortune => usr.bin}/strfile/strfile.c (100%) rename {games/fortune => usr.bin}/strfile/strfile.h (100%) rename {games/fortune => usr.bin}/unstr/Makefile (74%) rename {games/fortune => usr.bin}/unstr/unstr.c (100%) diff --git a/Makefile.inc1 b/Makefile.inc1 index 7cb1fa3229..a2c3db601f 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -847,16 +847,13 @@ installmost: # rpcgen: old rpcgen used a hardwired cpp path, newer OBJFORMAT_PATH # envs are not compatible with older objformat binaries. # -.if exists(${.CURDIR}/games) && !defined(NO_GAMES) -_strfile= games/fortune/strfile -.endif # BSTRAPDIRS1 - must be built in strict order, no parallelism # # order is very important. yacc before m4 before flex. flex exec's m4, # m4's parser file needs the latest byacc (insanity!). # -BSTRAPDIRS1= ${_strfile} \ +BSTRAPDIRS1= \ usr.bin/patch \ bin/chmod bin/cp bin/cpdup bin/dd bin/mkdir bin/rm bin/echo \ bin/test bin/cat bin/ln bin/mv bin/csh bin/expr bin/sh \ diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc index 82997d84ac..0ca446f359 100644 --- a/Makefile_upgrade.inc +++ b/Makefile_upgrade.inc @@ -3292,6 +3292,8 @@ TO_REMOVE+=/usr/games/hide TO_REMOVE+=/usr/share/examples/etc/dm.conf TO_REMOVE+=/usr/share/man/man5/dm.conf.5.gz TO_REMOVE+=/usr/share/man/man8/dm.8.gz +TO_REMOVE+=/usr/games/strfile +TO_REMOVE+=/usr/games/unstr .if !defined(WANT_INSTALLER) TO_REMOVE+=/usr/sbin/dfuibe_installer diff --git a/games/fortune/Makefile b/games/fortune/Makefile index 6471f49d21..815048196d 100644 --- a/games/fortune/Makefile +++ b/games/fortune/Makefile @@ -1,8 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 -SUBDIR= fortune strfile unstr +SUBDIR= fortune .if !defined(NO_SHARE) -SUBDIR+= datfiles +SUBDIR+= strfile datfiles .endif .include diff --git a/games/fortune/datfiles/Makefile b/games/fortune/datfiles/Makefile index df037d3fc3..a983fc76ee 100644 --- a/games/fortune/datfiles/Makefile +++ b/games/fortune/datfiles/Makefile @@ -20,8 +20,7 @@ FILES+= $f $f.dat CLEANFILES+= $f.dat .if !(target($f.dat)) $f.dat: $f - PATH=$$PATH:/usr/games:${.OBJDIR}/../strfile \ - strfile -Cs ${.ALLSRC} ${.TARGET} + ${.OBJDIR}/../strfile/strfile.nx -Cs ${.ALLSRC} ${.TARGET} .endif .endfor diff --git a/games/fortune/fortune/Makefile b/games/fortune/fortune/Makefile index 72fa123467..1593f8d378 100644 --- a/games/fortune/fortune/Makefile +++ b/games/fortune/fortune/Makefile @@ -3,7 +3,7 @@ PROG= fortune MAN= fortune.6 -CFLAGS+=-DDEBUG -I${.CURDIR}/../strfile +CFLAGS+=-DDEBUG -I${.CURDIR}/../../../usr.bin/strfile .include "${.CURDIR}/../../Makefile.inc" .include diff --git a/games/fortune/strfile/Makefile b/games/fortune/strfile/Makefile index 7c11b9b539..1fb3d08052 100644 --- a/games/fortune/strfile/Makefile +++ b/games/fortune/strfile/Makefile @@ -1,9 +1,9 @@ -# @(#)Makefile 8.1 (Berkeley) 5/31/93 -# $FreeBSD: src/games/fortune/strfile/Makefile,v 1.2.8.1 2001/04/25 09:28:54 ru Exp $ +.PATH: ${.CURDIR}/../../../usr.bin/strfile PROG= strfile -MAN= strfile.8 -MLINKS= strfile.8 unstr.8 +CFLAGS+=-I${.CURDIR}/../../../usr.bin/strfile -.include "${.CURDIR}/../../Makefile.inc" -.include +# this strfile is used in place, it is not installed anywhere +install: + +.include diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 1b203d7010..cf1441e754 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -180,6 +180,7 @@ SUBDIR= alias \ sort \ split \ stat \ + strfile \ su \ symorder \ systat \ @@ -210,6 +211,7 @@ SUBDIR= alias \ unifdef \ uniq \ units \ + unstr \ unvis \ unzip \ usbhidaction \ diff --git a/games/fortune/strfile/Makefile b/usr.bin/strfile/Makefile similarity index 83% copy from games/fortune/strfile/Makefile copy to usr.bin/strfile/Makefile index 7c11b9b539..1b38473e07 100644 --- a/games/fortune/strfile/Makefile +++ b/usr.bin/strfile/Makefile @@ -5,5 +5,4 @@ PROG= strfile MAN= strfile.8 MLINKS= strfile.8 unstr.8 -.include "${.CURDIR}/../../Makefile.inc" .include diff --git a/games/fortune/strfile/strfile.8 b/usr.bin/strfile/strfile.8 similarity index 100% rename from games/fortune/strfile/strfile.8 rename to usr.bin/strfile/strfile.8 diff --git a/games/fortune/strfile/strfile.c b/usr.bin/strfile/strfile.c similarity index 100% rename from games/fortune/strfile/strfile.c rename to usr.bin/strfile/strfile.c diff --git a/games/fortune/strfile/strfile.h b/usr.bin/strfile/strfile.h similarity index 100% rename from games/fortune/strfile/strfile.h rename to usr.bin/strfile/strfile.h diff --git a/games/fortune/unstr/Makefile b/usr.bin/unstr/Makefile similarity index 74% rename from games/fortune/unstr/Makefile rename to usr.bin/unstr/Makefile index ed1d0aab34..bb1f3a1e86 100644 --- a/games/fortune/unstr/Makefile +++ b/usr.bin/unstr/Makefile @@ -4,5 +4,4 @@ PROG= unstr NOMAN= noman CFLAGS+= -I${.CURDIR}/../strfile -.include "${.CURDIR}/../../Makefile.inc" .include diff --git a/games/fortune/unstr/unstr.c b/usr.bin/unstr/unstr.c similarity index 100% rename from games/fortune/unstr/unstr.c rename to usr.bin/unstr/unstr.c diff --git a/usr.bin/vi/Makefile b/usr.bin/vi/Makefile index 2d2975c046..2ad35f42a0 100644 --- a/usr.bin/vi/Makefile +++ b/usr.bin/vi/Makefile @@ -5,9 +5,8 @@ .include SRCDIR= ${.CURDIR}/../../contrib/nvi2 -SUBDIR+= vidump .if !defined(NO_SHARE) -SUBDIR+= catalog +SUBDIR+= vidump catalog .endif WARNS?= 1 -- 2.41.0