head	1.91;
access;
symbols
	RELENG_8_4:1.88.0.2
	RELENG_9_1_0_RELEASE:1.77.2.2.2.2
	RELENG_9_1:1.77.2.2.0.2
	RELENG_9_1_BP:1.77.2.2
	RELENG_8_3_0_RELEASE:1.71.2.4.2.1
	RELENG_8_3:1.71.2.4.0.2
	RELENG_8_3_BP:1.71.2.4
	RELENG_9_0_0_RELEASE:1.77.2.1.2.1
	RELENG_9_0:1.77.2.1.0.2
	RELENG_9_0_BP:1.77.2.1
	RELENG_9:1.77.0.2
	RELENG_9_BP:1.77
	RELENG_7_4_0_RELEASE:1.56.2.2.4.1
	RELENG_8_2_0_RELEASE:1.71.2.2.4.1
	RELENG_7_4:1.56.2.2.0.4
	RELENG_7_4_BP:1.56.2.2
	RELENG_8_2:1.71.2.2.0.4
	RELENG_8_2_BP:1.71.2.2
	RELENG_8_1_0_RELEASE:1.71.2.2.2.1
	RELENG_8_1:1.71.2.2.0.2
	RELENG_8_1_BP:1.71.2.2
	RELENG_7_3_0_RELEASE:1.56.2.2.2.1
	RELENG_7_3:1.56.2.2.0.2
	RELENG_7_3_BP:1.56.2.2
	RELENG_8_0_0_RELEASE:1.71.2.1.2.1
	RELENG_8_0:1.71.2.1.0.2
	RELENG_8_0_BP:1.71.2.1
	RELENG_8:1.71.0.2
	RELENG_8_BP:1.71
	RELENG_7_2_0_RELEASE:1.56.2.1.4.1
	RELENG_7_2:1.56.2.1.0.4
	RELENG_7_2_BP:1.56.2.1
	RELENG_7_1_0_RELEASE:1.56.2.1.2.1
	RELENG_6_4_0_RELEASE:1.45.2.2.4.1
	RELENG_7_1:1.56.2.1.0.2
	RELENG_7_1_BP:1.56.2.1
	RELENG_6_4:1.45.2.2.0.4
	RELENG_6_4_BP:1.45.2.2
	RELENG_7_0_0_RELEASE:1.56
	RELENG_6_3_0_RELEASE:1.45.2.2
	RELENG_7_0:1.56.0.4
	RELENG_7_0_BP:1.56
	RELENG_6_3:1.45.2.2.0.2
	RELENG_6_3_BP:1.45.2.2
	RELENG_7:1.56.0.2
	RELENG_7_BP:1.56
	RELENG_6_2_0_RELEASE:1.45.2.1
	RELENG_6_2:1.45.2.1.0.4
	RELENG_6_2_BP:1.45.2.1
	RELENG_5_5_0_RELEASE:1.28.2.2
	RELENG_5_5:1.28.2.2.0.2
	RELENG_5_5_BP:1.28.2.2
	RELENG_6_1_0_RELEASE:1.45.2.1
	RELENG_6_1:1.45.2.1.0.2
	RELENG_6_1_BP:1.45.2.1
	RELENG_6_0_0_RELEASE:1.45
	RELENG_6_0:1.45.0.4
	RELENG_6_0_BP:1.45
	RELENG_6:1.45.0.2
	RELENG_6_BP:1.45
	RELENG_5_4_0_RELEASE:1.28.2.1.2.1
	RELENG_5_4:1.28.2.1.0.2
	RELENG_5_4_BP:1.28.2.1
	RELENG_5_3_0_RELEASE:1.28
	RELENG_5_3:1.28.0.4
	RELENG_5_3_BP:1.28
	RELENG_5:1.28.0.2
	RELENG_5_BP:1.28
	RELENG_5_2_1_RELEASE:1.23.2.1
	RELENG_5_2_0_RELEASE:1.23.2.1
	RELENG_5_2:1.23.0.2
	RELENG_5_2_BP:1.23;
locks; strict;
comment	@# @;


1.91
date	2013.06.29.00.40.28;	author svnexp;	state Exp;
branches;
next	1.90;

1.90
date	2013.05.14.00.43.20;	author svnexp;	state Exp;
branches;
next	1.89;

1.89
date	2013.04.05.00.25.42;	author svnexp;	state Exp;
branches;
next	1.88;

1.88
date	2013.03.22.02.29.24;	author svnexp;	state Exp;
branches
	1.88.2.1;
next	1.87;

1.87
date	2012.11.17.01.50.17;	author svnexp;	state Exp;
branches;
next	1.86;

1.86
date	2012.10.18.12.04.56;	author attilio;	state Exp;
branches;
next	1.85;

1.85
date	2012.10.17.11.30.00;	author attilio;	state Exp;
branches;
next	1.84;

1.84
date	2012.10.17.11.16.17;	author attilio;	state Exp;
branches;
next	1.83;

1.83
date	2012.09.20.08.50.39;	author bapt;	state Exp;
branches;
next	1.82;

1.82
date	2012.07.30.23.14.24;	author mm;	state Exp;
branches;
next	1.81;

1.81
date	2012.02.14.07.14.42;	author rmh;	state Exp;
branches;
next	1.80;

1.80
date	2011.11.29.03.27.09;	author fjoe;	state Exp;
branches;
next	1.79;

1.79
date	2011.11.28.15.44.04;	author fjoe;	state Exp;
branches;
next	1.78;

1.78
date	2011.11.15.16.20.39;	author des;	state Exp;
branches;
next	1.77;

1.77
date	2011.02.27.19.41.40;	author pjd;	state Exp;
branches
	1.77.2.1;
next	1.76;

1.76
date	2010.11.13.03.11.27;	author adrian;	state Exp;
branches;
next	1.75;

1.75
date	2010.08.23.22.24.11;	author imp;	state Exp;
branches;
next	1.74;

1.74
date	2010.05.10.15.28.44;	author mm;	state Exp;
branches;
next	1.73;

1.73
date	2010.01.21.16.56.27;	author ed;	state Exp;
branches;
next	1.72;

1.72
date	2009.12.05.23.23.46;	author ed;	state Exp;
branches;
next	1.71;

1.71
date	2009.06.24.18.21.37;	author jamie;	state Exp;
branches
	1.71.2.1;
next	1.70;

1.70
date	2009.05.23.00.47.23;	author kmacy;	state Exp;
branches;
next	1.69;

1.69
date	2009.04.18.06.01.55;	author kientzle;	state Exp;
branches;
next	1.68;

1.68
date	2009.04.17.22.20.44;	author kientzle;	state Exp;
branches;
next	1.67;

1.67
date	2009.04.05.22.08.18;	author ed;	state Exp;
branches;
next	1.66;

1.66
date	2009.02.21.15.04.31;	author ru;	state Exp;
branches;
next	1.65;

1.65
date	2008.09.13.19.56.37;	author imp;	state Exp;
branches;
next	1.64;

1.64
date	2008.09.13.19.54.15;	author imp;	state Exp;
branches;
next	1.63;

1.63
date	2008.08.31.14.27.59;	author yar;	state Exp;
branches;
next	1.62;

1.62
date	2008.06.25.21.33.28;	author ru;	state Exp;
branches;
next	1.61;

1.61
date	2008.05.25.22.11.24;	author rwatson;	state Exp;
branches;
next	1.60;

1.60
date	2008.03.29.13.15.33;	author ru;	state Exp;
branches;
next	1.59;

1.59
date	2008.03.05.23.32.12;	author delphij;	state Exp;
branches;
next	1.58;

1.58
date	2007.11.04.00.44.10;	author marcel;	state Exp;
branches;
next	1.57;

1.57
date	2007.10.27.18.18.58;	author yar;	state Exp;
branches;
next	1.56;

1.56
date	2007.07.14.21.49.22;	author rwatson;	state Exp;
branches
	1.56.2.1;
next	1.55;

1.55
date	2007.06.25.05.06.53;	author rafan;	state Exp;
branches;
next	1.54;

1.54
date	2007.01.26.10.19.07;	author delphij;	state Exp;
branches;
next	1.53;

1.53
date	2006.11.22.22.55.54;	author rodrigc;	state Exp;
branches;
next	1.52;

1.52
date	2006.11.22.00.23.11;	author rodrigc;	state Exp;
branches;
next	1.51;

1.51
date	2006.08.22.07.51.08;	author ru;	state Exp;
branches;
next	1.50;

1.50
date	2006.04.10.09.32.50;	author ru;	state Exp;
branches;
next	1.49;

1.49
date	2006.03.27.12.56.29;	author cognet;	state Exp;
branches;
next	1.48;

1.48
date	2006.03.20.14.24.57;	author ru;	state Exp;
branches;
next	1.47;

1.47
date	2006.03.17.18.54.30;	author ru;	state Exp;
branches;
next	1.46;

1.46
date	2005.12.15.18.29.01;	author jhb;	state Exp;
branches;
next	1.45;

1.45
date	2005.06.07.04.51.24;	author brooks;	state Exp;
branches
	1.45.2.1;
next	1.44;

1.44
date	2005.06.07.03.59.26;	author brooks;	state Exp;
branches;
next	1.43;

1.43
date	2005.04.28.16.26.33;	author darrenr;	state Exp;
branches;
next	1.42;

1.42
date	2005.03.18.12.55.07;	author cperciva;	state Exp;
branches;
next	1.41;

1.41
date	2005.03.02.11.53.22;	author trhodes;	state Exp;
branches;
next	1.40;

1.40
date	2005.02.07.21.19.18;	author des;	state Exp;
branches;
next	1.39;

1.39
date	2005.01.20.10.43.43;	author ru;	state Exp;
branches;
next	1.38;

1.38
date	2004.12.23.10.16.46;	author ru;	state Exp;
branches;
next	1.37;

1.37
date	2004.12.23.10.13.17;	author ru;	state Exp;
branches;
next	1.36;

1.36
date	2004.12.21.10.49.27;	author ru;	state Exp;
branches;
next	1.35;

1.35
date	2004.12.21.10.16.01;	author ru;	state Exp;
branches;
next	1.34;

1.34
date	2004.12.21.09.08.05;	author ru;	state Exp;
branches;
next	1.33;

1.33
date	2004.12.21.08.47.07;	author ru;	state Exp;
branches;
next	1.32;

1.32
date	2004.12.18.17.30.53;	author ru;	state Exp;
branches;
next	1.31;

1.31
date	2004.12.04.08.24.36;	author obrien;	state Exp;
branches;
next	1.30;

1.30
date	2004.11.04.12.57.40;	author phk;	state Exp;
branches;
next	1.29;

1.29
date	2004.10.24.15.32.36;	author ru;	state Exp;
branches;
next	1.28;

1.28
date	2004.08.16.03.16.48;	author marius;	state Exp;
branches
	1.28.2.1;
next	1.27;

1.27
date	2004.03.16.13.42.23;	author phk;	state Exp;
branches;
next	1.26;

1.26
date	2004.03.12.13.10.04;	author des;	state Exp;
branches;
next	1.25;

1.25
date	2004.01.18.22.24.23;	author kientzle;	state Exp;
branches;
next	1.24;

1.24
date	2003.12.24.10.59.33;	author ru;	state Exp;
branches;
next	1.23;

1.23
date	2003.12.03.17.12.35;	author imp;	state Exp;
branches
	1.23.2.1;
next	1.22;

1.22
date	2003.12.02.21.52.14;	author brooks;	state Exp;
branches;
next	1.21;

1.21
date	2003.11.09.01.22.27;	author obrien;	state Exp;
branches;
next	1.20;

1.20
date	2003.10.31.19.48.40;	author brooks;	state Exp;
branches;
next	1.19;

1.19
date	2003.09.27.17.27.02;	author markm;	state Exp;
branches;
next	1.18;

1.18
date	2003.09.26.20.26.21;	author fjoe;	state Exp;
branches;
next	1.17;

1.17
date	2003.09.02.06.43.58;	author phk;	state Exp;
branches;
next	1.16;

1.16
date	2003.08.12.14.33.48;	author harti;	state Exp;
branches;
next	1.15;

1.15
date	2003.08.01.09.04.32;	author gordon;	state Exp;
branches;
next	1.14;

1.14
date	2003.07.24.07.42.42;	author gordon;	state Exp;
branches;
next	1.13;

1.13
date	2003.07.21.02.47.04;	author obrien;	state Exp;
branches;
next	1.12;

1.12
date	2003.07.19.20.40.37;	author obrien;	state Exp;
branches;
next	1.11;

1.11
date	2003.07.18.01.07.18;	author obrien;	state Exp;
branches;
next	1.10;

1.10
date	2003.07.17.16.44.06;	author obrien;	state Exp;
branches;
next	1.9;

1.9
date	2003.07.17.16.33.18;	author obrien;	state Exp;
branches;
next	1.8;

1.8
date	2003.07.17.08.02.21;	author obrien;	state Exp;
branches;
next	1.7;

1.7
date	2003.07.15.00.30.31;	author gordon;	state Exp;
branches;
next	1.6;

1.6
date	2003.07.11.16.57.43;	author gordon;	state Exp;
branches;
next	1.5;

1.5
date	2003.06.30.21.13.56;	author gordon;	state Exp;
branches;
next	1.4;

1.4
date	2003.06.30.18.18.05;	author gordon;	state Exp;
branches;
next	1.3;

1.3
date	2003.06.30.05.06.43;	author gordon;	state Exp;
branches;
next	1.2;

1.2
date	2003.06.29.20.44.12;	author gordon;	state Exp;
branches;
next	1.1;

1.1
date	2003.06.29.18.35.37;	author gordon;	state Exp;
branches;
next	;

1.88.2.1
date	2013.03.22.02.29.24;	author svnexp;	state dead;
branches;
next	1.88.2.2;

1.88.2.2
date	2013.03.28.13.03.31;	author svnexp;	state Exp;
branches;
next	;

1.77.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.77.2.1.2.1;
next	1.77.2.2;

1.77.2.2
date	2012.02.09.13.23.33;	author bapt;	state Exp;
branches
	1.77.2.2.2.1;
next	1.77.2.3;

1.77.2.3
date	2012.10.04.09.49.53;	author fjoe;	state Exp;
branches;
next	1.77.2.4;

1.77.2.4
date	2012.10.04.09.53.59;	author fjoe;	state Exp;
branches;
next	1.77.2.5;

1.77.2.5
date	2012.11.17.11.36.30;	author svnexp;	state Exp;
branches;
next	1.77.2.6;

1.77.2.6
date	2012.11.29.14.07.17;	author svnexp;	state Exp;
branches;
next	1.77.2.7;

1.77.2.7
date	2013.02.13.00.03.18;	author svnexp;	state Exp;
branches;
next	1.77.2.8;

1.77.2.8
date	2013.04.19.10.01.46;	author svnexp;	state Exp;
branches;
next	1.77.2.9;

1.77.2.9
date	2013.06.12.01.01.44;	author svnexp;	state Exp;
branches;
next	1.77.2.10;

1.77.2.10
date	2014.05.17.04.01.44;	author svnexp;	state Exp;
branches;
next	;

1.77.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.77.2.1.2.2;

1.77.2.1.2.2
date	2012.11.17.08.36.30;	author svnexp;	state Exp;
branches;
next	;

1.77.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.77.2.2.2.2;

1.77.2.2.2.2
date	2012.11.17.08.47.20;	author svnexp;	state Exp;
branches;
next	;

1.71.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.71.2.1.2.1;
next	1.71.2.2;

1.71.2.2
date	2010.05.20.09.39.01;	author mm;	state Exp;
branches
	1.71.2.2.2.1
	1.71.2.2.4.1;
next	1.71.2.3;

1.71.2.3
date	2011.06.06.09.36.46;	author mm;	state Exp;
branches;
next	1.71.2.4;

1.71.2.4
date	2012.02.09.13.23.44;	author bapt;	state Exp;
branches
	1.71.2.4.2.1;
next	1.71.2.5;

1.71.2.5
date	2012.11.17.10.36.14;	author svnexp;	state Exp;
branches;
next	1.71.2.6;

1.71.2.6
date	2012.11.30.22.42.18;	author svnexp;	state Exp;
branches;
next	1.71.2.7;

1.71.2.7
date	2013.02.13.07.22.14;	author svnexp;	state Exp;
branches;
next	1.71.2.8;

1.71.2.8
date	2013.06.14.20.21.47;	author svnexp;	state Exp;
branches;
next	;

1.71.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.71.2.2.2.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.71.2.2.4.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.71.2.4.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.71.2.4.2.2;

1.71.2.4.2.2
date	2012.11.17.08.24.55;	author svnexp;	state Exp;
branches;
next	;

1.56.2.1
date	2008.08.31.10.15.43;	author rwatson;	state Exp;
branches
	1.56.2.1.2.1
	1.56.2.1.4.1;
next	1.56.2.2;

1.56.2.2
date	2009.05.28.23.05.17;	author kmacy;	state Exp;
branches
	1.56.2.2.2.1
	1.56.2.2.4.1;
next	1.56.2.3;

1.56.2.3
date	2012.11.17.08.03.30;	author svnexp;	state Exp;
branches;
next	;

1.56.2.1.2.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.56.2.1.4.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.56.2.2.2.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.56.2.2.4.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.56.2.2.4.2;

1.56.2.2.4.2
date	2012.11.17.08.16.53;	author svnexp;	state Exp;
branches;
next	;

1.45.2.1
date	2005.12.22.21.17.12;	author jhb;	state Exp;
branches;
next	1.45.2.2;

1.45.2.2
date	2007.02.20.08.33.31;	author delphij;	state Exp;
branches
	1.45.2.2.4.1;
next	1.45.2.3;

1.45.2.3
date	2012.11.17.07.41.11;	author svnexp;	state Exp;
branches;
next	;

1.45.2.2.4.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.28.2.1
date	2005.02.13.07.23.17;	author obrien;	state Exp;
branches
	1.28.2.1.2.1;
next	1.28.2.2;

1.28.2.2
date	2005.04.18.06.08.28;	author cperciva;	state Exp;
branches;
next	;

1.28.2.1.2.1
date	2005.04.22.20.31.22;	author cperciva;	state Exp;
branches;
next	;

1.23.2.1
date	2003.12.24.17.31.53;	author ru;	state Exp;
branches;
next	;


desc
@@


1.91
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/252356
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@#$FreeBSD: head/rescue/rescue/Makefile 252356 2013-06-28 21:00:08Z davide $
#	@@(#)Makefile	8.1 (Berkeley) 6/2/93

NO_MAN=

.include <bsd.own.mk>
MK_SSP=	no

PROG=	rescue
BINDIR?=/rescue

# Shell scripts need #! line to be edited from /bin/sh to /rescue/sh
SCRIPTS= nextboot_FIXED
SCRIPTSNAME_nextboot_FIXED= nextboot
nextboot_FIXED: ../../sbin/reboot/nextboot.sh
	sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET}
CLEANFILES+= nextboot_FIXED

SCRIPTS+= dhclient_FIXED
SCRIPTSNAME_dhclient_FIXED= dhclient-script
dhclient_FIXED: ../../sbin/dhclient/dhclient-script
	sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET}
CLEANFILES+= dhclient_FIXED

# The help which used to be here is now in mk/bsd.crunchgen.mk

# Define Makefile variable RESCUE
CRUNCH_BUILDOPTS+= -DRESCUE
# Define compile-time RESCUE symbol when compiling components
CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS=-DRESCUE

# An experiment that failed: try overriding bsd.lib.mk and bsd.prog.mk
# rather than incorporating rescue-specific logic into standard files.
#MAKEFLAGS= -m ${.CURDIR} ${.MAKEFLAGS}

# Hackery:  'librescue' exists merely as a tool for appropriately
# recompiling specific library entries.  We _know_ they're needed, and
# regular archive searching creates ugly library ordering problems.
# Easiest fix: tell the linker to include them into the executable
# first, so they are guaranteed to override the regular lib entries.
# Note that if 'librescue' hasn't been compiled, we'll just get the
# regular lib entries from libc and friends.
CRUNCH_LIBS+= ${.OBJDIR}/../librescue/*.o

###################################################################
# Programs from stock /bin
#
# WARNING: Changing this list may require adjusting
# /usr/include/paths.h as well!  You were warned!
#
CRUNCH_SRCDIRS+= bin
CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo 	\
	 ed expr getfacl hostname kenv kill ln ls mkdir mv	\
	 pkill ps pwd realpath rm rmdir setfacl sh stty sync test
CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil
CRUNCH_BUILDTOOLS+= bin/sh

# Additional options for specific programs
CRUNCH_ALIAS_test= [
CRUNCH_ALIAS_sh= -sh
# The -sh alias shouldn't appear in /rescue as a hard link
CRUNCH_SUPPRESS_LINK_-sh= 1
CRUNCH_ALIAS_ln= link
CRUNCH_ALIAS_rm= unlink
CRUNCH_ALIAS_ed= red
CRUNCH_ALIAS_pkill= pgrep

.if ${MK_RCMDS} != "no"
CRUNCH_PROGS_bin+= rcp
.endif

.if ${MK_TCSH} != "no"
CRUNCH_PROGS_bin+= csh
CRUNCH_ALIAS_csh= -csh tcsh -tcsh
CRUNCH_BUILDTOOLS+= bin/csh
CRUNCH_SUPPRESS_LINK_-csh= 1
CRUNCH_SUPPRESS_LINK_-tcsh= 1
.endif

###################################################################
# Programs from standard /sbin
#
# WARNING: Changing this list may require adjusting
# /usr/include/paths.h as well!  You were warned!
#
# Note that mdmfs have their own private 'pathnames.h'
# headers in addition to the standard 'paths.h' header.
#
CRUNCH_SRCDIRS+= sbin
CRUNCH_PROGS_sbin= badsect					\
	camcontrol ccdconfig clri devfs dmesg dump		\
	dumpfs dumpon fsck fsck_ffs fsck_msdosfs fsdb		\
	fsirand gbde geom ifconfig init 			\
	kldconfig kldload kldstat kldunload ldconfig 		\
	md5 mdconfig mdmfs mknod mount mount_cd9660		\
	mount_msdosfs mount_nfs mount_nullfs			\
	mount_udf mount_unionfs newfs				\
	newfs_msdos nos-tun ping reboot				\
	restore rcorder route routed rtquery rtsol savecore	\
	spppcontrol swapon sysctl tunefs umount

.if ${MK_ATM} != "no"
CRUNCH_PROGS_sbin+= atmconfig
.endif

.if ${MK_INET6_SUPPORT} != "no"
CRUNCH_PROGS_sbin+= ping6
.endif

.if ${MK_IPFILTER} != "no"
CRUNCH_PROGS_sbin+= ipf
.endif
.if ${MK_ZFS} != "no"
CRUNCH_PROGS_sbin+= zfs
CRUNCH_PROGS_sbin+= zpool
.endif

# crunchgen does not like C++ programs; this should be fixed someday
# CRUNCH_PROGS+= devd

CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec
.if ${MK_IPX} != "no"
CRUNCH_LIBS+= -lipx
.endif
.if ${MK_ZFS} != "no"
CRUNCH_LIBS+= -lavl -ljail -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
.endif
CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv -lmd -lsbuf -lufs -lz

.if ${MACHINE_CPUARCH} == "i386"
CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk
CRUNCH_ALIAS_bsdlabel= disklabel
#CRUNCH_PROGS+= mount_smbfs
#CRUNCH_LIBS+= -lsmb
.endif

.if ${MACHINE} == "pc98"
CRUNCH_PROGS_sbin+= bsdlabel
CRUNCH_SRCDIR_fdisk= $(.CURDIR)/../../sbin/fdisk_pc98
.endif

.if ${MACHINE_CPUARCH} == "ia64"
CRUNCH_PROGS_sbin+= mca
.endif

.if ${MACHINE_CPUARCH} == "sparc64"
CRUNCH_PROGS_sbin+= bsdlabel sunlabel
.endif

.if ${MACHINE_CPUARCH} == "amd64"
CRUNCH_PROGS_sbin+= bsdlabel fdisk
CRUNCH_ALIAS_bsdlabel= disklabel
.endif

CRUNCH_SRCDIR_atm= $(.CURDIR)/../../sbin/atm/atm
CRUNCH_SRCDIR_atmconfig= $(.CURDIR)/../../sbin/atm/atmconfig
CRUNCH_SRCDIR_fore_dnld= $(.CURDIR)/../../sbin/atm/fore_dnld
CRUNCH_SRCDIR_ilmid= $(.CURDIR)/../../sbin/atm/ilmid
CRUNCH_SRCDIR_rtquery= $(.CURDIR)/../../sbin/routed/rtquery
CRUNCH_SRCDIR_ipf= $(.CURDIR)/../../sbin/ipf/ipf
.if ${MK_ZFS} != "no"
CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs
CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool
.endif
CRUNCH_ALIAS_reboot= fastboot halt fasthalt
CRUNCH_ALIAS_restore= rrestore
CRUNCH_ALIAS_dump= rdump
CRUNCH_ALIAS_fsck_ffs= fsck_4.2bsd fsck_ufs
CRUNCH_ALIAS_geom= glabel gpart

# dhclient has historically been troublesome...
CRUNCH_PROGS_sbin+= dhclient
CRUNCH_BUILDOPTS_dhclient= -DRELEASE_CRUNCH -Dlint

##################################################################
# Programs from stock /usr/bin
#
CRUNCH_SRCDIRS+= usr.bin

CRUNCH_PROGS_usr.bin= head mt nc sed tail tee

CRUNCH_PROGS_usr.bin+= gzip
CRUNCH_ALIAS_gzip= gunzip gzcat zcat

CRUNCH_PROGS_usr.bin+= bzip2
CRUNCH_ALIAS_bzip2= bunzip2 bzcat
CRUNCH_LIBS+= -lbz2

CRUNCH_PROGS_usr.bin+= less
CRUNCH_ALIAS_less= more

CRUNCH_PROGS_usr.bin+= xz
CRUNCH_ALIAS_xz= unxz lzma unlzma xzcat lzcat
CRUNCH_LIBS+= -llzma

CRUNCH_PROGS_usr.bin+= tar
CRUNCH_LIBS+= -larchive -lmd
.if ${MK_OPENSSL} != "no"
CRUNCH_LIBS+= -lcrypto
.endif

CRUNCH_PROGS_usr.bin+= vi
CRUNCH_ALIAS_vi= ex

CRUNCH_PROGS_usr.bin+= id
CRUNCH_ALIAS_id= groups whoami

##################################################################
# Programs from stock /usr/sbin
#
CRUNCH_SRCDIRS+= usr.sbin

CRUNCH_PROGS_usr.sbin= chroot

CRUNCH_PROGS_usr.sbin+= chown
CRUNCH_ALIAS_chown= chgrp
##################################################################
CRUNCH_LIBS+= -lm

.include <bsd.crunchgen.mk>
.include <bsd.prog.mk>
@


1.90
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/250626
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
#$FreeBSD: head/rescue/rescue/Makefile 250626 2013-05-13 22:16:33Z delphij $
d133 2
@


1.89
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249083
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
#$FreeBSD: head/rescue/rescue/Makefile 249083 2013-04-04 07:12:24Z mav $
d187 3
@


1.88
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248571
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
#$FreeBSD: head/rescue/rescue/Makefile 248571 2013-03-21 08:38:03Z mm $
d90 1
a90 1
CRUNCH_PROGS_sbin= atacontrol badsect				\
@


1.88.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:03:31 +0000
@
text
@d1 216
@


1.88.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 367
#$FreeBSD: releng/8.4/rescue/rescue/Makefile 246750 2013-02-13 06:46:53Z bapt $
#	@@(#)Makefile	8.1 (Berkeley) 6/2/93

NO_MAN=

.include <bsd.own.mk>
MK_SSP=	no

PROG=	rescue
BINDIR?=/rescue

# Shell scripts need #! line to be edited from /bin/sh to /rescue/sh
SCRIPTS= nextboot_FIXED
SCRIPTSNAME_nextboot_FIXED= nextboot
nextboot_FIXED: ../../sbin/reboot/nextboot.sh
	sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET}
CLEANFILES+= nextboot_FIXED

SCRIPTS+= dhclient_FIXED
SCRIPTSNAME_dhclient_FIXED= dhclient-script
dhclient_FIXED: ../../sbin/dhclient/dhclient-script
	sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET}
CLEANFILES+= dhclient_FIXED

#################################################################
#
# General notes:
#
# A number of Make variables are used to generate the crunchgen config file.
#
#  CRUNCH_SRCDIRS: lists directories to search for included programs
#  CRUNCH_PROGS:  lists programs to be included
#  CRUNCH_LIBS:  libraries to link with
#  CRUNCH_BUILDOPTS: generic build options to be added to every program
#
# Special options can be specified for individual programs
#  CRUNCH_SRCDIR_$(P): base source directory for program $(P)
#  CRUNCH_BUILDOPTS_$(P): additional build options for $(P)
#  CRUNCH_ALIAS_$(P): additional names to be used for $(P)
#
# By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P}
# will be used to generate a hard link to the resulting binary.
# Specific links can be suppressed by setting
# CRUNCH_SUPPRESS_LINK_$(NAME) to 1.
#

# Define Makefile variable RESCUE
CRUNCH_BUILDOPTS+= -DRESCUE
# Define compile-time RESCUE symbol when compiling components
CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS=-DRESCUE

# An experiment that failed: try overriding bsd.lib.mk and bsd.prog.mk
# rather than incorporating rescue-specific logic into standard files.
#MAKEFLAGS= -m ${.CURDIR} ${.MAKEFLAGS}

# Hackery:  'librescue' exists merely as a tool for appropriately
# recompiling specific library entries.  We _know_ they're needed, and
# regular archive searching creates ugly library ordering problems.
# Easiest fix: tell the linker to include them into the executable
# first, so they are guaranteed to override the regular lib entries.
# Note that if 'librescue' hasn't been compiled, we'll just get the
# regular lib entries from libc and friends.
CRUNCH_LIBS+= ${.OBJDIR}/../librescue/*.o

###################################################################
# Programs from stock /bin
#
# WARNING: Changing this list may require adjusting
# /usr/include/paths.h as well!  You were warned!
#
CRUNCH_SRCDIRS+= bin
CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo 	\
	 ed expr getfacl hostname kenv kill ln ls mkdir mv	\
	 pkill ps pwd realpath rm rmdir setfacl sh stty sync test
CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil

# Additional options for specific programs
CRUNCH_ALIAS_test= [
CRUNCH_ALIAS_sh= -sh
# The -sh alias shouldn't appear in /rescue as a hard link
CRUNCH_SUPPRESS_LINK_-sh= 1
CRUNCH_ALIAS_ln= link
CRUNCH_ALIAS_rm= unlink
CRUNCH_ALIAS_ed= red
CRUNCH_ALIAS_pkill= pgrep

.if ${MK_RCMDS} != "no"
CRUNCH_PROGS_bin+= rcp
.endif

.if ${MK_TCSH} != "no"
CRUNCH_PROGS_bin+= csh
CRUNCH_ALIAS_csh= -csh tcsh -tcsh
CRUNCH_SUPPRESS_LINK_-csh= 1
CRUNCH_SUPPRESS_LINK_-tcsh= 1
.endif

###################################################################
# Programs from standard /sbin
#
# WARNING: Changing this list may require adjusting
# /usr/include/paths.h as well!  You were warned!
#
# Note that mdmfs have their own private 'pathnames.h'
# headers in addition to the standard 'paths.h' header.
#
CRUNCH_SRCDIRS+= sbin
CRUNCH_PROGS_sbin= atacontrol badsect				\
	camcontrol ccdconfig clri devfs dmesg dump		\
	dumpfs dumpon fsck fsck_ffs fsck_msdosfs fsdb		\
	fsirand gbde geom ifconfig init 			\
	kldconfig kldload kldstat kldunload ldconfig 		\
	md5 mdconfig mdmfs mknod mount mount_cd9660		\
	mount_msdosfs mount_nfs mount_ntfs mount_nullfs		\
	mount_udf mount_unionfs newfs				\
	newfs_msdos nos-tun ping reboot				\
	restore rcorder route routed rtquery rtsol savecore	\
	spppcontrol swapon sysctl tunefs umount

.if ${MK_ATM} != "no"
CRUNCH_PROGS_sbin+= atmconfig
.endif

.if ${MK_INET6_SUPPORT} != "no"
CRUNCH_PROGS_sbin+= ping6
.endif

.if ${MK_IPFILTER} != "no"
CRUNCH_PROGS_sbin+= ipf
.endif
.if ${MK_ZFS} != "no"
CRUNCH_PROGS_sbin+= zfs
CRUNCH_PROGS_sbin+= zpool
.endif

# crunchgen does not like C++ programs; this should be fixed someday
# CRUNCH_PROGS+= devd

CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec
.if ${MK_IPX} != "no"
CRUNCH_LIBS+= -lipx
.endif
.if ${MK_ZFS} != "no"
CRUNCH_LIBS+= -lavl -ljail -lzfs -lnvpair -lpthread -luutil -lumem
.endif
CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz

.if ${MACHINE_ARCH} == "i386"
CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk
CRUNCH_ALIAS_bsdlabel= disklabel
#.if ${MK_NCP} != "no"
#CRUNCH_PROGS+= mount_nwfs
#CRUNCH_LIBS+= -lncp
#.endif
#CRUNCH_PROGS+= mount_smbfs
#CRUNCH_LIBS+= -lsmb
.endif

.if ${MACHINE} == "pc98"
CRUNCH_PROGS_sbin+= bsdlabel
CRUNCH_SRCDIR_fdisk= $(.CURDIR)/../../sbin/fdisk_pc98
.endif

.if ${MACHINE_ARCH} == "ia64"
CRUNCH_PROGS_sbin+= mca
.endif

.if ${MACHINE_ARCH} == "sparc64"
CRUNCH_PROGS_sbin+= bsdlabel sunlabel
.endif

.if ${MACHINE_ARCH} == "amd64"
CRUNCH_PROGS_sbin+= bsdlabel fdisk
CRUNCH_ALIAS_bsdlabel= disklabel
.endif

CRUNCH_SRCDIR_atm= $(.CURDIR)/../../sbin/atm/atm
CRUNCH_SRCDIR_atmconfig= $(.CURDIR)/../../sbin/atm/atmconfig
CRUNCH_SRCDIR_fore_dnld= $(.CURDIR)/../../sbin/atm/fore_dnld
CRUNCH_SRCDIR_ilmid= $(.CURDIR)/../../sbin/atm/ilmid
CRUNCH_SRCDIR_rtquery= $(.CURDIR)/../../sbin/routed/rtquery
CRUNCH_SRCDIR_ipf= $(.CURDIR)/../../sbin/ipf/ipf
.if ${MK_ZFS} != "no"
CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs
CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool
.endif
CRUNCH_ALIAS_reboot= fastboot halt fasthalt
CRUNCH_ALIAS_restore= rrestore
CRUNCH_ALIAS_dump= rdump
CRUNCH_ALIAS_fsck_ffs= fsck_4.2bsd fsck_ufs
CRUNCH_ALIAS_geom= glabel gpart

# dhclient has historically been troublesome...
CRUNCH_PROGS_sbin+= dhclient
CRUNCH_BUILDOPTS_dhclient= -DRELEASE_CRUNCH -Dlint

##################################################################
# Programs from stock /usr/bin
#
CRUNCH_SRCDIRS+= usr.bin

CRUNCH_PROGS_usr.bin= head mt nc sed tail tee

CRUNCH_PROGS_usr.bin+= gzip
CRUNCH_ALIAS_gzip= gunzip gzcat zcat

CRUNCH_PROGS_usr.bin+= bzip2
CRUNCH_ALIAS_bzip2= bunzip2 bzcat
CRUNCH_LIBS+= -lbz2

CRUNCH_PROGS_usr.bin+= xz
CRUNCH_ALIAS_xz= unxz lzma unlzma xzcat lzcat
CRUNCH_LIBS+= -llzma

CRUNCH_PROGS_usr.bin+= tar
CRUNCH_LIBS+= -larchive -lmd
.if ${MK_OPENSSL} != "no"
CRUNCH_LIBS+= -lcrypto
.endif

CRUNCH_PROGS_usr.bin+= vi
CRUNCH_ALIAS_vi= ex

CRUNCH_PROGS_usr.bin+= id
CRUNCH_ALIAS_id= groups whoami

##################################################################
# Programs from stock /usr/sbin
#
CRUNCH_SRCDIRS+= usr.sbin

CRUNCH_PROGS_usr.sbin= chroot

CRUNCH_PROGS_usr.sbin+= chown
CRUNCH_ALIAS_chown= chgrp
##################################################################
CRUNCH_LIBS+= -lm

##################################################################
#  The following is pretty nearly a generic crunchgen-handling makefile
#

CONF=	$(PROG).conf
OUTMK=	$(PROG).mk
OUTC=   $(PROG).c
OUTPUTS=$(OUTMK) $(OUTC) $(PROG).cache
CRUNCHOBJS= ${.OBJDIR}
.if defined(MAKEOBJDIRPREFIX)
CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR}
.else
CANONICALOBJDIR:= /usr/obj${.CURDIR}
.endif

CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h

# Program names and their aliases contribute hardlinks to 'rescue' executable,
# except for those that get suppressed.
.for D in $(CRUNCH_SRCDIRS)
.for P in $(CRUNCH_PROGS_$(D))
.ifdef CRUNCH_SRCDIR_${P}
$(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile
.else
$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile
.endif
.ifndef CRUNCH_SUPPRESS_LINK_${P}
LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P)
.endif
.for A in $(CRUNCH_ALIAS_$(P))
.ifndef CRUNCH_SUPPRESS_LINK_${A}
LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A)
.endif
.endfor
.endfor
.endfor

all: $(PROG)
exe: $(PROG)

$(CONF): Makefile
	echo \# Auto-generated, do not edit >$(.TARGET)
.ifdef CRUNCH_BUILDOPTS
	echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET)
.endif
.ifdef CRUNCH_LIBS
	echo libs $(CRUNCH_LIBS) >>$(.TARGET)
.endif
.for D in $(CRUNCH_SRCDIRS)
.for P in $(CRUNCH_PROGS_$(D))
	echo progs $(P) >>$(.TARGET)
.ifdef CRUNCH_SRCDIR_${P}
	echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET)
.else
	echo special $(P) srcdir $(.CURDIR)/../../$(D)/$(P) >>$(.TARGET)
.endif
.ifdef CRUNCH_BUILDOPTS_${P}
	echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ \
	    $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET)
.else
	echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ >>$(.TARGET)
.endif
.for A in $(CRUNCH_ALIAS_$(P))
	echo ln $(P) $(A) >>$(.TARGET)
.endfor
.endfor
.endfor

# XXX Make sure we don't pass -P to crunchgen(1).
.MAKEFLAGS:= ${.MAKEFLAGS:N-P}
.ORDER: $(OUTPUTS) objs
$(OUTPUTS): $(CONF)
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \
	    -c $(OUTC) $(CONF)

$(PROG): $(OUTPUTS) objs
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe

objs: $(OUTMK)
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs

# <sigh> Someone should replace the bin/csh and bin/sh build-tools with
# shell scripts so we can remove this nonsense.
build-tools:
.for _tool in bin/csh bin/sh
	cd $(.CURDIR)/../../${_tool}; \
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools
.endfor

# Use a separate build tree to hold files compiled for this crunchgen binary
# Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't
# get that to cooperate with bsd.prog.mk.  Besides, many of the standard
# targets should NOT be propagated into the components.
cleandepend cleandir obj objlink:
.for D in $(CRUNCH_SRCDIRS)
.for P in $(CRUNCH_PROGS_$(D))
.ifdef CRUNCH_SRCDIR_${P}
	cd ${CRUNCH_SRCDIR_$(P)} && \
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
	    DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.else
	cd $(.CURDIR)/../../${D}/${P} && \
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
	    DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.endif
.endfor
.endfor

clean:
	rm -f ${CLEANFILES}
	if [ -e ${.OBJDIR}/$(OUTMK) ]; then				\
		MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean;	\
	fi
.for D in $(CRUNCH_SRCDIRS)
.for P in $(CRUNCH_PROGS_$(D))
.ifdef CRUNCH_SRCDIR_${P}
	cd ${CRUNCH_SRCDIR_$(P)} && \
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
	    DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.else
	cd $(.CURDIR)/../../${D}/${P} && \
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
	    DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.endif
.endfor
.endfor

.include <bsd.prog.mk>
@


1.87
log
@Switching exporter and resync
@
text
@d1 1
a1 1
#$FreeBSD: head/rescue/rescue/Makefile 241680 2012-10-18 12:04:56Z attilio $
d126 1
a126 1
CRUNCH_LIBS+= -lavl -ljail -lzfs -lnvpair -lpthread -luutil -lumem
@


1.86
log
@SVN rev 241680 on 2012-10-18 12:04:56Z by attilio

Disconnect non-MPSAFE SMBFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netsmb, which is a base
requirement for SMBFS.

In the while SMBFS regular users can use FUSE interface and smbnetfs
port to work with their SMBFS partitions.

Also, there are ongoing efforts by vendor to support in-kernel smbfs,
so there are good chances that it will get relinked once properly locked.

This is not targeted for MFC.
@
text
@d1 1
a1 1
#$FreeBSD$
@


1.85
log
@SVN rev 241636 on 2012-10-17 11:30:00Z by attilio

Disconnect non-MPSAFE NTFS from the build in preparation for dropping
GIANT from VFS. This code is particulary broken and fragile and other
in-kernel implementations around, found in other operating systems,
don't really seem clean and solid enough to be imported at all.
If someone wants to reconsider in-kernel NTFS implementation for
inclusion again, a fair effort for completely fixing and cleaning it
up is expected.

In the while NTFS regular users can use FUSE interface and ntfs-3g
port to work with their NTFS partitions.

This is not targeted for MFC.
@
text
@a132 2
#CRUNCH_PROGS+= mount_smbfs
#CRUNCH_LIBS+= -lsmb
@


1.84
log
@SVN rev 241629 on 2012-10-17 11:16:17Z by attilio

Disconnect non-MPSAFE NWFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netncp, which is a base
requirement for NWFS.

In the possibility of a future maintenance of the code and later
readd to the FreeBSD base, maybe we should think about a better location
for netncp. I'm not entirely sure the / top location is actually right,
however I will let network people to comment on that more specifically.

This is not targeted for MFC.
@
text
@d96 1
a96 1
	mount_msdosfs mount_nfs mount_ntfs mount_nullfs		\
@


1.83
log
@SVN rev 240740 on 2012-09-20 08:50:39Z by bapt

unbreak build: rescue now needs -ljail if MK_ZFS is on
@
text
@a132 4
#.if ${MK_NCP} != "no"
#CRUNCH_PROGS+= mount_nwfs
#CRUNCH_LIBS+= -lncp
#.endif
@


1.82
log
@SVN rev 238926 on 2012-07-30 23:14:24Z by mm

Partial MFV (illumos-gate 13753:2aba784c276b)
2762 zpool command should have better support for feature flags

References:
https://www.illumos.org/issues/2762

MFC after:	2 weeks
@
text
@d126 1
a126 1
CRUNCH_LIBS+= -lavl -lzfs -lnvpair -lpthread -luutil -lumem
@


1.81
log
@SVN rev 231642 on 2012-02-14 07:14:42Z by rmh

Disable jail support in ifconfig when either building a rescue
image or MK_JAIL knob has been set to "no".

Reviewed by:	bz
Approved by:	adrian (mentor)
@
text
@d126 1
a126 1
CRUNCH_LIBS+= -lavl -lnvpair -lzfs -lpthread -luutil -lumem
@


1.80
log
@SVN rev 228112 on 2011-11-29 03:27:09Z by fjoe

-lreadline is not required anymore.
@
text
@d128 1
a128 1
CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs -lz
@


1.79
log
@SVN rev 228074 on 2011-11-28 15:44:04Z by fjoe

-lpthread is required by -lzfs so should be later in LIBS list.

There were no "undefined symbol pthread_xxx" errors during the link before
this fix only because of STATIC_LIB_REQUIRE() declarations in
lib/libthr/thread/thr_init.c.
@
text
@d128 1
a128 1
CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz
@


1.78
log
@SVN rev 227531 on 2011-11-15 16:20:39Z by des

Add netcat (nc) to /rescue.

MFC after:	3 weeks
@
text
@d126 1
a126 1
CRUNCH_LIBS+= -lavl -lnvpair -lpthread -lzfs -luutil -lumem
@


1.77
log
@SVN rev 219089 on 2011-02-27 19:41:40Z by pjd

Finally... Import the latest open-source ZFS version - (SPA) 28.

Few new things available from now on:

- Data deduplication.
- Triple parity RAIDZ (RAIDZ3).
- zfs diff.
- zpool split.
- Snapshot holds.
- zpool import -F. Allows to rewind corrupted pool to earlier
  transaction group.
- Possibility to import pool in read-only mode.

MFC after:	1 month
@
text
@d184 1
a184 1
CRUNCH_PROGS_usr.bin= head mt sed tail tee
@


1.77.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.77.2.2
log
@SVN rev 231271 on 2012-02-09 13:23:33Z by bapt

MFH r227531: Add netcat (nc) to /rescue.

Approved by:	des (mentor)
@
text
@d184 1
a184 1
CRUNCH_PROGS_usr.bin= head mt nc sed tail tee
@


1.77.2.3
log
@SVN rev 241192 on 2012-10-04 09:49:53Z by fjoe

MFC: r241002

Fix pseudo checksum calculation.

This fixes ipfilter w/ network controllers that implement only
partial rx csum offloading.

PR:		106438
Obtained from:	upstream
@
text
@d126 1
a126 1
CRUNCH_LIBS+= -lavl -lnvpair -lzfs -lpthread -luutil -lumem
d128 1
a128 1
CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs -lz
@


1.77.2.4
log
@SVN rev 241193 on 2012-10-04 09:53:59Z by fjoe

Revert changes that ocassionally got into r241192.

Pointy hat to:	me
@
text
@d126 1
a126 1
CRUNCH_LIBS+= -lavl -lnvpair -lpthread -lzfs -luutil -lumem
d128 1
a128 1
CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz
@


1.77.2.5
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
#$FreeBSD: stable/9/rescue/rescue/Makefile 241193 2012-10-04 09:53:59Z fjoe $
@


1.77.2.6
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/243674
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243674 | mm | 2012-11-29 14:05:04 +0000 (Thu, 29 Nov 2012) | 223 lines
## SVN ##
## SVN ## Merge ZFS feature flags support and related bugfixes:
## SVN ## 236884, 237001, 237119, 237458, 237972, 238113, 238391, 238422, 238926,
## SVN ## 238950, 238951, 239389, 239394, 239620, 239774, 239953, 239958, 239967,
## SVN ## 239968, 240063, 240133, 240153, 240303, 240345, 240415, 240955, 241655,
## SVN ## 243014, 243505, 243506
## SVN ##
## SVN ## MFC r236884:
## SVN ## Introduce "feature flags" for ZFS pools (bump SPA version to 5000).
## SVN ## Add first feature "com.delphix:async_destroy" (asynchronous destroy
## SVN ## of ZFS datasets).
## SVN ## Implement features support in ZFS boot code.
## SVN ##
## SVN ## Illumos revisions merged:
## SVN ## 13700:2889e2596bd6
## SVN ## 13701:1949b688d5fb
## SVN ## 2619 asynchronous destruction of ZFS file systems
## SVN ## 2747 SPA versioning with zfs feature flags
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/2619
## SVN ##   https://www.illumos.org/issues/2747
## SVN ##
## SVN ## MFC r237001:
## SVN ## Fix ZFS boot with pre-features pools (version <= 28) broken in r236884
## SVN ##
## SVN ## MFC r237119 [1]:
## SVN ## Do not remount ZFS dataset if changing canmount property to "on" and
## SVN ## dataset is already mounted.
## SVN ##
## SVN ## MFC r237458:
## SVN ## Import Illumos revision 13736:9f1d48e1681f
## SVN ## 2901 ZFS receive fails for exabyte sparse files
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/2901
## SVN ##
## SVN ## MFC r237972:
## SVN ## Expose scrub and resilver tunables.
## SVN ## This allows the user to tune the priority trade-off between scrub/resilver
## SVN ## and other ZFS I/O.
## SVN ##
## SVN ## MFC r238113 (pjd):
## SVN ## vdev_io_done stage is not used for ioctls.
## SVN ##
## SVN ## MFC r238391:
## SVN ## Change behavior introduced in r237119 to vendor solution
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/2883
## SVN ##
## SVN ## MFC r238422:
## SVN ## Merge illumos commit 13749:df4cd82e2b60
## SVN ##
## SVN ## 1796 "ZFS HOLD" should not be used when doing "ZFS SEND" froma read-only pool
## SVN ## 2871 support for __ZFS_POOL_RESTRICT used by ZFS test suite
## SVN ## 2903 zfs destroy -d does not work
## SVN ## 2957 zfs destroy -R/r sometimes fails when removing defer-destroyed snapshot
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/1796
## SVN ##   https://www.illumos.org/issues/2871
## SVN ##   https://www.illumos.org/issues/2903
## SVN ##   https://www.illumos.org/issues/2957
## SVN ##
## SVN ## MFC r238926:
## SVN ## Partial MFV (illumos-gate 13753:2aba784c276b)
## SVN ## 2762 zpool command should have better support for feature flags
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/2762
## SVN ##
## SVN ## MFC r238950:
## SVN ## Fix reporting of root pool upgrade notice.
## SVN ##
## SVN ## MFC r238951:
## SVN ## Fix wrong indent according to style(9)
## SVN ##
## SVN ## MFC r239389:
## SVN ## Backport fix for vendor issue #3085
## SVN ## 3085 zfs diff panics, then panics in a loop on booting
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/3085
## SVN ##
## SVN ## MFC r239394:
## SVN ## Update zfs(8) manpage with illumos version of "zfs diff"
## SVN ##
## SVN ## Illumos issue:
## SVN ##   2399 zfs manual page does not document use of "zfs diff"
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/2399
## SVN ##
## SVN ## MFC r239620 [2]:
## SVN ## Merge recent vendor changes:
## SVN ## 3086 unnecessarily setting DS_FLAG_INCONSISTENT on async destroyed datasets
## SVN ## 3090 vdev_reopen() during reguid causes vdev to be treated as corrupt
## SVN ## 3102 vdev_uberblock_load() and vdev_validate() may read the wrong label
## SVN ##
## SVN ## Referenes:
## SVN ##   https://www.illumos.org/issues/3086
## SVN ##   https://www.illumos.org/issues/3090
## SVN ##   https://www.illumos.org/issues/3102
## SVN ##
## SVN ## MFC r239774:
## SVN ## Merge recent vendor changes:
## SVN ## 3100 zvol rename fails with EBUSY when dirty
## SVN ## 3104 eliminate empty bpobjs
## SVN ## 3120 zinject hangs in zfsdev_ioctl() due to uninitialized zc
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/3100
## SVN ##   https://www.illumos.org/issues/3104
## SVN ##   https://www.illumos.org/issues/3120
## SVN ##
## SVN ## MFC r239953 (joel):
## SVN ## Mdoc fixes.
## SVN ##
## SVN ## MFC r239958 (joel):
## SVN ## Minor mdoc fixes.
## SVN ##
## SVN ## MFC r239967 (joel):
## SVN ## Mdoc fixes.
## SVN ##
## SVN ## MFC r239968 (joel):
## SVN ## Remove trailing whitespace.
## SVN ##
## SVN ## MFC r240063 (gjb):
## SVN ## Add myself to copyright sections, per CDDL license.
## SVN ##
## SVN ## MFC r240133:
## SVN ## Merge recent vendor changes and sync code:
## SVN ## 1862 incremental zfs receive fails for sparse file > 8PB
## SVN ## 3112 ztest does not honor ZFS_DEBUG
## SVN ## 3122 zfs destroy filesystem should prefetch blocks
## SVN ## 3129 'zpool reopen' restarts resilvers
## SVN ## 3130 ztest failure: Assertion failed:
## SVN ##        0 == dmu_objset_destroy(name, B_FALSE) (0x0 == 0x10)
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/1862
## SVN ##   https://www.illumos.org/issues/3112
## SVN ##   https://www.illumos.org/issues/3122
## SVN ##   https://www.illumos.org/issues/3129
## SVN ##   https://www.illumos.org/issues/3130
## SVN ##
## SVN ## MFC r240153 (gjb) [3]:
## SVN ## Typo fix and minor word swap.
## SVN ##
## SVN ## MFC r240303:
## SVN ## Add assfail() and assfail3() to the opensolaris module.
## SVN ## Remove obsoleted intermediate cddl/compat/opensolaris/sys/debug.h.
## SVN ##
## SVN ## MFC r240345 (avg):
## SVN ## zfs: fix sa_modify_attrs handling of variable-sized attributes
## SVN ##
## SVN ## - skip length_idx index for a replaced variable-sized attribute
## SVN ## - skip length_idx index for a removed variable-sized attribute
## SVN ## - also re-arranged code to make sure that length_idx is always
## SVN ##   incremented for variable-sized attributes
## SVN ## - additionally add an assertion that the number of actually produced
## SVN ##   attributes is the same as the expected number of resulting
## SVN ##   attributes
## SVN ##
## SVN ## MFC r240415:
## SVN ## Merge recent zfs vendor changes, sync code and adjust userland DEBUG.
## SVN ##
## SVN ## Illumos issued covered:
## SVN ## 1884 Empty "used" field for zfs *space commands
## SVN ## 3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument
## SVN ##      is zero
## SVN ## 3028 zfs {group,user}space -n prints (null) instead of numeric GID/UID
## SVN ## 3048 zfs {user,group}space [-s|-S] is broken
## SVN ## 3049 zfs {user,group}space -t doesn't really filter the results
## SVN ## 3060 zfs {user,group}space -H output isn't tab-delimited
## SVN ## 3061 zfs {user,group}space -o doesn't use specified fields order
## SVN ## 3064 usr/src/cmd/zpool/zpool_main.c misspells "successful"
## SVN ## 3093 zfs {user,group}space's -i is noop
## SVN ## 3098 zfs userspace/groupspace fail without saying why when run as non-root
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/ + [issue_id]
## SVN ##
## SVN ## MFC r240955 (partial):
## SVN ## Merge recent vendor changes in ZFS.
## SVN ##
## SVN ## Illumos issued covered:
## SVN ## 3139 zdb dies when it tries to determine path of unlinked file
## SVN ## 3189 kernel panic in ZFS test suite during hotspare_onoffline_004_neg
## SVN ## 3208 moving zpool cross-endian results in incorrect user/group accounting
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/ + [issue_id]
## SVN ##
## SVN ## MFC r241655:
## SVN ## Add missing initialization for do_prefix.
## SVN ## Corrects porting error in r238391
## SVN ##
## SVN ## Vendor issue and changeset reference:
## SVN ## 2883 changing "canmount" property to "on" should not always remount dataset
## SVN ## https://www.illumos.org/issues/2883
## SVN ## Changeset 13743:95aba6e49b9f
## SVN ##
## SVN ## MFC r243014:
## SVN ## Move zpool-features manual page from section 5 to section 7
## SVN ## and fix references
## SVN ##
## SVN ## Reported by:	pluknet
## SVN ##
## SVN ## MFC r243505:
## SVN ## Illumos 13886:e3261d03efbf
## SVN ##
## SVN ## 3349 zpool upgrade -V bumps the on disk version number, but leaves
## SVN ##      the in core version
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/3349
## SVN ##
## SVN ## MFC r243506:
## SVN ## zfs sha256 checksum is missing in zfs.8 manpage
## SVN ##
## SVN ## PR:	kern/167905 [1], kern/170912 [2], kern/170914 [2], doc/171356 [3]
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
#$FreeBSD: stable/9/rescue/rescue/Makefile 243674 2012-11-29 14:05:04Z mm $
d126 1
a126 1
CRUNCH_LIBS+= -lavl -lzfs -lnvpair -lpthread -luutil -lumem
@


1.77.2.7
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/246723
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
#$FreeBSD: stable/9/rescue/rescue/Makefile 246723 2013-02-12 23:01:21Z bapt $
d126 1
a126 1
CRUNCH_LIBS+= -lavl -ljail -lzfs -lnvpair -lpthread -luutil -lumem
@


1.77.2.8
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249643
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
#$FreeBSD: stable/9/rescue/rescue/Makefile 249643 2013-04-19 09:19:10Z mm $
d126 1
a126 1
CRUNCH_LIBS+= -lavl -ljail -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
@


1.77.2.9
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251642
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
#$FreeBSD: stable/9/rescue/rescue/Makefile 251642 2013-06-12 00:33:30Z delphij $
a192 3
CRUNCH_PROGS_usr.bin+= less
CRUNCH_ALIAS_less= more

@


1.77.2.10
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/266286
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
#$FreeBSD: stable/9/rescue/rescue/Makefile 266286 2014-05-17 03:21:50Z bdrewery $
d55 1
a55 1
CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -ll -ltermcap -lutil
d126 1
a126 1
CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
@


1.77.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.77.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
#$FreeBSD: releng/9.1/rescue/rescue/Makefile 231271 2012-02-09 13:23:33Z bapt $
@


1.77.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.77.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
#$FreeBSD: releng/9.0/rescue/rescue/Makefile 219089 2011-02-27 19:41:40Z pjd $
@


1.76
log
@SVN rev 215226 on 2010-11-13 03:11:27Z by adrian

Break out the rules which generate crunchgen'ed binaries into a separate
.mk file so they can be reused.

Introduce a new option, CRUNCH_BUILDTOOLS, which lists the binaries that
require tools built in the local architecture. sh and csh both require this.
It was previously hardcoded in rescue/rescue/Makefile .

Introduce a new option, CRUNCH_SHLIBS, which lists the shared libraries
to link against. These override the static libraries listed in CRUNCH_LIBS.
Some build environments may wish to use a handful of shared libraries
(eg libc.so) so other small, dynamic binaries can be run in the environment.

Remove the now-shared code from rescue/rescue/Makefile and introduce the
CRUNCH_BUILDTOOLS option for the above shells.
@
text
@d126 1
a126 1
CRUNCH_LIBS+= -lzfs -lnvpair -luutil -lavl
@


1.75
log
@SVN rev 211725 on 2010-08-23 22:24:11Z by imp

MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
@
text
@d25 1
a25 21
#################################################################
#
# General notes:
#
# A number of Make variables are used to generate the crunchgen config file.
#
#  CRUNCH_SRCDIRS: lists directories to search for included programs
#  CRUNCH_PROGS:  lists programs to be included
#  CRUNCH_LIBS:  libraries to link with
#  CRUNCH_BUILDOPTS: generic build options to be added to every program
#
# Special options can be specified for individual programs
#  CRUNCH_SRCDIR_$(P): base source directory for program $(P)
#  CRUNCH_BUILDOPTS_$(P): additional build options for $(P)
#  CRUNCH_ALIAS_$(P): additional names to be used for $(P)
#
# By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P}
# will be used to generate a hard link to the resulting binary.
# Specific links can be suppressed by setting
# CRUNCH_SUPPRESS_LINK_$(NAME) to 1.
#
d56 1
d75 1
d221 1
a221 128
##################################################################
#  The following is pretty nearly a generic crunchgen-handling makefile
#

CONF=	$(PROG).conf
OUTMK=	$(PROG).mk
OUTC=   $(PROG).c
OUTPUTS=$(OUTMK) $(OUTC) $(PROG).cache
CRUNCHOBJS= ${.OBJDIR}
.if defined(MAKEOBJDIRPREFIX)
CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR}
.else
CANONICALOBJDIR:= /usr/obj${.CURDIR}
.endif

CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h

# Program names and their aliases contribute hardlinks to 'rescue' executable,
# except for those that get suppressed.
.for D in $(CRUNCH_SRCDIRS)
.for P in $(CRUNCH_PROGS_$(D))
.ifdef CRUNCH_SRCDIR_${P}
$(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile
.else
$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile
.endif
.ifndef CRUNCH_SUPPRESS_LINK_${P}
LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P)
.endif
.for A in $(CRUNCH_ALIAS_$(P))
.ifndef CRUNCH_SUPPRESS_LINK_${A}
LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A)
.endif
.endfor
.endfor
.endfor

all: $(PROG)
exe: $(PROG)

$(CONF): Makefile
	echo \# Auto-generated, do not edit >$(.TARGET)
.ifdef CRUNCH_BUILDOPTS
	echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET)
.endif
.ifdef CRUNCH_LIBS
	echo libs $(CRUNCH_LIBS) >>$(.TARGET)
.endif
.for D in $(CRUNCH_SRCDIRS)
.for P in $(CRUNCH_PROGS_$(D))
	echo progs $(P) >>$(.TARGET)
.ifdef CRUNCH_SRCDIR_${P}
	echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET)
.else
	echo special $(P) srcdir $(.CURDIR)/../../$(D)/$(P) >>$(.TARGET)
.endif
.ifdef CRUNCH_BUILDOPTS_${P}
	echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ \
	    $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET)
.else
	echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ >>$(.TARGET)
.endif
.for A in $(CRUNCH_ALIAS_$(P))
	echo ln $(P) $(A) >>$(.TARGET)
.endfor
.endfor
.endfor

# XXX Make sure we don't pass -P to crunchgen(1).
.MAKEFLAGS:= ${.MAKEFLAGS:N-P}
.ORDER: $(OUTPUTS) objs
$(OUTPUTS): $(CONF)
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \
	    -c $(OUTC) $(CONF)

$(PROG): $(OUTPUTS) objs
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe

objs: $(OUTMK)
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs

# <sigh> Someone should replace the bin/csh and bin/sh build-tools with
# shell scripts so we can remove this nonsense.
build-tools:
.for _tool in bin/csh bin/sh
	cd $(.CURDIR)/../../${_tool}; \
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools
.endfor

# Use a separate build tree to hold files compiled for this crunchgen binary
# Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't
# get that to cooperate with bsd.prog.mk.  Besides, many of the standard
# targets should NOT be propagated into the components.
cleandepend cleandir obj objlink:
.for D in $(CRUNCH_SRCDIRS)
.for P in $(CRUNCH_PROGS_$(D))
.ifdef CRUNCH_SRCDIR_${P}
	cd ${CRUNCH_SRCDIR_$(P)} && \
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
	    DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.else
	cd $(.CURDIR)/../../${D}/${P} && \
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
	    DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.endif
.endfor
.endfor

clean:
	rm -f ${CLEANFILES}
	if [ -e ${.OBJDIR}/$(OUTMK) ]; then				\
		MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean;	\
	fi
.for D in $(CRUNCH_SRCDIRS)
.for P in $(CRUNCH_PROGS_$(D))
.ifdef CRUNCH_SRCDIR_${P}
	cd ${CRUNCH_SRCDIR_$(P)} && \
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
	    DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.else
	cd $(.CURDIR)/../../${D}/${P} && \
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \
	    DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET}
.endif
.endfor
.endfor

@


1.74
log
@SVN rev 207849 on 2010-05-10 15:28:44Z by mm

Enable liblzma support in libarchive
Adjust dependencies for programs using libarchive
Add xz and linkage against liblzma to rescue system

Approved by:	kientzle, delphij (mentor)
MFC after:	2 weeks
@
text
@d148 1
a148 1
.if ${MACHINE_ARCH} == "i386"
d164 1
a164 1
.if ${MACHINE_ARCH} == "ia64"
d168 1
a168 1
.if ${MACHINE_ARCH} == "sparc64"
d172 1
a172 1
.if ${MACHINE_ARCH} == "amd64"
@


1.73
log
@SVN rev 202755 on 2010-01-21 16:56:27Z by ed

Remove libulog from the bootstrap again.

libulog now only provides functions that are used by various packages
from the ports tree, namely the libutempter ones. There is no reason to
link it into the crunch/fixit binaries anymore.
@
text
@d211 4
@


1.72
log
@SVN rev 200169 on 2009-12-05 23:23:46Z by ed

Unbreak rescue(8). We should also link against libulog now.
@
text
@d75 1
a75 1
CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lulog -lutil
@


1.71
log
@SVN rev 194871 on 2009-06-24 18:21:37Z by jamie

Add the "vnet" and "-vnet" options, to allow moving interfaces between
jails with VIMAGE.

Approved by:	bz (mentor)
@
text
@d75 1
a75 1
CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil
@


1.71.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.71.2.2
log
@SVN rev 208345 on 2010-05-20 09:39:01Z by mm

Add xz to rescue.

Approved by:	delphij (mentor)
@
text
@a210 4
CRUNCH_PROGS_usr.bin+= xz
CRUNCH_ALIAS_xz= unxz lzma unlzma xzcat lzcat
CRUNCH_LIBS+= -llzma

@


1.71.2.3
log
@SVN rev 222741 on 2011-06-06 09:36:46Z by mm

MFC ZFS version 28 and related revisions:
208682, 211900, 212543, 213791, 216378, 218007, 218725, 219089, 219090,
219092, 219316, 219317, 219320, 219404, 219636, 219703, 219959, 219973,
220447, 220575, 221112, 221177, 221263, 221409, 222050, 222267, 222268

MFC r208682 (pjd):
Fix panic when reading label from provider with non power of 2 sector size.

MFC r211900 (pjd):
Use ZFS_CTLDIR_NAME instead of hardcoding ".zfs".

MFC r212543 (imp):
Simplify atomic selection

MFC r213791 (rpaulo):
Pass a format string to panic() and to taskqueue_start_threads().

Found with:	clang

MFC r216378 (pjd):
Remove redundant semicolon and empty like.

MFC r218007 (jchandra):
CDDL fixes for MIPS n32.

Provide 64 bit atomic ops, and use 32 bit pointer.

MFC r218725 (dim):
When building libzpool on ia64 or sparc64, don't add the .note.GNU-stack
section.

MFC r219089 (pjd):
Finally... Import the latest open-source ZFS version - (SPA) 28.

Few new things available from now on:

- Data deduplication.
- Triple parity RAIDZ (RAIDZ3).
- zfs diff.
- zpool split.
- Snapshot holds.
- zpool import -F. Allows to rewind corrupted pool to earlier
  transaction group.
- Possibility to import pool in read-only mode.

MFC r219090 (pjd):
Commit two more files missed in r219089.

MFC r219092 (pjd):
Use proper lock in assertion.

MFC r219316 (pjd):
Simplify zvol_remove_minors() a bit.

MFC r219317 (pjd):
Make renaming of a ZVOL, ZVOL's parent directory and ZVOL snapshot work.

MFC r219320 (pjd):
Fix libzpool build.

MFC r219404 (pjd):
Correct readdir over ZFS handling.

MFC r219636 (pjd):
Fix potential panic in dbuf_sync_list() relate to spill blocks handling.

MFC r219703 (ae):
The size of zfsboot2 grown up to 64 Kbytes in r219089.
Increase NSECT up to 128 sectors too.

MFC r219959 (pjd):
Properly print characters larger than 127.

MFC r219973 (pjd):
Checking file access on size change is bogus. The checks are done earlier by
VFS where we know if this is truncate(2) or ftruncate(2). If this is the
latter we should depend on the mode the file was opened and not on the current
permission.

MFC r220447 (mm):
Partially fix ZFS compat code for sparc64.
Some endianess bugs still need to be resolved.

MFC r220575 (pjd):
Fix 'zfs list <path>' handling. If the path was found, the 'ret' variable was
uninitialized.

MFC r221112 (marcel):
Fix copy-paste bug.

MFC r221177 (jhb):
Due to space constraints, the UFS boot2 and boot1 use an evil hack where
boot2 calls back into boot1 to perform disk reads.  The ZFS MBR boot blocks
do not have the same space constraints, so remove this hack for ZFS.
While here, remove commented out code to support C/H/S addressing from
zfsldr.  The ZFS and GPT bootstraps always just use EDD LBA addressing.

MFC r221263 (mm):
Fix deduplicated zfs receive
(dmu_recv_stream builds incomplete guid_to_ds_map)

Illumos-gate changeset: 13329:c48b8bf84ab7

MFC r221409 (marius):
Convert the last use of xcopyout() to ddi_copyout() and remove the now
unused xcopyin() as well as xcopyout().

MFC r222050 (mm):
Restore old (v15) behaviour for a recursive snapshot destroy.
(zfs destroy -r pool/dataset@@snapshot)

To destroy all descendent snapshots with the same name the top level
snapshot was not required to exist. So if the top level snapshot does
not exist, check permissions of the parent dataset instead.

Filed as Illumos Bug #1043

MFC r222267 (pjd):
Don't access task structure once we call task function.
The task structure might be no longer available.
This also allows to eliminates the need for two tasks in the zio structure.

MFC r222268 (pjd):
Don't pass pointer to name buffer which is on the stack to another thread,
because the stack might be paged out once the other thread tries to use the
data. Instead, just allocate memory.

Discussed with:		pjd
@
text
@d144 1
a144 1
CRUNCH_LIBS+= -lavl -lnvpair -lpthread -lzfs -luutil -lumem
@


1.71.2.4
log
@SVN rev 231272 on 2012-02-09 13:23:44Z by bapt

MFH r227531: Add netcat (nc) to /rescue.

Approved by:	des (mentor)
@
text
@d202 1
a202 1
CRUNCH_PROGS_usr.bin= head mt nc sed tail tee
@


1.71.2.5
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
#$FreeBSD: stable/8/rescue/rescue/Makefile 231272 2012-02-09 13:23:44Z bapt $
@


1.71.2.6
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/243717
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243717 | mm | 2012-11-30 22:38:42 +0000 (Fri, 30 Nov 2012) | 223 lines
## SVN ##
## SVN ## Merge ZFS feature flags support and related bugfixes:
## SVN ## 236884, 237001, 237119, 237458, 237972, 238113, 238391, 238422, 238926,
## SVN ## 238950, 238951, 239389, 239394, 239620, 239774, 239953, 239958, 239967,
## SVN ## 239968, 240063, 240133, 240153, 240303, 240345, 240415, 240955, 241655,
## SVN ## 243014, 243505, 243506
## SVN ##
## SVN ## MFC r236884:
## SVN ## Introduce "feature flags" for ZFS pools (bump SPA version to 5000).
## SVN ## Add first feature "com.delphix:async_destroy" (asynchronous destroy
## SVN ## of ZFS datasets).
## SVN ## Implement features support in ZFS boot code.
## SVN ##
## SVN ## Illumos revisions merged:
## SVN ## 13700:2889e2596bd6
## SVN ## 13701:1949b688d5fb
## SVN ## 2619 asynchronous destruction of ZFS file systems
## SVN ## 2747 SPA versioning with zfs feature flags
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/2619
## SVN ##   https://www.illumos.org/issues/2747
## SVN ##
## SVN ## MFC r237001:
## SVN ## Fix ZFS boot with pre-features pools (version <= 28) broken in r236884
## SVN ##
## SVN ## MFC r237119 [1]:
## SVN ## Do not remount ZFS dataset if changing canmount property to "on" and
## SVN ## dataset is already mounted.
## SVN ##
## SVN ## MFC r237458:
## SVN ## Import Illumos revision 13736:9f1d48e1681f
## SVN ## 2901 ZFS receive fails for exabyte sparse files
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/2901
## SVN ##
## SVN ## MFC r237972:
## SVN ## Expose scrub and resilver tunables.
## SVN ## This allows the user to tune the priority trade-off between scrub/resilver
## SVN ## and other ZFS I/O.
## SVN ##
## SVN ## MFC r238113 (pjd):
## SVN ## vdev_io_done stage is not used for ioctls.
## SVN ##
## SVN ## MFC r238391:
## SVN ## Change behavior introduced in r237119 to vendor solution
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/2883
## SVN ##
## SVN ## MFC r238422:
## SVN ## Merge illumos commit 13749:df4cd82e2b60
## SVN ##
## SVN ## 1796 "ZFS HOLD" should not be used when doing "ZFS SEND" froma read-only pool
## SVN ## 2871 support for __ZFS_POOL_RESTRICT used by ZFS test suite
## SVN ## 2903 zfs destroy -d does not work
## SVN ## 2957 zfs destroy -R/r sometimes fails when removing defer-destroyed snapshot
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/1796
## SVN ##   https://www.illumos.org/issues/2871
## SVN ##   https://www.illumos.org/issues/2903
## SVN ##   https://www.illumos.org/issues/2957
## SVN ##
## SVN ## MFC r238926:
## SVN ## Partial MFV (illumos-gate 13753:2aba784c276b)
## SVN ## 2762 zpool command should have better support for feature flags
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/2762
## SVN ##
## SVN ## MFC r238950:
## SVN ## Fix reporting of root pool upgrade notice.
## SVN ##
## SVN ## MFC r238951:
## SVN ## Fix wrong indent according to style(9)
## SVN ##
## SVN ## MFC r239389:
## SVN ## Backport fix for vendor issue #3085
## SVN ## 3085 zfs diff panics, then panics in a loop on booting
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/3085
## SVN ##
## SVN ## MFC r239394:
## SVN ## Update zfs(8) manpage with illumos version of "zfs diff"
## SVN ##
## SVN ## Illumos issue:
## SVN ##   2399 zfs manual page does not document use of "zfs diff"
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/2399
## SVN ##
## SVN ## MFC r239620 [2]:
## SVN ## Merge recent vendor changes:
## SVN ## 3086 unnecessarily setting DS_FLAG_INCONSISTENT on async destroyed datasets
## SVN ## 3090 vdev_reopen() during reguid causes vdev to be treated as corrupt
## SVN ## 3102 vdev_uberblock_load() and vdev_validate() may read the wrong label
## SVN ##
## SVN ## Referenes:
## SVN ##   https://www.illumos.org/issues/3086
## SVN ##   https://www.illumos.org/issues/3090
## SVN ##   https://www.illumos.org/issues/3102
## SVN ##
## SVN ## MFC r239774:
## SVN ## Merge recent vendor changes:
## SVN ## 3100 zvol rename fails with EBUSY when dirty
## SVN ## 3104 eliminate empty bpobjs
## SVN ## 3120 zinject hangs in zfsdev_ioctl() due to uninitialized zc
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/3100
## SVN ##   https://www.illumos.org/issues/3104
## SVN ##   https://www.illumos.org/issues/3120
## SVN ##
## SVN ## MFC r239953 (joel):
## SVN ## Mdoc fixes.
## SVN ##
## SVN ## MFC r239958 (joel):
## SVN ## Minor mdoc fixes.
## SVN ##
## SVN ## MFC r239967 (joel):
## SVN ## Mdoc fixes.
## SVN ##
## SVN ## MFC r239968 (joel):
## SVN ## Remove trailing whitespace.
## SVN ##
## SVN ## MFC r240063 (gjb):
## SVN ## Add myself to copyright sections, per CDDL license.
## SVN ##
## SVN ## MFC r240133:
## SVN ## Merge recent vendor changes and sync code:
## SVN ## 1862 incremental zfs receive fails for sparse file > 8PB
## SVN ## 3112 ztest does not honor ZFS_DEBUG
## SVN ## 3122 zfs destroy filesystem should prefetch blocks
## SVN ## 3129 'zpool reopen' restarts resilvers
## SVN ## 3130 ztest failure: Assertion failed:
## SVN ##        0 == dmu_objset_destroy(name, B_FALSE) (0x0 == 0x10)
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/1862
## SVN ##   https://www.illumos.org/issues/3112
## SVN ##   https://www.illumos.org/issues/3122
## SVN ##   https://www.illumos.org/issues/3129
## SVN ##   https://www.illumos.org/issues/3130
## SVN ##
## SVN ## MFC r240153 (gjb) [3]:
## SVN ## Typo fix and minor word swap.
## SVN ##
## SVN ## MFC r240303:
## SVN ## Add assfail() and assfail3() to the opensolaris module.
## SVN ## Remove obsoleted intermediate cddl/compat/opensolaris/sys/debug.h.
## SVN ##
## SVN ## MFC r240345 (avg):
## SVN ## zfs: fix sa_modify_attrs handling of variable-sized attributes
## SVN ##
## SVN ## - skip length_idx index for a replaced variable-sized attribute
## SVN ## - skip length_idx index for a removed variable-sized attribute
## SVN ## - also re-arranged code to make sure that length_idx is always
## SVN ##   incremented for variable-sized attributes
## SVN ## - additionally add an assertion that the number of actually produced
## SVN ##   attributes is the same as the expected number of resulting
## SVN ##   attributes
## SVN ##
## SVN ## MFC r240415:
## SVN ## Merge recent zfs vendor changes, sync code and adjust userland DEBUG.
## SVN ##
## SVN ## Illumos issued covered:
## SVN ## 1884 Empty "used" field for zfs *space commands
## SVN ## 3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument
## SVN ##      is zero
## SVN ## 3028 zfs {group,user}space -n prints (null) instead of numeric GID/UID
## SVN ## 3048 zfs {user,group}space [-s|-S] is broken
## SVN ## 3049 zfs {user,group}space -t doesn't really filter the results
## SVN ## 3060 zfs {user,group}space -H output isn't tab-delimited
## SVN ## 3061 zfs {user,group}space -o doesn't use specified fields order
## SVN ## 3064 usr/src/cmd/zpool/zpool_main.c misspells "successful"
## SVN ## 3093 zfs {user,group}space's -i is noop
## SVN ## 3098 zfs userspace/groupspace fail without saying why when run as non-root
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/ + [issue_id]
## SVN ##
## SVN ## MFC r240955 (partial):
## SVN ## Merge recent vendor changes in ZFS.
## SVN ##
## SVN ## Illumos issued covered:
## SVN ## 3139 zdb dies when it tries to determine path of unlinked file
## SVN ## 3189 kernel panic in ZFS test suite during hotspare_onoffline_004_neg
## SVN ## 3208 moving zpool cross-endian results in incorrect user/group accounting
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/ + [issue_id]
## SVN ##
## SVN ## MFC r241655:
## SVN ## Add missing initialization for do_prefix.
## SVN ## Corrects porting error in r238391
## SVN ##
## SVN ## Vendor issue and changeset reference:
## SVN ## 2883 changing "canmount" property to "on" should not always remount dataset
## SVN ## https://www.illumos.org/issues/2883
## SVN ## Changeset 13743:95aba6e49b9f
## SVN ##
## SVN ## MFC r243014:
## SVN ## Move zpool-features manual page from section 5 to section 7
## SVN ## and fix references
## SVN ##
## SVN ## Reported by:	pluknet
## SVN ##
## SVN ## MFC r243505:
## SVN ## Illumos 13886:e3261d03efbf
## SVN ##
## SVN ## 3349 zpool upgrade -V bumps the on disk version number, but leaves
## SVN ##      the in core version
## SVN ##
## SVN ## References:
## SVN ##   https://www.illumos.org/issues/3349
## SVN ##
## SVN ## MFC r243506:
## SVN ## zfs sha256 checksum is missing in zfs.8 manpage
## SVN ##
## SVN ## PR:	kern/167905 [1], kern/170912 [2], kern/170914 [2], doc/171356 [3]
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
#$FreeBSD: stable/8/rescue/rescue/Makefile 243717 2012-11-30 22:38:42Z mm $
d144 1
a144 1
CRUNCH_LIBS+= -lavl -lzfs -lnvpair -lpthread -luutil -lumem
@


1.71.2.7
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/246750
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
#$FreeBSD: stable/8/rescue/rescue/Makefile 246750 2013-02-13 06:46:53Z bapt $
d144 1
a144 1
CRUNCH_LIBS+= -lavl -ljail -lzfs -lnvpair -lpthread -luutil -lumem
@


1.71.2.8
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251757
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
#$FreeBSD: stable/8/rescue/rescue/Makefile 251757 2013-06-14 19:26:32Z mm $
d144 1
a144 1
CRUNCH_LIBS+= -lavl -ljail -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
@


1.71.2.4.2.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.71.2.4.2.2
log
@Switch importer
@
text
@d1 1
a1 1
#$FreeBSD: releng/8.3/rescue/rescue/Makefile 231272 2012-02-09 13:23:44Z bapt $
@


1.71.2.2.4.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.71.2.2.2.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.71.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.70
log
@SVN rev 192617 on 2009-05-23 00:47:23Z by kmacy

Add zfs/zpool to rescue programs

PR:		bin/125878
Submitted by:	nork@@
MFC after:	3 days
@
text
@d146 1
a146 1
CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv -lmd -lreadline -lsbuf -lufs -lz
@


1.69
log
@SVN rev 191239 on 2009-04-18 06:01:55Z by kientzle

Libarchive is sprouting dependencies on libmd and libcrypto.
Because crunchgen drops any repeated library (keeping only the
first), the -lcrypto reference must be moved to after -larchive,
not merely duplicated.

I'm considering changing crunchgen's handling of duplicate
libraries, but that's a rather more delicate issue.
@
text
@d75 1
a75 1
CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -lm -ltermcap -lutil
d131 4
d143 3
d183 4
d232 2
@


1.68
log
@SVN rev 191227 on 2009-04-17 22:20:44Z by kientzle

*** empty log message ***
@
text
@a75 3
.if ${MK_OPENSSL} != "no"
CRUNCH_LIBS+= -lcrypto
.endif
d201 4
a204 1
CRUNCH_LIBS+= -larchive
@


1.67
log
@SVN rev 190751 on 2009-04-05 22:08:18Z by ed

Remove if_ppp(4) and if_sl(4).

Not only did these two drivers depend on IFF_NEEDSGIANT, they were
broken 7 months ago during the MPSAFE TTY import. if_ppp(4) has been
replaced by ppp(8). There is no replacement for if_sl(4).

If we see regressions in for example the ports tree, we should just use
__FreeBSD_version 800045 to check whether if_ppp(4) and if_sl(4) are
present. Version 800045 is used to denote the import of MPSAFE TTY.

Discussed with: rwatson, but also rwatson's IFF_NEEDSGIANT emails on the
                lists.
@
text
@d121 1
a121 1
	spppcontrol swapon sysctl tunefs umount 
d191 1
a191 1
# 
d214 1
a214 1
# 
d306 1
a306 1
.for _tool in bin/csh bin/sh 
@


1.66
log
@SVN rev 188895 on 2009-02-21 15:04:31Z by ru

Fix build when WITH_SSP is set explicitly.

Submitted by:	Jeremie Le Hen
@
text
@d121 1
a121 1
	slattach spppcontrol startslip swapon sysctl tunefs umount 
@


1.65
log
@SVN rev 183007 on 2008-09-13 19:56:37Z by imp

Take a moment to tidy some white space while I'm here.  No functional
changes for this commit.
@
text
@a4 1
WITHOUT_SSP=
d7 1
@


1.64
log
@SVN rev 183006 on 2008-09-13 19:54:15Z by imp

We don't need pax and tar.  These days tar is a strict superset of
pax.  Per discssuion on arch@@ eliminate it.
@
text
@d74 1
a74 2
	 pkill ps pwd 	\
	 realpath rm rmdir setfacl sh stty sync test
d111 2
a112 2
CRUNCH_PROGS_sbin= atacontrol badsect 		\
	camcontrol ccdconfig clri devfs dmesg dump			\
d115 6
a120 6
	kldconfig kldload kldstat kldunload ldconfig 			\
	md5 mdconfig mdmfs mknod mount mount_cd9660	\
	mount_msdosfs mount_nfs mount_ntfs mount_nullfs			\
	mount_udf mount_unionfs newfs		\
	newfs_msdos nos-tun ping reboot			\
	restore rcorder route routed rtquery rtsol savecore 		\
@


1.63
log
@SVN rev 182543 on 2008-08-31 14:27:59Z by yar

pkill(1) first appeared in /usr/bin, but later it was moved to /bin
for the convenience of rc.d.  Now it has happily lived there for quite
a while.  So move the pkill(1) source files from usr.bin to bin, too.

Approved by:	gad
@
text
@d74 1
a74 1
	 pax pkill ps pwd 	\
@


1.62
log
@SVN rev 180012 on 2008-06-25 21:33:28Z by ru

Enable GCC stack protection (aka Propolice) for userland:
- It is opt-out for now so as to give it maximum testing, but it may be
  turned opt-in for stable branches depending on the consensus.  You
  can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
  It is harmless to steal the knob as SSP symbols have been provided
  by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
  (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
  libc will be automatically downgraded to -fstack-protector because it
  breaks rtld otherwise.
- This option is unavailable on ia64.

Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.

Submitted by:	Jeremie Le Hen <jeremie@@le-hen.org>
@
text
@d73 2
a74 1
	 ed expr getfacl hostname kenv kill ln ls mkdir mv pax ps pwd 	\
a88 3

CRUNCH_PROGS_bin+= pkill
CRUNCH_SRCDIR_pkill= ${.CURDIR}/../../usr.bin/pkill
@


1.61
log
@Remove netatm from HEAD as it is not MPSAFE and relies on the now removed
NET_NEEDS_GIANT.  netatm has been disconnected from the build for ten
months in HEAD/RELENG_7.  Specifics:

- netatm include files
- netatm command line management tools
- libatm
- ATM parts in rescue and sysinstall
- sample configuration files and documents
- kernel support as a module or in NOTES
- netgraph wrapper nodes for netatm
- ctags data for netatm.
- netatm-specific device drivers.

MFC after:	3 weeks
Reviewed by:	bz
Discussed with:	bms, bz, harti
@
text
@d5 1
@


1.60
log
@Adding glabel alias killed gpart alias; fix it.
@
text
@a126 3
# Disabled in 7.0 as netatm is not MPSAFE.
#CRUNCH_PROGS_sbin+= atm fore_dnld ilmid
#CRUNCH_LIBS+= -latm
@


1.59
log
@Add an alias for glabel(8).
@
text
@d188 1
a188 2
CRUNCH_ALIAS_geom= gpart
CRUNCH_ALIAS_geom= glabel
@


1.58
log
@o  Build geom for all platforms.
o  Don't build bsdlabel for ia64.
o  Don't build fdisk and gpt for ia64.
@
text
@d189 1
@


1.57
log
@Add some essential tools to rescue(8) in order to make it
a versatile emergency tool:

o sed(1) as a multi-purpose text filter -- can do grep's job and much more.
o head(1), tail(1), and tee(1) as idiomatic text filters.
o mt(1) to control tape drives (PR misc/98383).
o chown(8) aka chgrp(8) to complement the ch* subset.
o pkill(1) aka pgrep(1) to control running processes easily and thus to be
  able to recover from a serious problem or a fatal typo in an otherwise live
  system w/o a reboot.  (It also deserves adding to rescue(8) for its having
  triggered a latent bug in crunchgen(1), but we had better add a regression
  test for that. :-)

The resulting change in rescue(8) size has the following order of magnitude
on i386: 3787656 - 3727872 = 59784, i.e. just a tad.

Discussed on:   -hackers (I seem to have wearied all opponents :-)
PR:             misc/98383
@
text
@d113 1
a113 1
CRUNCH_PROGS_sbin= atacontrol badsect bsdlabel		\
d116 1
a116 1
	fsirand gbde ifconfig init 				\
d150 1
a150 1
CRUNCH_PROGS_sbin+= sconfig fdisk
d161 1
d166 1
a166 1
CRUNCH_PROGS_sbin+= mca gpt fdisk
d170 1
a170 1
CRUNCH_PROGS_sbin+= sunlabel
d174 1
a174 1
CRUNCH_PROGS_sbin+= fdisk
d188 1
@


1.56
log
@Disconnect netatm from the build as it is not MPSAFE and relies on
NET_NEEDS_GIANT, which will shortly be removed.  This is done in a
away that it may be easily reattached to the build before 7.1 if
appropriate locking is added.  Specifics:

- Don't install netatm include files
- Disconnect netatm command line management tools
- Don't build libatm
- Don't include ATM parts in rescue or sysinstall
- Don't install sample configuration files and documents
- Don't build kernel support as a module or in NOTES
- Don't build netgraph wrapper nodes for netatm

This removes the last remaining consumer of NET_NEEDS_GIANT.

Reviewed by:	harti
Discussed with:	bz, bms
Approved by:	re (kensmith)
@
text
@d88 4
d197 2
d220 4
a223 1
CRUNCH_PROGS_usr.sbin+= chroot
@


1.56.2.1
log
@SVN rev 182526 on 2008-08-31 10:15:43Z by rwatson

Merge r179308 from head to stable/7:

  Remove netatm from HEAD as it is not MPSAFE and relies on the now removed
  NET_NEEDS_GIANT.  netatm has been disconnected from the build for ten
  months in HEAD/RELENG_7.  Specifics:

  - netatm include files
  - netatm command line management tools
  - libatm
  - ATM parts in rescue and sysinstall
  - sample configuration files and documents
  - kernel support as a module or in NOTES
  - netgraph wrapper nodes for netatm
  - ctags data for netatm.
  - netatm-specific device drivers.

  Reviewed by:    bz
  Discussed with: bms, bz, harti

MFC discussed with:	des, peter
@
text
@d123 3
@


1.56.2.2
log
@SVN rev 193003 on 2009-05-28 23:05:17Z by kmacy

MFC 192617
add zfs and zpool to /rescue
@
text
@d74 1
a74 1
CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil
a131 4
.if ${MK_ZFS} != "no"
CRUNCH_PROGS_sbin+= zfs
CRUNCH_PROGS_sbin+= zpool
.endif
a139 3
.if ${MK_ZFS} != "no"
CRUNCH_LIBS+= -lzfs -lnvpair -luutil -lavl
.endif
a175 4
.if ${MK_ZFS} != "no"
CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs
CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool
.endif
a212 5
CRUNCH_PROGS_usr.sbin+= chown
CRUNCH_ALIAS_chown= chgrp
##################################################################
CRUNCH_LIBS+= -lm

@


1.56.2.3
log
@Switch importer
@
text
@d1 1
a1 1
#$FreeBSD: stable/7/rescue/rescue/Makefile 193003 2009-05-28 23:05:17Z kmacy $
@


1.56.2.2.4.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.56.2.2.4.2
log
@Switch importer
@
text
@d1 1
a1 1
#$FreeBSD: releng/7.4/rescue/rescue/Makefile 193003 2009-05-28 23:05:17Z kmacy $
@


1.56.2.2.2.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.56.2.1.4.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.56.2.1.2.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.55
log
@- Remove UMAP filesystem. It was disconnected from build three years ago,
  and it is seriously broken.

Discussed on:   freebsd-arch@@
Approved by:	re (mux)
@
text
@d122 4
a125 2
CRUNCH_PROGS_sbin+= atm atmconfig fore_dnld ilmid
CRUNCH_LIBS+= -latm
@


1.54
log
@Replace the GNU gzip with a slightly modified NetBSD gzip.  The
NetBSD version is a feature-to-feature re-implementation of GNU
gzip using the freely-redistributable zlib and this version is
expected to be mostly bug-to-bug compatible with the GNU
implementation.

 - Because this is a piece of mature code and we want to make
   changes so it is added directly rather than importing to
   src/contrib.
 - Connect newly added code to src/usr.bin/ and rescue/rescue
   build.
 - Disconnect the GNU gzip code from build for now, they will
   be eventually removed completely.
 - Provide two new src.conf(5) knobs, WITHOUT_BZIP2_SUPPORT and
   WITHOUT_BZIP2.

Tested by:	kris (full exp-7 pointyhat build)
Approved by:	core (importing a 4-clause BSD licensed file)
Approved by:	re (adding new utility during -HEAD code slush)
@
text
@d116 1
a116 1
	mount_udf mount_umapfs mount_unionfs newfs		\
@


1.53
log
@Remove mount_ext2fs.
@
text
@a189 1
CRUNCH_SRCDIRS+= gnu/usr.bin
d191 1
a191 1
CRUNCH_PROGS_gnu/usr.bin+= gzip
@


1.52
log
@Remove references to mount_devfs, mount_fdescfs, mount_linprocfs, mount_procfs.

Reminded by:	ru
@
text
@d114 1
a114 1
	md5 mdconfig mdmfs mknod mount mount_cd9660 mount_ext2fs	\
@


1.51
log
@Remove alpha left-overs.
@
text
@d116 1
a116 1
	mount_std mount_udf mount_umapfs mount_unionfs newfs		\
a180 1
CRUNCH_ALIAS_mount_std= mount_devfs mount_fdescfs mount_linprocfs mount_procfs
@


1.50
log
@Pass -DCRUNCH down to standard targets in individual makefiles.
@
text
@a165 4
.if ${MACHINE_ARCH} == "alpha"
CRUNCH_ALIAS_bsdlabel= disklabel
.endif

@


1.49
log
@*sigh*
Move the -lbsdxml after -lgeom, so that ld doesn't get confused and pretend
he can't find the symbol from libbsdxml needed in libgeom.
This should fix the rescue build breakage.
@
text
@d320 1
a320 1
	    DIRPRFX=${DIRPRFX}${P}/ ${.TARGET}
d324 1
a324 1
	    DIRPRFX=${DIRPRFX}${P}/ ${.TARGET}
d339 1
a339 1
	    DIRPRFX=${DIRPRFX}${P}/ ${.TARGET}
d343 1
a343 1
	    DIRPRFX=${DIRPRFX}${P}/ ${.TARGET}
@


1.48
log
@Extend coverage of the MK_IPX build option to the following:

- <netipx> headers [1]
- IPX library (libipx)
- IPX support in ifconfig(8)
- IPXrouted(8)
- new MK_NCP option

New MK_NCP build option controls:

- <netncp> and <fs/nwfs> headers
- NCP library (libncp)
- ncplist(1) and ncplogin(1)
- mount_nwfs(8)
- ncp and nwfs kernel modules

User knobs: WITHOUT_IPX, WITHOUT_IPX_SUPPORT, WITHOUT_NCP.

[1] <netsmb/netbios.h> unconditionally uses <netipx> headers
so they are still installed.  This needs to be dealt with.
@
text
@d137 1
a137 1
CRUNCH_LIBS+= -lalias -lbsdxml -lcam -lcurses -ldevstat -lipsec
d141 1
a141 1
CRUNCH_LIBS+= -lgeom -lkiconv -lmd -lreadline -lsbuf -lufs -lz
@


1.47
log
@Reimplementation of world/kernel build options.  For details, see:

http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
@
text
@d137 5
a141 2
CRUNCH_LIBS+= -lalias -lbsdxml -lcam -lcurses -ldevstat -lipsec -lipx \
	-lgeom -lkiconv -lmd -lreadline -lsbuf -lufs -lz 
d146 6
a151 2
#CRUNCH_PROGS+= mount_nwfs mount_smbfs
#CRUNCH_LIBS+= -lncp -lsmb
@


1.46
log
@Install nextboot in /rescue as /rescue/nextboot rather than
/rescue/nextboot.sh to match the name in /sbin (/sbin/nextboot).

Reviewed by:	gtetlow
MFC after:	1 week
@
text
@d4 4
d75 1
a75 1
.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
d88 1
a88 1
.if !defined(NO_RCMDS)
d92 1
a92 1
.if !defined(NO_TCSH)
d121 1
a121 1
.if !defined(NO_ATM)
d126 1
a126 1
.if !defined(NO_INET6)
d130 1
a130 1
.if !defined(NO_IPFILTER)
a227 1
NO_MAN=
@


1.45
log
@Fix path to dhclient-script and reconnect to build.
@
text
@d9 1
a9 1
SCRIPTSNAME_nextboot_FIXED= nextboot.sh
@


1.45.2.1
log
@MFC: Install nextboot in /rescue as /rescue/nextboot rather than
/rescue/nextboot.sh to match the name in /sbin.
@
text
@d9 1
a9 1
SCRIPTSNAME_nextboot_FIXED= nextboot
@


1.45.2.2
log
@MFC: Replace gzip(1) with the BSD licensed version found in -HEAD.

Discussed with:	re, so, portmgr (kris)

All bugs are mine.
@
text
@d184 1
d186 1
a186 1
CRUNCH_PROGS_usr.bin+= gzip
@


1.45.2.3
log
@Switch importer
@
text
@d1 1
a1 1
#$FreeBSD: stable/6/rescue/rescue/Makefile 166840 2007-02-20 08:33:32Z delphij $
@


1.45.2.2.4.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.44
log
@Temporarily disconnect dhclient from the build while I import the
OpenBSD version.
@
text
@d14 5
a18 5
#SCRIPTS+= dhclient_FIXED
#SCRIPTSNAME_dhclient_FIXED= dhclient-script
#dhclient_FIXED: ../../contrib/isc-dhcp/client/scripts/freebsd
#	sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET}
#CLEANFILES+= dhclient_FIXED
d177 2
a178 2
#CRUNCH_PROGS_sbin+= dhclient
#CRUNCH_BUILDOPTS_dhclient= -DRELEASE_CRUNCH -Dlint
@


1.43
log
@Patches from Ruslam Ermilov to remove NetBSD bits from Makefiles and cleanup
build problems with rescue.
@
text
@d14 5
a18 5
SCRIPTS+= dhclient_FIXED
SCRIPTSNAME_dhclient_FIXED= dhclient-script
dhclient_FIXED: ../../contrib/isc-dhcp/client/scripts/freebsd
	sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET}
CLEANFILES+= dhclient_FIXED
d177 2
a178 2
CRUNCH_PROGS_sbin+= dhclient
CRUNCH_BUILDOPTS_dhclient= -DRELEASE_CRUNCH -Dlint
@


1.42
log
@Run "make obj" before "make build-tools" in the directories used for
building the rescue binary.  This fixes a problem with NO_TCSH, where
the "make obj" stage of buildworld doesn't recurse into bin/csh,
resulting in csh build-tools being put into /usr/src/bin/csh.

Pointed out by:	dougb (on hackers@@)
@
text
@d127 1
a127 1
CRUNCH_PROGS_sbin+= ipf ipfs ipfstat ipmon ipnat
d169 1
@


1.41
log
@Wrap BSD r* commands in NO_RCMDS.
Change NO_RCMDNS to NO_RCMDS and do the switch in bsd.compat.mk.

Discussed with: ru, nectar
@
text
@d295 1
@


1.40
log
@Add chroot.  It can be a real lifesaver, and adds less than 2 kB.
@
text
@d84 1
a84 1
.if !defined(NO_RCMNDS)
@


1.39
log
@Ignoring MAKEFLAGS in rev. 1.15 was a very bad idea.  This causes
wrong share/mk files to be used, which can be fatal with upgrades
or downgrades, e.g., when building RELENG_5 on HEAD.

Reported by:	glebius

For now, just exclude -P from MAKEFLAGS when running crunchgen(1).
(Note that it will still break when run with certain -d options.)

The real solution is to fix make(1) to not print stuff on stdout
when it's not supposed to, e.g., through the -P and -dX options,
and to fix crunchgen(1) to not redirect stderr to stdout when
running make(1).  Once this is implemented, this hack can go.
@
text
@d202 7
@


1.38
log
@Don't call "objs" target in rescue.mk twice.
@
text
@d270 2
a271 1

d274 1
a274 1
	MAKEFLAGS= MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \
@


1.37
log
@Make "===> " prefixes look sane.
@
text
@d277 1
a277 1
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) 
@


1.36
log
@NOINET6 -> NO_INET6
@
text
@d259 4
a262 1
	echo special $(P) buildopts $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET)
d287 1
a287 1
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} DIRPRFX=rescue/${_tool} build-tools
d299 2
a300 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} ${.TARGET}
d303 2
a304 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} ${.TARGET}
d318 2
a319 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} ${.TARGET}
d322 2
a323 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} ${.TARGET}
@


1.35
log
@NOCRYPT -> NO_CRYPT
@
text
@d122 1
a122 1
.if !defined(NOINET6)
@


1.34
log
@NOATM -> NO_ATM
@
text
@d71 1
a71 1
.if !defined(NOCRYPT) && !defined(NO_OPENSSL)
@


1.33
log
@Start the dreaded NOFOO -> NO_FOO conversion.

OK'ed by:	core
@
text
@d117 1
a117 1
.if !defined(NOATM)
@


1.32
log
@Add missing dependencies of $(OUTPUTS) on source makefiles.

Caught by:	make -DNOCLEAN buildworld
@
text
@d216 1
a216 1
NOMAN=
@


1.31
log
@Replace GNU tar with BSD tar.
@
text
@d223 5
d270 1
a270 1
	MAKEFLAGS= MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -q -m $(OUTMK) \
@


1.30
log
@Remove references to NO_VINUM
@
text
@d192 3
a194 1
CRUNCH_PROGS_gnu/usr.bin+= tar
@


1.29
log
@For variables that are only checked with defined(), don't provide
any fake value.
@
text
@a125 4
.if !defined(NO_VINUM)
CRUNCH_PROGS_sbin+= vinum
.endif

@


1.28
log
@As with the non-rescue version don't build fore_dnld when NOATM is defined.
@
text
@d218 1
a218 1
NOMAN=	true
@


1.28.2.1
log
@MFC: For variables that are only checked with defined(), don't provide
     any fake value.
@
text
@d218 1
a218 1
NOMAN=
@


1.28.2.1.2.1
log
@MFC revision 1.31: Use bsdtar instead of GNU tar

Approved by:	re (kensmith)
@
text
@d196 1
a196 3
CRUNCH_PROGS_usr.bin+= tar
CRUNCH_LIBS+= -larchive

@


1.28.2.2
log
@MFC revision 1.31: Use bsdtar instead of GNU tar.

Discussed with:	kientzle, kensmith
@
text
@d196 1
a196 3
CRUNCH_PROGS_usr.bin+= tar
CRUNCH_LIBS+= -larchive

@


1.27
log
@Remove dangling raidctl reference
@
text
@d107 1
a107 1
	dumpfs dumpon fore_dnld fsck fsck_ffs fsck_msdosfs fsdb		\
d118 1
a118 1
CRUNCH_PROGS_sbin+= atm atmconfig ilmid
@


1.26
log
@Add id(1) (aka groups(1) aka whoami(1)) since it is used by install.sh.
@
text
@d113 1
a113 1
	newfs_msdos nos-tun ping raidctl reboot			\
@


1.25
log
@Revision 1.7 of this file added information
about the location of each program's source.

This update optimizes the build a bit by giving that
information to crunchgen rather than asking crunchgen
to do a directory search to locate sources.

Approved by: gordon (Mentor)
@
text
@d200 3
@


1.24
log
@Properly spell make binary as ${MAKE}.

This fixes buildworld for systems with old make(1) binaries.

Reported by:	Benjamin Close
@
text
@a237 3
.for D in $(CRUNCH_SRCDIRS)
	echo srcdirs $(.CURDIR)/../../$(D) >>$(.TARGET)
.endfor
d249 2
@


1.23
log
@Remove cxconfig and add sconfig

# maybe we can remove sconfig later from rescue?

Submitted by: Roman Kurakin <rik@@cronyx.com>
Approved by: re@@ <scottl>
@
text
@d269 1
a269 1
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} make -f $(OUTMK) 
d272 1
a272 1
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} make -f $(OUTMK) objs
d279 1
a279 1
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} make DIRPRFX=rescue/${_tool} build-tools
d291 1
a291 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} make ${.TARGET}
d294 1
a294 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} make ${.TARGET}
d302 1
a302 1
		MAKEOBJDIRPREFIX=${CRUNCHOBJS} make -f $(OUTMK) clean;	\
d308 1
a308 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} make ${.TARGET}
d311 1
a311 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} make ${.TARGET}
@


1.23.2.1
log
@MFC: 1.24: Hopefully fix the upgrade path from old 4.x and 5.x systems.

Approved by:	re (jhb)
@
text
@d269 1
a269 1
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) 
d272 1
a272 1
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs
d279 1
a279 1
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} DIRPRFX=rescue/${_tool} build-tools
d291 1
a291 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} ${.TARGET}
d294 1
a294 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} ${.TARGET}
d302 1
a302 1
		MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean;	\
d308 1
a308 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} ${.TARGET}
d311 1
a311 1
	    MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} ${.TARGET}
@


1.22
log
@Reconnect ipfstat, ipnat, and ipftest to the build now that if_xname
support is enabled.

Approved by:	re (scottl)
@
text
@d141 1
a141 1
CRUNCH_PROGS_sbin+= cxconfig fdisk
@


1.21
log
@Alternate version of rev 1.20.
Comment out rather than totally remove the ipfilter pieces that we need
reconnected some day.  This is now only ipnat as it is for configuring NAT.
ipfstat is meant for reporting statistics/filter lists.  For /rescue it is
enough to configure lists but not view the installed ones.
@
text
@d131 1
a131 1
CRUNCH_PROGS_sbin+= ipf ipfs ipmon # ipnat
@


1.20
log
@Temporarily disable ipfstat and ipnat in /rescue to fix world.
@
text
@d131 1
a131 1
CRUNCH_PROGS_sbin+= ipf ipfs ipmon
@


1.19
log
@No need to check for the directory, fols are assumed to have all the
correct sources. Only check the crypto macros.
@
text
@d131 1
a131 1
CRUNCH_PROGS_sbin+= ipf ipfs ipfstat ipmon ipnat
@


1.18
log
@- Support for multibyte charsets in LIBICONV.
- CD9660_ICONV, NTFS_ICONV and MSDOSFS_ICONV kernel options
(with corresponding modules).
- kiconv(3) for loadable charset conversion tables support.

Submitted by:	Ryuichiro Imura <imura@@ryu16.org>
@
text
@d71 1
a71 1
.if exists(${.CURDIR}/../../crypto) && !defined(NOCRYPT) && !defined(NO_OPENSSL)
@


1.17
log
@Teach rescue about NOATM, NO_VINUM and NOINET6
@
text
@d138 1
a138 1
	-lgeom -lmd -lreadline -lsbuf -lufs -lz 
@


1.16
log
@Build the atmconfig utility into rescue.
@
text
@d105 1
a105 1
CRUNCH_PROGS_sbin= atm atmconfig atacontrol badsect bsdlabel		\
d108 1
a108 1
	fsirand gbde ifconfig ilmid init 				\
d113 1
a113 1
	newfs_msdos nos-tun ping ping6 raidctl reboot			\
d115 14
a128 1
	slattach spppcontrol startslip swapon sysctl tunefs umount vinum
d137 1
a137 1
CRUNCH_LIBS+= -lalias -latm -lbsdxml -lcam -lcurses -ldevstat -lipsec -lipx \
@


1.15
log
@When using crunchgen, blow away MAKEFLAGS. This fixes make -j <#> -P
from passing the -P flag to crunchgen which seems to confuse crunchgen
horribly. This is the preferable solution to modifing crunchgen to
unset the MAKEFLAGS environment variable.

Submitted by:	gad@@
@
text
@d105 2
a106 2
CRUNCH_PROGS_sbin= atm atacontrol badsect bsdlabel camcontrol 		\
	ccdconfig clri devfs dmesg dump					\
d156 1
@


1.14
log
@Fix rescue build using -j. The problem appears to be make not being able
to find the source when the object was specified as <directory>/foo.o.

The fix makes the build go through a make objs before compiling the rest
of the crunchgen. This ensures that the dhclient bits are built in the
correct place where they are picked up for the final compile of rescue.

I'd like to thank dwhite@@ and gad@@ for helping me track down the problem.

Fast testing box provided by:	phk@@ (thanks)
@
text
@d251 2
a252 2
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -q -m $(OUTMK) -c $(OUTC) \
	    $(CONF)
@


1.13
log
@Missed one, remove one more.
@
text
@d249 1
d254 1
a254 1
$(PROG): $(OUTPUTS)
d257 1
a257 1
objs:
@


1.12
log
@Trim /rescue.

Discussed on:	freebsd-arch@@
@
text
@d108 1
a108 1
	fsirand gbde ifconfig ilmid init ip6fw 				\
@


1.11
log
@Obey NOCRYPT

Submitted by:	Skip Ford <skip.ford@@verizon.net>
@
text
@d67 1
a67 1
CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df domainname echo 	\
d69 1
a69 1
	 realpath rm rmdir setfacl sh sleep stty sync test
d101 1
a101 1
# Note that mdmfs and shutdown have their own private 'pathnames.h'
d105 2
a106 2
CRUNCH_PROGS_sbin= atm adjkerntz atacontrol badsect bsdlabel camcontrol \
	ccdconfig clri comcontrol conscontrol devfs dmesg dump		\
d108 2
a109 2
	fsirand gbde growfs ifconfig ilmid init ip6fw 			\
	ipfw kldconfig kldload kldstat kldunload ldconfig 		\
d112 3
a114 3
	mount_std mount_udf mount_umapfs mount_unionfs natd newfs	\
	newfs_msdos nfsiod nos-tun ping ping6 quotacheck raidctl reboot	\
	restore rcorder route routed rtquery rtsol savecore shutdown	\
a173 2

CRUNCH_PROGS_usr.bin+= wall
@


1.10
log
@NO_TCSH would be set in /etc/make.conf, not here.  Also obey NO_IPFILTER.
@
text
@d70 4
a73 1
CRUNCH_LIBS+= -lcrypt -lcrypto -ledit -lkvm -ll -lm -ltermcap -lutil
@


1.9
log
@consistify the style some
@
text
@a6 3
# Uncomment to exclude tcsh
#NO_TCSH=1

d105 2
a106 2
	fsirand gbde growfs ifconfig ilmid init ip6fw ipf ipfs ipfstat	\
	ipfw ipmon ipnat kldconfig kldload kldstat kldunload ldconfig 	\
d113 4
@


1.8
log
@Remove the commented out 'rmail' before someone gets a really bad idea.
@
text
@d5 1
a5 1
BINDIR?= /rescue
d69 2
a70 2
CRUNCH_SRCDIRS+=bin
CRUNCH_PROGS_bin=cat chflags chio chmod cp date dd df domainname echo 	\
d73 1
a73 1
CRUNCH_LIBS+=-lcrypt -lcrypto -ledit -lkvm -ll -lm -ltermcap -lutil
d79 1
a79 1
CRUNCH_SUPPRESS_LINK_-sh=1
d91 2
a92 2
CRUNCH_SUPPRESS_LINK_-csh=1
CRUNCH_SUPPRESS_LINK_-tcsh=1
d104 2
a105 2
CRUNCH_SRCDIRS+=sbin
CRUNCH_PROGS_sbin=atm adjkerntz atacontrol badsect bsdlabel camcontrol 	\
d120 1
a120 1
CRUNCH_LIBS+=-lalias -latm -lbsdxml -lcam -lcurses -ldevstat -lipsec -lipx \
d131 1
a131 1
CRUNCH_SRCDIR_fdisk=$(.CURDIR)/../../sbin/fdisk_pc98
d151 4
a154 4
CRUNCH_SRCDIR_atm=$(.CURDIR)/../../sbin/atm/atm
CRUNCH_SRCDIR_fore_dnld=$(.CURDIR)/../../sbin/atm/fore_dnld
CRUNCH_SRCDIR_ilmid=$(.CURDIR)/../../sbin/atm/ilmid
CRUNCH_SRCDIR_rtquery=$(.CURDIR)/../../sbin/routed/rtquery
d156 1
a156 1
CRUNCH_ALIAS_restore=rrestore
d158 1
a158 1
CRUNCH_ALIAS_fsck_ffs=fsck_4.2bsd fsck_ufs
d162 2
a163 2
CRUNCH_PROGS_sbin+=dhclient
CRUNCH_BUILDOPTS_dhclient=-DRELEASE_CRUNCH -Dlint
d168 2
a169 2
CRUNCH_SRCDIRS+=usr.bin
CRUNCH_SRCDIRS+=gnu/usr.bin
d171 1
a171 1
CRUNCH_PROGS_usr.bin+=wall
d173 2
a174 2
CRUNCH_PROGS_gnu/usr.bin+=gzip
CRUNCH_ALIAS_gzip=gunzip gzcat zcat
d176 3
a178 3
CRUNCH_PROGS_usr.bin+=bzip2
CRUNCH_ALIAS_bzip2=bunzip2 bzcat
CRUNCH_LIBS+=-lbz2
d180 3
a182 3
CRUNCH_PROGS_gnu/usr.bin+=tar
CRUNCH_PROGS_usr.bin+=vi
CRUNCH_ALIAS_vi=ex
d191 1
a191 1
OUTPUTS= $(OUTMK) $(OUTC) $(PROG).cache
d194 1
a194 1
CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
d196 1
a196 1
CANONICALOBJDIR:=/usr/obj${.CURDIR}
d207 1
a207 1
LINKS += $(BINDIR)/$(PROG) $(BINDIR)/$(P)
d211 1
a211 1
LINKS += $(BINDIR)/$(PROG) $(BINDIR)/$(A)
d248 2
a249 1
	MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -q -m $(OUTMK) -c $(OUTC) $(CONF)
d274 1
a274 1
	MAKEOBJDIRPREFIX=${CANONICALOBJDIR} make ${.TARGET}
d277 1
a277 1
	MAKEOBJDIRPREFIX=${CANONICALOBJDIR} make ${.TARGET}
d284 1
a284 1
	if [ -e ${.OBJDIR}/$(OUTMK) ]; then		\
d291 1
a291 1
	MAKEOBJDIRPREFIX=${CANONICALOBJDIR} make ${.TARGET}
d294 1
a294 1
	MAKEOBJDIRPREFIX=${CANONICALOBJDIR} make ${.TARGET}
@


1.7
log
@Depessimize rescue build by only clean'ing and obj'ing the directories we
care about, not a full usr.bin tree. This should reduce buildworld times
pretty drastically.

Requested by:	lots of people
@
text
@a94 3
#Is rmail of any use at all here?  I think not.
#CRUNCH_PROGS_bin+= rmail  

@


1.6
log
@Turn rescue back on, conditional to NORESCUE. We seem to be split on
using underscores or not, so I just randomly picked a style. I think
I have the logic correct, but if someone wants to give it a once over
that would be good.

Tim submitted a patch to fix the cross-building issues which I tested
with a tinderbox run for sparc64.

Submitted by:	Tim Kientzle <kientzle@@acm.org>
@
text
@d69 3
a71 3
CRUNCH_SRCDIRS+=$(.CURDIR)/../../bin $(.CURDIR)/../../usr.bin
CRUNCH_PROGS=cat chflags chio chmod cp date dd df domainname echo ed	\
	 expr getfacl hostname kenv kill ln ls mkdir mv pax ps pwd 	\
d85 1
a85 1
CRUNCH_PROGS+= rcp
d89 1
a89 1
CRUNCH_PROGS+= csh
d96 1
a96 1
#CRUNCH_PROGS+= rmail  
d107 2
a108 2
CRUNCH_SRCDIRS+=$(.CURDIR)/../../sbin
CRUNCH_PROGS+=atm adjkerntz atacontrol badsect bsdlabel camcontrol 	\
d127 1
a127 1
CRUNCH_PROGS+= cxconfig fdisk
d138 1
a138 1
CRUNCH_PROGS+= mca gpt fdisk
d142 1
a142 1
CRUNCH_PROGS+= sunlabel
d150 1
a150 1
CRUNCH_PROGS+= fdisk
d165 1
a165 1
CRUNCH_PROGS+=dhclient
d171 2
a172 2
CRUNCH_SRCDIRS+=$(.CURDIR)/../../usr.bin
CRUNCH_SRCDIRS+=$(.CURDIR)/../../gnu/usr.bin
d174 1
a174 1
CRUNCH_PROGS+=wall
d176 1
a176 1
CRUNCH_PROGS+=gzip
d179 1
a179 1
CRUNCH_PROGS+=bzip2
d183 2
a184 2
CRUNCH_PROGS+=tar
CRUNCH_PROGS+=vi
d207 2
a208 1
.for P in $(CRUNCH_PROGS)
d218 1
d226 1
a226 1
	echo srcdirs $(D) >>$(.TARGET)
d234 2
a235 1
.for P in $(CRUNCH_PROGS)
d247 1
d263 1
a263 1
	cd ${.CURDIR}/../../${_tool}; \
d273 9
a281 1
	cd ${D} && MAKEOBJDIRPREFIX=${CANONICALOBJDIR} make ${.TARGET}
d289 10
a298 2
.for D in $(CRUNCH_SRCDIRS) $(EXTRA_SRCDIRS)
	cd ${D} && MAKEOBJDIRPREFIX=${CRUNCHOBJS} make clean
@


1.5
log
@Remove mount_portalfs, it's just wrong in this context.
@
text
@d50 2
a248 2
# -m here forces make to treat the bsd.prog.mk and bsd.lib.mk in
# this directory as overrides for the standard shared ones.
d254 8
@


1.4
log
@Don't build mount_nwfs or mount_smbfs in rescue.
Build fdisk_pc98 on pc98 arch, not fdisk.
Don't alias disklabel on pc98, ia64.
Don't build fdisk on sparc64, alpha.

Pointed out by:	tmm@@
Submitted by:	Tim Kientzle <kientzle@@acm.org>
@
text
@d112 1
a112 1
	mount_msdosfs mount_nfs mount_ntfs mount_nullfs	mount_portalfs	\
@


1.3
log
@Fix fdisk naming issues on pc98 and other platforms.
Fix disklabel, bsdlabel, and sunlabel on various platforms.

Noticed by:	tmm@@
Submitted by:	Tim Kientzle <kientzle@@acm.org>
@
text
@d122 1
a122 1
	-lgeom -lmd -lncp -lreadline -lsbuf -lsmb -lufs -lz 
d125 1
a125 1
CRUNCH_PROGS+= cxconfig fdisk mount_nwfs mount_smbfs
d127 2
d132 1
a132 3
CRUNCH_PROGS+= fdisk_pc98
CRUNCH_ALIAS_bsdlabel= disklabel
CRUNCH_ALIAS_fdisk_pc98= fdisk
a136 1
CRUNCH_ALIAS_bsdlabel= disklabel
d140 1
a140 1
CRUNCH_PROGS+= fdisk sunlabel
a143 1
CRUNCH_PROGS+= fdisk
@


1.2
log
@Fix typo sparc -> sparc64

Submitted by:	tmm@@
@
text
@d106 3
a108 3
CRUNCH_PROGS+=atm adjkerntz atacontrol badsect camcontrol ccdconfig	\
	clri comcontrol conscontrol devfs disklabel dmesg dump		\
	dumpfs dumpon fdisk fore_dnld fsck fsck_ffs fsck_msdosfs fsdb	\
d125 2
a126 1
CRUNCH_PROGS+= cxconfig mount_nwfs mount_smbfs
d131 2
d136 2
a137 1
CRUNCH_PROGS+= mca gpt
d141 1
d145 7
@


1.1
log
@Add /rescue bits. This basically encompasses all of bin and sbin along
with a couple of bits from usr.bin in a crunchgen'd binary.

Submitted by:	Tim Kientzle <kientzle@@acm.org>
@
text
@d136 1
a136 1
.if ${MACHINE_ARCH} == "sparc"
@

