[Midnightbsd-cvs] src: src/rescue: Modernize rescue
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Tue Nov 11 15:17:53 EST 2008
Log Message:
-----------
Modernize rescue
Modified Files:
--------------
src/rescue:
README (r1.2 -> r1.3)
src/rescue/librescue:
Makefile (r1.2 -> r1.3)
src/rescue/rescue:
Makefile (r1.5 -> r1.6)
-------------- next part --------------
Index: README
===================================================================
RCS file: /home/cvs/src/rescue/README,v
retrieving revision 1.2
retrieving revision 1.3
diff -L rescue/README -L rescue/README -u -r1.2 -r1.3
--- rescue/README
+++ rescue/README
@@ -24,7 +24,7 @@
3) Produce a toolkit suitable for small distributions.
Install /rescue on a CD or CompactFlash disk, and symlink /bin and
-/sbin to /rescue to produce a small and fairly complete FreeBSD
+/sbin to /rescue to produce a small and fairly complete MidnightBSD
system.
These tools have one big disadvantage: being statically linked, they
@@ -32,7 +32,6 @@
linking. In particular, nsswitch, locales, and pam are likely to all
rely on dynamic linking in the near future.
-
To compile:
# cd /usr/src/rescue
Index: Makefile
===================================================================
RCS file: /home/cvs/src/rescue/librescue/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -L rescue/librescue/Makefile -L rescue/librescue/Makefile -u -r1.2 -r1.3
--- rescue/librescue/Makefile
+++ rescue/librescue/Makefile
@@ -1,6 +1,9 @@
#
-# $FreeBSD: src/rescue/librescue/Makefile,v 1.6 2004/11/13 20:40:29 bz Exp $
+# $FreeBSD: src/rescue/librescue/Makefile,v 1.9 2006/07/27 12:28:05 yar Exp $
# $MidnightBSD$
+#
+
+.include <bsd.own.mk>
# Certain library entries have hard-coded references to
# /bin, /sbin, etc, that require those entries to be
@@ -24,16 +27,20 @@
# libc/db/Makefile.inc
CFLAGS+= -D__DBINTERFACE_PRIVATE
# libc/net/Makefile.inc & libutil/Makefile
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
+.endif
# libc/regex/Makefile.inc & libc/regex/grot/Makefile
CFLAGS+= -DPOSIX_MISTAKE
# libc/rpc/Makefile.inc
CFLAGS+= -DBROKEN_DES -DPORTMAP -DDES_BUILTIN
# libc/Makefile
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
CFLAGS+= -DYP
.endif
+.if ${MK_HESIOD} != "no"
CFLAGS+= -DHESIOD
+.endif
CFLAGS+= -I${.CURDIR}/../../lib/libc/include
.include <bsd.lib.mk>
Index: Makefile
===================================================================
RCS file: /home/cvs/src/rescue/rescue/Makefile,v
retrieving revision 1.5
retrieving revision 1.6
diff -L rescue/rescue/Makefile -L rescue/rescue/Makefile -u -r1.5 -r1.6
--- rescue/rescue/Makefile
+++ rescue/rescue/Makefile
@@ -2,6 +2,10 @@
#$FreeBSD: src/rescue/rescue/Makefile,v 1.45.2.1 2005/12/22 21:17:12 jhb Exp $
# @(#)Makefile 8.1 (Berkeley) 6/2/93
+NO_MAN=
+
+.include <bsd.own.mk>
+
PROG= rescue
BINDIR?=/rescue
@@ -69,7 +73,7 @@
ed expr getfacl hostname kenv kill ln ls mkdir mv pax ps pwd \
realpath rm rmdir setfacl sh stty sync test
CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -lm -ltermcap -lutil
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
CRUNCH_LIBS+= -lcrypto
.endif
@@ -82,11 +86,11 @@
CRUNCH_ALIAS_rm= unlink
CRUNCH_ALIAS_ed= red
-.if !defined(NO_RCMDS)
+.if ${MK_RCMDS} != "no"
CRUNCH_PROGS_bin+= rcp
.endif
-.if !defined(NO_TCSH)
+.if ${MK_TCSH} != "no"
CRUNCH_PROGS_bin+= csh
CRUNCH_ALIAS_csh= -csh tcsh -tcsh
CRUNCH_SUPPRESS_LINK_-csh= 1
@@ -108,45 +112,46 @@
dumpfs dumpon fsck fsck_ffs fsck_msdosfs fsdb \
fsirand gbde ifconfig init \
kldconfig kldload kldstat kldunload ldconfig \
- md5 mdconfig mdmfs mknod mount mount_cd9660 mount_ext2fs \
+ md5 mdconfig mdmfs mknod mount mount_cd9660 \
mount_msdosfs mount_nfs mount_ntfs mount_nullfs \
- mount_std mount_udf mount_unionfs newfs \
+ mount_udf mount_unionfs newfs \
newfs_msdos nos-tun ping reboot \
restore rcorder route routed rtquery rtsol savecore \
slattach spppcontrol startslip swapon sysctl tunefs umount
-.if !defined(NO_ATM)
-CRUNCH_PROGS_sbin+= atm atmconfig fore_dnld ilmid
-CRUNCH_LIBS+= -latm
+.if ${MK_ATM} != "no"
+CRUNCH_PROGS_sbin+= atmconfig
+# Disabled as netatm is not MPSAFE.
+#CRUNCH_PROGS_sbin+= atm fore_dnld ilmid
+#CRUNCH_LIBS+= -latm
.endif
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CRUNCH_PROGS_sbin+= ping6
.endif
-.if !defined(NO_IPFILTER)
+.if ${MK_IPFILTER} != "no"
CRUNCH_PROGS_sbin+= ipf
.endif
# crunchgen does not like C++ programs; this should be fixed someday
# CRUNCH_PROGS+= devd
-CRUNCH_LIBS+= -lalias -lbsdxml -lcam -lcurses -ldevstat -lipsec -lipx \
- -lgeom -lkiconv -lmd -lreadline -lsbuf -lufs -lz
+CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec
+.if ${MK_IPX} != "no"
+CRUNCH_LIBS+= -lipx
+.endif
+CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv -lmd -lreadline -lsbuf -lufs -lz
.if ${MACHINE_ARCH} == "i386"
CRUNCH_PROGS_sbin+= sconfig fdisk
CRUNCH_ALIAS_bsdlabel= disklabel
-#CRUNCH_PROGS+= mount_nwfs mount_smbfs
-#CRUNCH_LIBS+= -lncp -lsmb
-.endif
-
-.if ${MACHINE} == "pc98"
-CRUNCH_SRCDIR_fdisk= $(.CURDIR)/../../sbin/fdisk_pc98
-.endif
-
-.if ${MACHINE_ARCH} == "ia64"
-CRUNCH_PROGS_sbin+= mca gpt fdisk
+#.if ${MK_NCP} != "no"
+#CRUNCH_PROGS+= mount_nwfs
+#CRUNCH_LIBS+= -lncp
+#.endif
+#CRUNCH_PROGS+= mount_smbfs
+#CRUNCH_LIBS+= -lsmb
.endif
.if ${MACHINE_ARCH} == "sparc64"
@@ -168,7 +173,6 @@
CRUNCH_ALIAS_restore= rrestore
CRUNCH_ALIAS_dump= rdump
CRUNCH_ALIAS_fsck_ffs= fsck_4.2bsd fsck_ufs
-CRUNCH_ALIAS_mount_std= mount_devfs mount_fdescfs mount_linprocfs mount_procfs
# dhclient has historically been troublesome...
CRUNCH_PROGS_sbin+= dhclient
@@ -217,7 +221,6 @@
CANONICALOBJDIR:= /usr/obj${.CURDIR}
.endif
-NO_MAN=
CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h
# Program names and their aliases contribute hardlinks to 'rescue' executable,
@@ -303,11 +306,11 @@
.ifdef CRUNCH_SRCDIR_${P}
cd ${CRUNCH_SRCDIR_$(P)} && \
MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
- DIRPRFX=${DIRPRFX}${P}/ ${.TARGET}
+ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.else
cd $(.CURDIR)/../../${D}/${P} && \
MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
- DIRPRFX=${DIRPRFX}${P}/ ${.TARGET}
+ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.endif
.endfor
.endfor
@@ -322,11 +325,11 @@
.ifdef CRUNCH_SRCDIR_${P}
cd ${CRUNCH_SRCDIR_$(P)} && \
MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
- DIRPRFX=${DIRPRFX}${P}/ ${.TARGET}
+ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.else
cd $(.CURDIR)/../../${D}/${P} && \
MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
- DIRPRFX=${DIRPRFX}${P}/ ${.TARGET}
+ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.endif
.endfor
.endfor
More information about the Midnightbsd-cvs
mailing list