Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils Major readability cleanup; nuke redundancies; ...



details:   https://anonhg.NetBSD.org/src/rev/ff187e0625f8
branches:  trunk
changeset: 519142:ff187e0625f8
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Dec 12 00:05:09 2001 +0000

description:
Major readability cleanup; nuke redundancies; MKfoo=no -> NOfoo=.

diffstat:

 distrib/utils/Makefile.inc         |   5 +++-
 distrib/utils/init_s/Makefile      |  23 +++++++------------
 distrib/utils/libhack/Makefile     |  44 ++++++++++++++-----------------------
 distrib/utils/mksunbootcd/Makefile |   9 ++-----
 distrib/utils/more/Makefile        |  25 +++++++++------------
 distrib/utils/ssh/Makefile         |  12 ++-------
 distrib/utils/sysinst/Makefile.inc |  39 +++++++++++++++------------------
 distrib/utils/tls/Makefile         |  12 ++-------
 distrib/utils/x_dd/Makefile        |  22 ++++++------------
 distrib/utils/x_dhclient/Makefile  |  39 ++++++++++++--------------------
 distrib/utils/x_dmesg/Makefile     |  20 ++++++----------
 distrib/utils/x_ed/Makefile        |  19 ++++++----------
 distrib/utils/x_ftp/Makefile       |  38 +++++++++++++-------------------
 distrib/utils/x_gzip/Makefile      |  14 +++++------
 distrib/utils/x_ifconfig/Makefile  |  21 ++++++-----------
 distrib/utils/x_mount/Makefile     |  23 ++++++------------
 distrib/utils/x_netstat/Makefile   |  28 ++++++++++-------------
 distrib/utils/x_ping/Makefile      |  21 +++++++----------
 distrib/utils/x_ping6/Makefile     |  24 ++++++++------------
 distrib/utils/x_route/Makefile     |  29 ++++++++++--------------
 distrib/utils/x_sh/Makefile        |  14 ++++-------
 distrib/utils/x_umount/Makefile    |  20 ++++++----------
 distrib/utils/zcat/Makefile        |  26 +++++++++------------
 23 files changed, 210 insertions(+), 317 deletions(-)

diffs (truncated from 816 to 300 lines):

diff -r 1e4715b4b981 -r ff187e0625f8 distrib/utils/Makefile.inc
--- a/distrib/utils/Makefile.inc        Tue Dec 11 23:57:49 2001 +0000
+++ b/distrib/utils/Makefile.inc        Wed Dec 12 00:05:09 2001 +0000
@@ -1,6 +1,9 @@
-# $NetBSD: Makefile.inc,v 1.8 1999/11/13 14:18:44 minoura Exp $
+# $NetBSD: Makefile.inc,v 1.9 2001/12/12 00:05:09 tv Exp $
 # utils one might want in a crunched binary
 
 LDSTATIC=      -static         # only static compilation makes sense here
+.if ${MACHINE_ARCH} != "sparc64"
+DBG=           -Os
+.endif
 
 install: .NOTMAIN .MADE
diff -r 1e4715b4b981 -r ff187e0625f8 distrib/utils/init_s/Makefile
--- a/distrib/utils/init_s/Makefile     Tue Dec 11 23:57:49 2001 +0000
+++ b/distrib/utils/init_s/Makefile     Wed Dec 12 00:05:09 2001 +0000
@@ -1,21 +1,16 @@
-# $NetBSD: Makefile,v 1.13 2001/10/05 01:17:27 jmc Exp $
+# $NetBSD: Makefile,v 1.14 2001/12/12 00:05:10 tv Exp $
 # Build a "small init" (i.e. for boot media)
 
-PROG=  init
-MKMAN= no
+SRCDIR=                ${.CURDIR}/../../../sbin/init
+
+PROG=          init
+NOMAN=         # defined
+
+CPPFLAGS+=     -DLETS_GET_SMALL -I${SRCDIR}
 
 # Need -lutil for: logout, logwtmp, login_tty
-DPADD= ${LIBUTIL}
-LDADD= -lutil
-LDSTATIC?=-static
-
-SRCDIR= ${.CURDIR}/../../../sbin/init
-CPPFLAGS+= -DLETS_GET_SMALL -I${SRCDIR}
-.if ${MACHINE_ARCH} != "sparc64"
-DBG= -Os
-.endif
-
-all: ${PROG}
+DPADD=         ${LIBUTIL}
+LDADD=         -lutil
 
 .include <bsd.prog.mk>
 
diff -r 1e4715b4b981 -r ff187e0625f8 distrib/utils/libhack/Makefile
--- a/distrib/utils/libhack/Makefile    Tue Dec 11 23:57:49 2001 +0000
+++ b/distrib/utils/libhack/Makefile    Wed Dec 12 00:05:09 2001 +0000
@@ -1,42 +1,32 @@
-# $NetBSD: Makefile,v 1.12 2001/10/05 01:17:28 jmc Exp $
+# $NetBSD: Makefile,v 1.13 2001/12/12 00:05:10 tv Exp $
 #
 # Stubs to kill off some things from libc:
 # This save space on a boot system.
 # (See Makefile.inc also.)
 
-LIB=   hack
-SRCS=  getcap.c getgrent.c gethost.c getnet.c getnetgr.c getpwent.c \
-       localeconv.c perror.c setlocale.c \
-       strerror.c strsignal.c utmp.c yplib.c
+LIB=           hack
+SRCS=          getcap.c getgrent.c gethost.c getnet.c getnetgr.c getpwent.c \
+               localeconv.c perror.c setlocale.c \
+               strerror.c strsignal.c utmp.c yplib.c
 .ifndef NOLIBHACKOPENDIR
-SRCS+=        opendir.c
-.endif
-
-
-HACKOBJS= getcap.o getgrent.o gethost.o getnet.o getnetgr.o getpwent.o \
-       localeconv.o perror.o setlocale.o \
-       strerror.o strsignal.o utmp.o yplib.o
-.ifndef NOLIBHACKOPENDIR
-HACKOBJS+= opendir.o
+SRCS+=         opendir.c
 .endif
 
-.if ${MACHINE_ARCH} != "sparc64"
-DBG= -Os
-.endif
-WARNS= 1
-MKPIC= no
-MKLINT= no
-MKPROFILE=no
+WARNS=         1
+NOLINKLIB=     # defined
+NOLINT=        # defined
+NOPIC=         # defined
+NOPROFILE=     # defined
 
-all: libhack.a libhack.o
+realall: libhack.o
 
-libhack.o : $(HACKOBJS)
-       $(LD) -r -o $@ $(HACKOBJS)
+libhack.o: libhack.a
+       ${LD} -r -o $@ --whole-archive libhack.a
 
-CLEANFILES+=  libhack.o
+CLEANFILES+=   libhack.o
 
 tpwent: getpwent.c
-       $(CC) -g -o $@.o -DTEST_MAIN -c getpwent.c
-       $(CC) -o $@ $@.o
+       ${CC} -g -o $@.o -DTEST_MAIN -c getpwent.c
+       ${CC} -o $@ $@.o
 
 .include <bsd.lib.mk>
diff -r 1e4715b4b981 -r ff187e0625f8 distrib/utils/mksunbootcd/Makefile
--- a/distrib/utils/mksunbootcd/Makefile        Tue Dec 11 23:57:49 2001 +0000
+++ b/distrib/utils/mksunbootcd/Makefile        Wed Dec 12 00:05:09 2001 +0000
@@ -1,10 +1,7 @@
-#      $NetBSD: Makefile,v 1.3 2000/05/18 01:10:24 matt Exp $
+#      $NetBSD: Makefile,v 1.4 2001/12/12 00:05:10 tv Exp $
 
-PROG=  mksunbootcd
-MAN=   mksunbootcd.1
-WARNS= 1
-
-LDSTATIC?=-static
+PROG=          mksunbootcd
+WARNS=         1
 
 .include <bsd.prog.mk>
 
diff -r 1e4715b4b981 -r ff187e0625f8 distrib/utils/more/Makefile
--- a/distrib/utils/more/Makefile       Tue Dec 11 23:57:49 2001 +0000
+++ b/distrib/utils/more/Makefile       Wed Dec 12 00:05:09 2001 +0000
@@ -1,23 +1,20 @@
-#      $NetBSD: Makefile,v 1.11 2001/10/05 01:17:28 jmc Exp $
+#      $NetBSD: Makefile,v 1.12 2001/12/12 00:05:10 tv Exp $
 #
 #      @(#)Makefile    8.1 (Berkeley) 6/6/93
 
-PROG=  more
-MKMAN= no
+PROG=          more
+NOMAN=         # defined
 
-SRCS=  ch.c command.c decode.c help.c input.c line.c linenum.c main.c \
-       option.c os.c output.c position.c prim.c screen.c signal.c \
-       ttyin.c
-DPADD= ${LIBTERMCAP}
-LDADD= -ltermcap
-LDSTATIC?=-static
-CPPFLAGS+=-I${.CURDIR}
-.if ${MACHINE_ARCH} != "sparc64"
-DBG= -Os
-.endif
+SRCS=          ch.c command.c decode.c help.c input.c line.c linenum.c main.c \
+               option.c os.c output.c position.c prim.c screen.c signal.c \
+               ttyin.c
+
+CPPFLAGS+=     -I${.CURDIR}
+DPADD=         ${LIBTERMCAP}
+LDADD=         -ltermcap
 
 beforeinstall:
-       install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/more.help \
+       ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/more.help \
            ${DESTDIR}/usr/share/misc
 
 .include <bsd.prog.mk>
diff -r 1e4715b4b981 -r ff187e0625f8 distrib/utils/ssh/Makefile
--- a/distrib/utils/ssh/Makefile        Tue Dec 11 23:57:49 2001 +0000
+++ b/distrib/utils/ssh/Makefile        Wed Dec 12 00:05:09 2001 +0000
@@ -1,13 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2001/10/05 01:17:29 jmc Exp $
+# $NetBSD: Makefile,v 1.7 2001/12/12 00:05:10 tv Exp $
 # Small Shell (i.e. for boot media)
 
-PROG=  ssh
-MKMAN= no
-.if ${MACHINE_ARCH} != "sparc64"
-DBG= -Os
-.endif
-LDSTATIC?=-static
-
-all: ${PROG}
+PROG=          ssh
+NOMAN=         # defined
 
 .include <bsd.prog.mk>
diff -r 1e4715b4b981 -r ff187e0625f8 distrib/utils/sysinst/Makefile.inc
--- a/distrib/utils/sysinst/Makefile.inc        Tue Dec 11 23:57:49 2001 +0000
+++ b/distrib/utils/sysinst/Makefile.inc        Wed Dec 12 00:05:09 2001 +0000
@@ -1,48 +1,45 @@
-#      $NetBSD: Makefile.inc,v 1.10 2000/12/17 09:22:47 jmc Exp $
+#      $NetBSD: Makefile.inc,v 1.11 2001/12/12 00:05:11 tv Exp $
 #
 # Makefile for install
 
+PROG=          sysinst
+NOMAN=         # defined
+
 .include <bsd.own.mk>          # for mk.conf
 
-PROG=sysinst
-
-LDADD=-lcurses -ltermcap -lutil
-LDSTATIC?=-static
+LDADD=         -lcurses -ltermcap -lutil
+LDSTATIC?=     -static
 
 .if exists(${.CURDIR}/../../../../sys/conf/osrelease.sh)
-VERDEP=${.CURDIR}/../../../../sys/conf/osrelease.sh
-VER != sh ${.CURDIR}/../../../../sys/conf/osrelease.sh
+VERDEP=                ${.CURDIR}/../../../../sys/conf/osrelease.sh
+VER!=          sh ${VERDEP}
 .endif
 
 .if exists(${.CURDIR}/../../../../../sys/conf/osrelease.sh)
-VERDEP=${.CURDIR}/../../../../../sys/conf/osrelease.sh
-VER != sh ${.CURDIR}/../../../../../sys/conf/osrelease.sh
+VERDEP=                ${.CURDIR}/../../../../../sys/conf/osrelease.sh
+VER!=          sh ${VERDEP}
 .endif
 
-CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.CURDIR} \
-        -DREL=\"${VER}\" -DMACH=\"${MACHINE}\"
+CPPFLAGS+=     -I. -I${.CURDIR}/../.. -I${.CURDIR} \
+               -DREL=\"${VER}\" -DMACH=\"${MACHINE}\"
 
 .if defined(SYSINST_FTP_HOST)
-CPPFLAGS+=-DFTP_HOST="${SYSINST_FTP_HOST}"
+CPPFLAGS+=     -DFTP_HOST="${SYSINST_FTP_HOST}"
 .endif
 
 .if defined(SYSINST_FTP_DIR)
-CPPFLAGS+=-DFTP_DIR="${SYSINST_FTP_DIR}"
+CPPFLAGS+=     -DFTP_DIR="${SYSINST_FTP_DIR}"
 .endif
 
-MKMAN=no
-
-WARNS=1
+WARNS=         1
 
-CLEANFILES= menu_defs.c menu_defs.h menus.def msg_defs.c msg_defs.h msg.def msgtouch
+CLEANFILES=    menu_defs.c menu_defs.h menus.def \
+               msg_defs.c msg_defs.h msg.def msgtouch
 
-SYSINSTLANG?=en
+SYSINSTLANG?=  en
 
 .PATH: ${.CURDIR}/../..
 
-MENUC?=menuc
-MSGC?=msgc
-
 .include <bsd.prog.mk>
 
 menu_defs.c menu_defs.h: menus.def
diff -r 1e4715b4b981 -r ff187e0625f8 distrib/utils/tls/Makefile
--- a/distrib/utils/tls/Makefile        Tue Dec 11 23:57:49 2001 +0000
+++ b/distrib/utils/tls/Makefile        Wed Dec 12 00:05:09 2001 +0000
@@ -1,13 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2001/10/05 01:17:29 jmc Exp $
+# $NetBSD: Makefile,v 1.7 2001/12/12 00:05:11 tv Exp $
 # Tiny ls  (i.e. for boot media)
 
-PROG=  tls
-MKMAN= no
-.if ${MACHINE_ARCH} != "sparc64"
-DBG= -Os
-.endif
-LDSTATIC?=-static
-
-all: ${PROG}
+PROG=          tls
+NOMAN=         # defined
 
 .include <bsd.prog.mk>
diff -r 1e4715b4b981 -r ff187e0625f8 distrib/utils/x_dd/Makefile
--- a/distrib/utils/x_dd/Makefile       Tue Dec 11 23:57:49 2001 +0000
+++ b/distrib/utils/x_dd/Makefile       Wed Dec 12 00:05:09 2001 +0000
@@ -1,22 +1,14 @@
-# $NetBSD: Makefile,v 1.13 2001/11/27 03:33:08 lukem Exp $
+# $NetBSD: Makefile,v 1.14 2001/12/12 00:05:11 tv Exp $
 # Build a smaller dd (i.e. for boot media)
 
-PROG=  dd
-MKMAN= no
-
-SRCDIR= ${.CURDIR}/../../../bin/dd
-
-SRCS=  args.c conv.c dd.c misc.c position.c strsuftoull.c
-# SRCS+= conv_tab.c (not used)
+SRCDIR=                ${.CURDIR}/../../../bin/dd
 
-CPPFLAGS+= -DNO_CONV -I${SRCDIR}
-.if ${MACHINE_ARCH} != "sparc64"
-DBG= -Os
-.endif
-LDSTATIC?=-static
+PROG=          dd
+NOMAN=         # defined



Home | Main Index | Thread Index | Old Index