head	1.34;
access;
symbols
	netbsd-11-0-RC4:1.34
	netbsd-11-0-RC3:1.34
	netbsd-11-0-RC2:1.34
	netbsd-11-0-RC1:1.34
	perseant-exfatfs-base-20250801:1.34
	netbsd-11:1.34.0.4
	netbsd-11-base:1.34
	netbsd-10-1-RELEASE:1.32
	perseant-exfatfs-base-20240630:1.34
	perseant-exfatfs:1.34.0.2
	perseant-exfatfs-base:1.34
	netbsd-8-3-RELEASE:1.31
	netbsd-9-4-RELEASE:1.31
	netbsd-10-0-RELEASE:1.32
	netbsd-10-0-RC6:1.32
	netbsd-10-0-RC5:1.32
	netbsd-10-0-RC4:1.32
	netbsd-10-0-RC3:1.32
	netbsd-10-0-RC2:1.32
	netbsd-10-0-RC1:1.32
	netbsd-10:1.32.0.2
	netbsd-10-base:1.32
	netbsd-9-3-RELEASE:1.31
	cjep_sun2x-base1:1.31
	cjep_sun2x:1.31.0.56
	cjep_sun2x-base:1.31
	cjep_staticlib_x-base1:1.31
	netbsd-9-2-RELEASE:1.31
	cjep_staticlib_x:1.31.0.54
	cjep_staticlib_x-base:1.31
	netbsd-9-1-RELEASE:1.31
	phil-wifi-20200421:1.31
	phil-wifi-20200411:1.31
	is-mlppp:1.31.0.52
	is-mlppp-base:1.31
	phil-wifi-20200406:1.31
	netbsd-8-2-RELEASE:1.31
	netbsd-9-0-RELEASE:1.31
	netbsd-9-0-RC2:1.31
	netbsd-9-0-RC1:1.31
	phil-wifi-20191119:1.31
	netbsd-9:1.31.0.50
	netbsd-9-base:1.31
	phil-wifi-20190609:1.31
	netbsd-8-1-RELEASE:1.31
	netbsd-8-1-RC1:1.31
	pgoyette-compat-merge-20190127:1.31
	pgoyette-compat-20190127:1.31
	pgoyette-compat-20190118:1.31
	pgoyette-compat-1226:1.31
	pgoyette-compat-1126:1.31
	pgoyette-compat-1020:1.31
	pgoyette-compat-0930:1.31
	pgoyette-compat-0906:1.31
	netbsd-7-2-RELEASE:1.31
	pgoyette-compat-0728:1.31
	netbsd-8-0-RELEASE:1.31
	phil-wifi:1.31.0.48
	phil-wifi-base:1.31
	pgoyette-compat-0625:1.31
	netbsd-8-0-RC2:1.31
	pgoyette-compat-0521:1.31
	pgoyette-compat-0502:1.31
	pgoyette-compat-0422:1.31
	netbsd-8-0-RC1:1.31
	pgoyette-compat-0415:1.31
	pgoyette-compat-0407:1.31
	pgoyette-compat-0330:1.31
	pgoyette-compat-0322:1.31
	pgoyette-compat-0315:1.31
	netbsd-7-1-2-RELEASE:1.31
	pgoyette-compat:1.31.0.46
	pgoyette-compat-base:1.31
	netbsd-7-1-1-RELEASE:1.31
	matt-nb8-mediatek:1.31.0.44
	matt-nb8-mediatek-base:1.31
	perseant-stdc-iso10646:1.31.0.42
	perseant-stdc-iso10646-base:1.31
	netbsd-8:1.31.0.40
	netbsd-8-base:1.31
	prg-localcount2-base3:1.31
	prg-localcount2-base2:1.31
	prg-localcount2-base1:1.31
	prg-localcount2:1.31.0.38
	prg-localcount2-base:1.31
	pgoyette-localcount-20170426:1.31
	bouyer-socketcan-base1:1.31
	pgoyette-localcount-20170320:1.31
	netbsd-7-1:1.31.0.36
	netbsd-7-1-RELEASE:1.31
	netbsd-7-1-RC2:1.31
	netbsd-7-nhusb-base-20170116:1.31
	bouyer-socketcan:1.31.0.34
	bouyer-socketcan-base:1.31
	pgoyette-localcount-20170107:1.31
	netbsd-7-1-RC1:1.31
	pgoyette-localcount-20161104:1.31
	netbsd-7-0-2-RELEASE:1.31
	localcount-20160914:1.31
	netbsd-7-nhusb:1.31.0.32
	netbsd-7-nhusb-base:1.31
	pgoyette-localcount-20160806:1.31
	pgoyette-localcount-20160726:1.31
	pgoyette-localcount:1.31.0.30
	pgoyette-localcount-base:1.31
	netbsd-7-0-1-RELEASE:1.31
	netbsd-7-0:1.31.0.28
	netbsd-7-0-RELEASE:1.31
	netbsd-7-0-RC3:1.31
	netbsd-7-0-RC2:1.31
	netbsd-7-0-RC1:1.31
	netbsd-5-2-3-RELEASE:1.29
	netbsd-5-1-5-RELEASE:1.29
	netbsd-6-0-6-RELEASE:1.31
	netbsd-6-1-5-RELEASE:1.31
	netbsd-7:1.31.0.26
	netbsd-7-base:1.31
	yamt-pagecache-base9:1.31
	yamt-pagecache-tag8:1.31
	netbsd-6-1-4-RELEASE:1.31
	netbsd-6-0-5-RELEASE:1.31
	tls-earlyentropy:1.31.0.24
	tls-earlyentropy-base:1.31
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.31
	riastradh-drm2-base3:1.31
	netbsd-6-1-3-RELEASE:1.31
	netbsd-6-0-4-RELEASE:1.31
	netbsd-5-2-2-RELEASE:1.29
	netbsd-5-1-4-RELEASE:1.29
	netbsd-6-1-2-RELEASE:1.31
	netbsd-6-0-3-RELEASE:1.31
	netbsd-5-2-1-RELEASE:1.29
	netbsd-5-1-3-RELEASE:1.29
	netbsd-6-1-1-RELEASE:1.31
	riastradh-drm2-base2:1.31
	riastradh-drm2-base1:1.31
	riastradh-drm2:1.31.0.16
	riastradh-drm2-base:1.31
	netbsd-6-1:1.31.0.22
	netbsd-6-0-2-RELEASE:1.31
	netbsd-6-1-RELEASE:1.31
	khorben-n900:1.31.0.20
	netbsd-6-1-RC4:1.31
	netbsd-6-1-RC3:1.31
	agc-symver:1.31.0.18
	agc-symver-base:1.31
	netbsd-6-1-RC2:1.31
	netbsd-6-1-RC1:1.31
	yamt-pagecache-base8:1.31
	netbsd-5-2:1.29.0.40
	netbsd-6-0-1-RELEASE:1.31
	yamt-pagecache-base7:1.31
	netbsd-5-2-RELEASE:1.29
	netbsd-5-2-RC1:1.29
	matt-nb6-plus-nbase:1.31
	yamt-pagecache-base6:1.31
	netbsd-6-0:1.31.0.14
	netbsd-6-0-RELEASE:1.31
	netbsd-6-0-RC2:1.31
	tls-maxphys:1.31.0.12
	tls-maxphys-base:1.31
	matt-nb6-plus:1.31.0.10
	matt-nb6-plus-base:1.31
	netbsd-6-0-RC1:1.31
	yamt-pagecache-base5:1.31
	yamt-pagecache-base4:1.31
	netbsd-6:1.31.0.8
	netbsd-6-base:1.31
	netbsd-5-1-2-RELEASE:1.29
	netbsd-5-1-1-RELEASE:1.29
	yamt-pagecache-base3:1.31
	yamt-pagecache-base2:1.31
	yamt-pagecache:1.31.0.6
	yamt-pagecache-base:1.31
	cherry-xenmp:1.31.0.4
	cherry-xenmp-base:1.31
	bouyer-quota2-nbase:1.31
	bouyer-quota2:1.31.0.2
	bouyer-quota2-base:1.31
	matt-mips64-premerge-20101231:1.31
	matt-nb5-mips64-premerge-20101231:1.29
	matt-nb5-pq3:1.29.0.38
	matt-nb5-pq3-base:1.29
	netbsd-5-1:1.29.0.36
	netbsd-5-1-RELEASE:1.29
	netbsd-5-1-RC4:1.29
	matt-nb5-mips64-k15:1.29
	netbsd-5-1-RC3:1.29
	netbsd-5-1-RC2:1.29
	netbsd-5-1-RC1:1.29
	netbsd-5-0-2-RELEASE:1.29
	matt-nb5-mips64-premerge-20091211:1.29
	matt-premerge-20091211:1.31
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.29
	matt-nb4-mips64-k7-u2a-k9b:1.29
	matt-nb5-mips64-u1-k1-k5:1.29
	matt-nb5-mips64:1.29.0.34
	netbsd-5-0-1-RELEASE:1.29
	jym-xensuspend-nbase:1.29
	netbsd-5-0:1.29.0.32
	netbsd-5-0-RELEASE:1.29
	netbsd-5-0-RC4:1.29
	netbsd-5-0-RC3:1.29
	netbsd-5-0-RC2:1.29
	jym-xensuspend:1.29.0.30
	jym-xensuspend-base:1.29
	netbsd-5-0-RC1:1.29
	netbsd-5:1.29.0.28
	netbsd-5-base:1.29
	matt-mips64-base2:1.29
	matt-mips64:1.29.0.26
	netbsd-4-0-1-RELEASE:1.29
	wrstuden-revivesa-base-3:1.29
	wrstuden-revivesa-base-2:1.29
	wrstuden-fixsa-newbase:1.29
	wrstuden-revivesa-base-1:1.29
	yamt-pf42-base4:1.29
	yamt-pf42-base3:1.29
	hpcarm-cleanup-nbase:1.29
	yamt-pf42-baseX:1.29
	yamt-pf42-base2:1.29
	wrstuden-revivesa:1.29.0.24
	wrstuden-revivesa-base:1.29
	yamt-pf42:1.29.0.22
	yamt-pf42-base:1.29
	mjf-devfs2:1.29.0.20
	mjf-devfs2-base:1.29
	keiichi-mipv6:1.29.0.18
	keiichi-mipv6-base:1.29
	mjf-devfs:1.29.0.16
	mjf-devfs-base:1.29
	matt-armv6-nbase:1.29
	matt-armv6-prevmlocking:1.29
	wrstuden-fixsa-base-1:1.29
	netbsd-4-0:1.29.0.14
	netbsd-4-0-RELEASE:1.29
	cube-autoconf:1.29.0.12
	cube-autoconf-base:1.29
	netbsd-4-0-RC5:1.29
	netbsd-4-0-RC4:1.29
	netbsd-4-0-RC3:1.29
	netbsd-4-0-RC2:1.29
	netbsd-4-0-RC1:1.29
	matt-armv6:1.29.0.10
	matt-armv6-base:1.29
	matt-mips64-base:1.29
	hpcarm-cleanup:1.29.0.8
	hpcarm-cleanup-base:1.29
	netbsd-3-1-1-RELEASE:1.24.2.1
	netbsd-3-0-3-RELEASE:1.24.2.1
	wrstuden-fixsa:1.29.0.6
	wrstuden-fixsa-base:1.29
	abandoned-netbsd-4-base:1.29
	abandoned-netbsd-4:1.29.0.2
	netbsd-3-1:1.24.2.1.0.4
	netbsd-3-1-RELEASE:1.24.2.1
	netbsd-3-0-2-RELEASE:1.24.2.1
	netbsd-3-1-RC4:1.24.2.1
	netbsd-3-1-RC3:1.24.2.1
	netbsd-3-1-RC2:1.24.2.1
	netbsd-3-1-RC1:1.24.2.1
	netbsd-4:1.29.0.4
	netbsd-4-base:1.29
	netbsd-3-0-1-RELEASE:1.24.2.1
	netbsd-3-0:1.24.2.1.0.2
	netbsd-3-0-RELEASE:1.24.2.1
	netbsd-3-0-RC6:1.24.2.1
	netbsd-3-0-RC5:1.24.2.1
	netbsd-3-0-RC4:1.24.2.1
	netbsd-3-0-RC3:1.24.2.1
	netbsd-3-0-RC2:1.24.2.1
	netbsd-3-0-RC1:1.24.2.1
	netbsd-2-0-3-RELEASE:1.23
	netbsd-2-1:1.23.0.6
	netbsd-2-1-RELEASE:1.23
	netbsd-2-1-RC6:1.23
	netbsd-2-1-RC5:1.23
	netbsd-2-1-RC4:1.23
	netbsd-2-1-RC3:1.23
	netbsd-2-1-RC2:1.23
	netbsd-2-1-RC1:1.23
	netbsd-2-0-2-RELEASE:1.23
	netbsd-3:1.24.0.2
	netbsd-3-base:1.24
	netbsd-2-0-1-RELEASE:1.23
	netbsd-2:1.23.0.4
	netbsd-2-base:1.23
	netbsd-2-0-RELEASE:1.23
	netbsd-2-0-RC5:1.23
	netbsd-2-0-RC4:1.23
	netbsd-2-0-RC3:1.23
	netbsd-2-0-RC2:1.23
	netbsd-2-0-RC1:1.23
	netbsd-2-0:1.23.0.2
	netbsd-2-0-base:1.23
	netbsd-1-6-PATCH002-RELEASE:1.10.2.1
	netbsd-1-6-PATCH002:1.10.2.1
	netbsd-1-6-PATCH002-RC4:1.10.2.1
	netbsd-1-6-PATCH002-RC3:1.10.2.1
	netbsd-1-6-PATCH002-RC2:1.10.2.1
	netbsd-1-6-PATCH002-RC1:1.10.2.1
	netbsd-1-6-PATCH001:1.10.2.1
	netbsd-1-6-PATCH001-RELEASE:1.10.2.1
	netbsd-1-6-PATCH001-RC3:1.10.2.1
	netbsd-1-6-PATCH001-RC2:1.10.2.1
	netbsd-1-6-PATCH001-RC1:1.10.2.1
	fvdl_fs64_base:1.16
	netbsd-1-6-RELEASE:1.10.2.1
	netbsd-1-6-RC3:1.10.2.1
	netbsd-1-6-RC2:1.10.2.1
	netbsd-1-6-RC1:1.10.2.1
	netbsd-1-6:1.10.0.2
	netbsd-1-6-base:1.10
	netbsd-1-5-PATCH003:1.2.4.4
	netbsd-1-5-PATCH002:1.2.4.4
	netbsd-1-5-PATCH001:1.2.4.4
	netbsd-1-5-RELEASE:1.2.4.4
	netbsd-1-5-BETA2:1.2.4.4
	netbsd-1-5-BETA:1.2.4.2
	netbsd-1-4-PATCH003:1.1
	netbsd-1-5-ALPHA2:1.2
	netbsd-1-5:1.2.0.4
	netbsd-1-5-base:1.2
	minoura-xpg4dl:1.2.0.2
	minoura-xpg4dl-base:1.2
	netbsd-1-4-PATCH002:1.1
	wrstuden-devbsize-19991221:1.1
	wrstuden-devbsize:1.1.0.6
	wrstuden-devbsize-base:1.1
	comdex-fall-1999:1.1.0.4
	comdex-fall-1999-base:1.1
	netbsd-1-4-PATCH001:1.1
	netbsd-1-4:1.1.0.2
	netbsd-1-4-base:1.1;
locks; strict;
comment	@# @;


1.34
date	2023.11.08.13.02.47;	author christos;	state Exp;
branches;
next	1.33;
commitid	7UaSTN7ng3fa6OLE;

1.33
date	2023.11.08.12.58.04;	author christos;	state Exp;
branches;
next	1.32;
commitid	seK1IAFAa3Kh4OLE;

1.32
date	2022.08.21.07.10.03;	author lukem;	state Exp;
branches;
next	1.31;
commitid	0Ie3kKNxYR5noIQD;

1.31
date	2009.12.05.15.56.25;	author cegger;	state Exp;
branches;
next	1.30;

1.30
date	2009.11.30.16.13.23;	author uebayasi;	state Exp;
branches;
next	1.29;

1.29
date	2006.01.28.19.01.23;	author apb;	state Exp;
branches
	1.29.20.1;
next	1.28;

1.28
date	2006.01.04.13.35.55;	author apb;	state Exp;
branches;
next	1.27;

1.27
date	2006.01.03.18.31.09;	author apb;	state Exp;
branches;
next	1.26;

1.26
date	2006.01.03.16.40.16;	author apb;	state Exp;
branches;
next	1.25;

1.25
date	2005.03.28.03.12.34;	author lukem;	state Exp;
branches;
next	1.24;

1.24
date	2004.07.23.15.11.26;	author erh;	state Exp;
branches
	1.24.2.1;
next	1.23;

1.23
date	2004.01.03.02.38.58;	author lukem;	state Exp;
branches;
next	1.22;

1.22
date	2003.12.29.03.13.25;	author lukem;	state Exp;
branches;
next	1.21;

1.21
date	2003.12.19.22.25.54;	author jmc;	state Exp;
branches;
next	1.20;

1.20
date	2003.12.09.17.57.42;	author matt;	state Exp;
branches;
next	1.19;

1.19
date	2003.11.25.07.19.46;	author dyoung;	state Exp;
branches;
next	1.18;

1.18
date	2003.09.21.19.26.05;	author tron;	state Exp;
branches;
next	1.17;

1.17
date	2003.02.20.11.40.29;	author lukem;	state Exp;
branches;
next	1.16;

1.16
date	2002.11.26.06.22.23;	author lukem;	state Exp;
branches;
next	1.15;

1.15
date	2002.11.25.23.29.54;	author lukem;	state Exp;
branches;
next	1.14;

1.14
date	2002.11.17.03.04.53;	author lukem;	state Exp;
branches;
next	1.13;

1.13
date	2002.11.17.02.59.56;	author lukem;	state Exp;
branches;
next	1.12;

1.12
date	2002.11.17.02.22.11;	author lukem;	state Exp;
branches;
next	1.11;

1.11
date	2002.07.23.09.02.45;	author lukem;	state Exp;
branches;
next	1.10;

1.10
date	2002.04.09.06.07.17;	author tron;	state Exp;
branches
	1.10.2.1;
next	1.9;

1.9
date	2002.04.08.15.39.32;	author tron;	state Exp;
branches;
next	1.8;

1.8
date	2001.01.04.11.15.32;	author itojun;	state Exp;
branches;
next	1.7;

1.7
date	2000.11.18.05.32.00;	author wiz;	state Exp;
branches;
next	1.6;

1.6
date	2000.10.27.13.04.58;	author fvdl;	state Exp;
branches;
next	1.5;

1.5
date	2000.10.05.00.11.44;	author tv;	state Exp;
branches;
next	1.4;

1.4
date	2000.10.01.22.49.05;	author thorpej;	state Exp;
branches;
next	1.3;

1.3
date	2000.08.03.10.41.02;	author ad;	state Exp;
branches;
next	1.2;

1.2
date	2000.01.23.20.31.17;	author jwise;	state Exp;
branches
	1.2.4.1;
next	1.1;

1.1
date	99.06.05.20.17.42;	author bouyer;	state Exp;
branches
	1.1.2.1;
next	;

1.29.20.1
date	2008.10.05.20.10.32;	author mjf;	state dead;
branches;
next	;

1.24.2.1
date	2005.04.06.22.23.22;	author tron;	state Exp;
branches;
next	;

1.10.2.1
date	2002.07.23.09.15.58;	author lukem;	state Exp;
branches;
next	;

1.2.4.1
date	2000.09.08.14.10.29;	author ad;	state Exp;
branches;
next	1.2.4.2;

1.2.4.2
date	2000.10.05.02.33.50;	author tv;	state Exp;
branches;
next	1.2.4.3;

1.2.4.3
date	2000.11.01.02.05.37;	author tv;	state Exp;
branches;
next	1.2.4.4;

1.2.4.4
date	2000.11.01.02.25.06;	author tv;	state Exp;
branches;
next	;

1.1.2.1
date	99.06.05.20.17.42;	author bouyer;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	99.06.05.20.17.43;	author bouyer;	state Exp;
branches;
next	;


desc
@@


1.34
log
@More conservative umask
@
text
@#!/bin/sh
#
# $NetBSD: makeobsolete,v 1.33 2023/11/08 12:58:04 christos Exp $
#
# Print out the obsolete files for a set
# Usage: makeobsolete [-b] [-x] [-a arch] [-m machine] [-s setsdir] \
#    [-t target] [setname ...]
#

rundir="$(dirname "$0")" # ${0%/*} isn't good enough when there's no "/"
. "${rundir}/sets.subr"
lists=
target=./dist
obsolete=1

usage()
{
	cat 1>&2 <<USAGE
Usage: ${0##*/} [-a arch] [-m machine] [-s setsdir] [setname ...]
	-L base,x	make specified lists
	-b		make netbsd + x11 lists
	-x 		only make x11 lists
	-a arch		set arch (e.g, m68k, mips, powerpc)	[${MACHINE_ARCH}]
	-m machine	set machine (e.g, amiga, i386, macppc)	[${MACHINE}]
	-s setsdir	directory to find sets	[${setd}]
	-t target	target directory [${target}]
	[setname ...] 	sets to build
USAGE
	exit 1
}

umask 022
while getopts L:bxa:m:s:t: ch; do
	case ${ch} in
	L)
		save_IFS="${IFS}"
		IFS=,
		for _list in ${OPTARG}; do
			case $_list in
			base)	lists="${lists} ${nlists}" ;;
			x)	lists="${lists} ${xlists}" ;;
			esac
		done
		IFS="${save_IFS}"
		;;
	# backward compat
	b)
		lists="${nlists} ${xlists}"
		;;
	x)
		lists="${xlists}"
		;;
	a)
		MACHINE_ARCH="${OPTARG}"
		MACHINE_CPU="$(arch_to_cpu "${OPTARG}")"
		;;
	m)
		MACHINE="${OPTARG}"
		;;
	s)
		setsdir="${OPTARG}"
		;;
	t)
		target="${OPTARG}"
		;;
	*)
		usage
		;;
	esac
done
shift $((${OPTIND} - 1))
if [ -n "$1" ]; then
	lists="$*"
fi

if [ ! -d "${target}" ]; then
	echo "target directory [${target}] doesn't exist"
	exit 1
fi

for setname in ${lists:-${nlists}}; do
	file="${target}/${setname}"
	list_set_files "${setname}" | ${AWK} '{print $1}' | \
		${SORT} -ru > "${file}"
done
@


1.33
log
@Set the file creation mask consistently because the files these scripts
create can become part of an iso image.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.32 2022/08/21 07:10:03 lukem Exp $
d32 1
a32 1
umask 002
@


1.32
log
@Deprecate extsrc/, EXTSRCSRCDIR, MKEXTSRC

Remove support for building extsrc/:
1. Makefile: remove do-extsrc target.
2. build.sh: remove options -y and -Y extsrcdir.
3. distrib/sets: remove support for extsrc in various tools
   including the options -L ext and -y, and the extsrc sets.
4. doc/BUILDING.mdoc: remove docs for extsrc/, EXTSRCSRCDIR, MKEXTSRC (etc)
5. bsd.own.mk and various Makefiles: remove support for extsrc/,
   EXTSRCSRCDIR, MKEXTSRC.

As proposed on tech-kern and tech-userlevel on 2022-01-07
and followed up on 2022-08-21.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.31 2009/12/05 15:56:25 cegger Exp $
d32 1
@


1.31
log
@Fix syntax error on OSX 10.5.
While here, simplify handling with OPTARG using IFS.

developped with and 'go for it' dsl@@
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.30 2009/11/30 16:13:23 uebayasi Exp $
d20 1
a20 1
	-L base,x,ext	make specified lists
a22 1
	-y 		only make extsrc lists
d32 1
a32 1
while getopts L:bxya:m:s:t: ch; do
a40 1
			ext)	lists="${lists} ${extlists}" ;;
a51 3
	y)
		lists="${extlists}"
		;;
@


1.30
log
@Support "extsrc", externally added programs and libraries.  Users can write
their own reach-overs, cross-build, install, and get set files just like base
and X11 / X.org.  (These sets are not included as TNF releases.)
@
text
@d3 1
a3 1
# $NetBSD$
d12 1
a12 1
lists="${nlists}"
d36 10
a45 9
		lists=$(
			for _list in $( echo ${OPTARG} | tr , ' ' ); do
				case $_list in
				base)	echo "${nlists}" ;;
				x)	echo "${xlists}" ;;
				ext)	echo "${extlists}" ;;
				esac
			done
		)
d85 1
a85 1
for setname in ${lists}; do
@


1.29
log
@No space in "function()", "command;" or "$(command)".
Requested by christos.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.28 2006/01/04 13:35:55 apb Exp $
d20 1
d23 1
d33 1
a33 1
while getopts bxa:m:s:t: ch; do
d35 12
d48 1
a48 1
		lists="${xlists} ${nlists}"
d53 3
@


1.29.20.1
log
@Sync with HEAD.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.29 2006/01/28 19:01:23 apb Exp $
@


1.28
log
@Add quotes to some shell variables overlooked in previous commit.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.27 2006/01/03 18:31:09 apb Exp $
d62 1
a62 1
if [ ! -d "${target}" ] ; then
@


1.27
log
@Ensure that (almost) all shell variables in distrib/sets/* scripts are
used with curly braces and quotes, as in "${var}".

Also ensure that command substitution is quoted, as in "$(command)", and
convert `command` to $(command).

Reviewed by agc
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.26 2006/01/03 16:40:16 apb Exp $
d70 1
a70 1
		${SORT} -ru > ${file}
@


1.26
log
@Add shell variables defined in sets.subr for almost all commands used
by scripts in distrib/sets/*.  This is intended to be useful when cross
building.  Only trivial commands like echo, cat, and rm are excluded
from this treatment.

While I am here, make ${MTREE} and ${DB} follow the pattern used by most
other such variables.

Reviewed by agc.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.25 2005/03/28 03:12:34 lukem Exp $
d10 3
a12 2
. ${0%/*}/sets.subr
lists=$nlists
d22 4
a25 4
	-a arch		set arch (e.g, m68k, mips, powerpc)	[$MACHINE_ARCH]
	-m machine	set machine (e.g, amiga, i386, macppc)	[$MACHINE]
	-s setsdir	directory to find sets	[$setd]
	-t target	target directory [$target]
d34 1
a34 1
		lists="$xlists $nlists"
d37 1
a37 1
		lists="$xlists"
d40 2
a41 2
		MACHINE_ARCH=${OPTARG}
		MACHINE_CPU=$(arch_to_cpu ${OPTARG})
d44 1
a44 1
		MACHINE=${OPTARG}
d47 1
a47 1
		setsdir=${OPTARG}
d50 1
a50 1
		target=${OPTARG}
d62 2
a63 2
if [ ! -d $target ] ; then
	echo "target directory [$target] doesn't exist"
d67 4
a70 3
for setname in $lists; do
	file=$target/${setname}
	list_set_files $setname | ${AWK} '{print $1}' | ${SORT} -ru > $file
@


1.25
log
@Don't remove empty obsolete lists; it unnecessarily complicates etc/Makefile
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.24 2004/07/23 15:11:26 erh Exp $
d68 1
a68 1
	list_set_files $setname | awk '{print $1}' | sort -ru > $file
@


1.24
log
@Make all the sets scripts work even when not run from the directory that
they reside in.
Change any uses of dirname to use shell variable substitution instead.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.23 2004/01/03 02:38:58 lukem Exp $
a68 3
	if [ ! -s $file ] ; then
		rm $file
	fi
@


1.24.2.1
log
@Pull up revision 1.25 (requested by jmc in ticket #114):
Don't remove empty obsolete lists; it unnecessarily complicates etc/Makefile
@
text
@d3 1
a3 1
# $NetBSD$
d69 3
@


1.23
log
@rename all the <bsd.own.mk> derived variables to uppercase, and export
them to the environment.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.22 2003/12/29 03:13:25 lukem Exp $
d10 1
a10 1
. $(dirname $0)/sets.subr
@


1.22
log
@Significant overhaul of how the sets are used:

* Add an optional third field to the sets file which is a list of
  comma separated keywords that control if the line is printed.
  Currently supported keywords
	kerberos4	${MKKERBEROS4} != no
	kerberos	${MKKERBEROS} != no
	lint		${MKLINT} != no
	obsolete	${obsolete} != 0.
			In this case, non obsolete files are not printed.
  (This will allow future support for builds with variables such as
  MKHESIOD and MKYP set to "no".)

* Use sh(1)'s getopts where appropriate, and otherwise cleanup the
  various scripts.

* Move defaults for sets.subr from sets.defaults into sets.subr.
  Move replicated code for determining stuff such as shlibs type
  from various scripts into sets.subr.

* Merge the obsolete.*, krb.*, krb4.* and lint.* into the appropriate
  main lists with the relevant third field keyword(s).
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.21 2003/12/19 22:25:54 jmc Exp $
d21 2
a22 2
	-a arch		set arch (e.g, m68k, mips, powerpc)	[$machine_arch]
	-m machine	set machine (e.g, amiga, i386, macppc)	[$machine]
d39 2
a40 2
		machine_arch=${OPTARG}
		machine_cpu=$(arch_to_cpu ${OPTARG})
d43 1
a43 1
		machine=${OPTARG}
@


1.21
log
@Redo creation of sets/sums so this can be parallelized if using -j.
Suggested in PR#20115 and PR#20116
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.20 2003/12/09 17:57:42 matt Exp $
d10 2
a11 5
# set defaults
. $(dirname $0)/sets.defaults
setd=`pwd`
nlists=$lists
xlists="xbase xcomp xcontrib xfont xserver xmisc"
d13 1
d15 4
a18 23
# handle args
while : ; do
	case $1 in
	-b*)
		lists="$xlists $nlists"
		;;
	-x*)
		lists=$xlists;;
	-a*)
		machine_arch=$2; shift
		;;
	-m*)
		machine=$2; shift
		;;
	-s*)
		setd=$2; shift
		;;
	-t*)
		target=$2;shift
		;;
	-*)
		cat 1>&2 <<USAGE
Usage: $0 [-a arch] [-m machine] [-s setsdir] [setname ...]
d27 23
a49 1
		exit 1
d52 1
a52 1
		break
a54 1
	shift
d56 1
a60 3
# Convert mipse[lb] to mips after processing command line arguments.
machine_arch=`echo $machine_arch | sed s,^mipse.,mips, | sed s,^sh3e.,sh3e,`

a65 17
# Automatically add XFree86 version specific sets
for list in $lists
do
 if [ -z "$_lists" ]
 then
  _lists=$list
 else
  _lists="$_lists $list"
 fi
 if [ -d "$setd/lists/$list${x11_version}" ]
 then
  _lists="$_lists $list${x11_version}"
 fi
done
lists=$_lists
unset _lists

d68 1
a68 16
	(
	if [ -f $setd/lists/$setname/obsolete.mi ]; then
		awk -- '{print $1}' $setd/lists/$setname/obsolete.mi
	fi
	if [ "$machine" != "$cpu" -a \
	    -f $setd/lists/$setname/obsolete.${machine_arch} ]; then
		awk -- '{print $1}' $setd/lists/$setname/obsolete.${machine_arch}
	fi
	if [ -f $setd/lists/$setname/obsolete.${machine} ]; then
		awk -- '{print $1}' $setd/lists/$setname/obsolete.${machine}
	fi
	if [ "$use_tools_toolchain" != yes -a \
	    -f $setd/lists/$setname/obsolete.gcc ]; then
		awk -- '{print $1}' $setd/lists/$setname/obsolete.gcc
	fi
	) | egrep -v '^#' | sort -ru > $file
a71 1

@


1.20
log
@Export use_tools_toolchain.  Change last use of have_gcc3 to
use_tools_toolchain
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.19 2003/11/25 07:19:46 dyoung Exp $
d13 1
a13 1
nlists="base comp etc games man misc text"
a14 1
lists=$nlists
@


1.19
log
@Factor duplicated code for setting variables such as machine_cpu
and machine_arch to their defaults into sets.defaults, and source
it at the top of each script.

Also, to be consistent with variable naming, s/arch/machine_arch/.

sets.defaults introduces two new variables, krb and krb4, which
will affect whether Kerberos- or Kerberos IV-only files are put
into the set lists.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.18 2003/09/21 19:26:05 tron Exp $
d99 2
a100 1
	if [ "$have_gcc3" = yes -a -f $setd/lists/$setname/obsolete.gcc ]; then
@


1.18
log
@Fix sets handling so that GCC specific lists are really used.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.17 2003/02/20 11:40:29 lukem Exp $
d11 1
a11 3
make="${MAKE:-make} -j 1 -f `dirname $0`/Makefile"
machine=`${make} print_machine`
arch=`${make} print_machine_arch`
a16 1
have_gcc3="`${make} print_have_gcc3`"
d27 1
a27 1
		arch=$2; shift
d43 1
a43 1
	-a arch		set arch (e.g, m68k, mips, powerpc)	[$arch]
d62 1
a62 1
arch=`echo $arch | sed s,^mipse.,mips, | sed s,^sh3e.,sh3e,`
d93 2
a94 2
	    -f $setd/lists/$setname/obsolete.${arch} ]; then
		awk -- '{print $1}' $setd/lists/$setname/obsolete.${arch}
@


1.17
log
@etc/postinstall
    *	Improve message display in find_file_in_dirlist()
    *	do_obsolete(): instead of running distrib/sets/makeobsolete to
	temporarily generate the obsolete sets lists, look for them in
	${SRC_DIR}/etc/obsolete/* or ${DEST_DIR}/etc/obsolete/*.
	The obsolete check now works for "extracted etc.tgz" as the source dir.

etc/Makefile (install-etc-files), distrib/sets/lists/*
    *	Install obsolete set lists into /etc/obsolete/
    *	Tweak how pwd_mkdb files are added to METALOG

distrib/sets/makeobsolete
    *	Don't bother with "_obsolete" suffix on generated file names.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.16 2002/11/26 06:22:23 lukem Exp $
d19 1
d101 3
@


1.16
log
@use ${make} instead of ${MAKE} in the shell scripts, to prevent weird
lossage with the modified ${MAKE} getting passed to child make's
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.15 2002/11/25 23:29:54 lukem Exp $
d89 1
a89 1
	file=$target/${setname}_obsolete
@


1.15
log
@explicitly add  " -f `dirname $0`/Makefile "  to ${MAKE}, so that
these scripts do not need to be run from this directory in order
to function correctly
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.14 2002/11/17 03:04:53 lukem Exp $
d11 3
a13 3
MAKE="${MAKE:-make} -j 1 -f `dirname $0`/Makefile"
machine=`${MAKE} print_machine`
arch=`${MAKE} print_machine_arch`
@


1.14
log
@grammar fix
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.13 2002/11/17 02:59:56 lukem Exp $
d11 1
a11 1
MAKE="${MAKE:-make} -j 1"
@


1.13
log
@remove unnecessary code, and add minor code formatting tweak
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.12 2002/11/17 02:22:11 lukem Exp $
d67 1
a67 1
	echo "target directory [$target] doesn't exists"
@


1.12
log
@use  ${MAKE} print_machine(_arch)?  where appropriate
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.11 2002/07/23 09:02:45 lukem Exp $
d100 2
a101 1
	fi) | egrep -v '^#' | sort -ru > $file
d106 1
a106 1
done | egrep -v '^#' | sort -ru
@


1.11
log
@set  MAKE="${MAKE:-make} -j 1"  to prevent problems where the output
of make -j N>1 would result in junk in various shell variables
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.10 2002/04/09 06:07:17 tron Exp $
d12 2
a13 2
machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | ${MAKE} -s -f-`}
arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | ${MAKE} -s -f-`}
@


1.10
log
@Adapt support for XFree86 3.3.6/4.x lists to match behaviour of
"makeflist".
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.9 2002/04/08 15:39:32 tron Exp $
d11 3
a13 3
: ${MAKE=make}
machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | $MAKE -s -f-`}
arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | $MAKE -s -f-`}
@


1.10.2.1
log
@Pull up revision 1.11 (requested by lukem):
set  MAKE="${MAKE:-make} -j 1"  to prevent problems where the output
of make -j N>1 would result in junk in various shell variables
@
text
@d3 1
a3 1
# $NetBSD$
d11 3
a13 3
MAKE="${MAKE:-make} -j 1"
machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | ${MAKE} -s -f-`}
arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | ${MAKE} -s -f-`}
@


1.9
log
@Fix problem with building X11 release "tar" archives after support for
XFree86 4.x sets has been added. Problem noted by Richard Earnshaw in
private e-mail.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.8 2001/01/04 11:15:32 itojun Exp $
d16 1
a16 14
xlists=
for xlist in xbase xcomp xcontrib xfont xserver xmisc
do
 if [ -z "$xlists" ]
 then
  xlists=$xlist
 else
  xlists="$xlists $xlist"
 fi
 if [ -d "$setd/lists/$xlist${x11_version}" ]
 then
  xlists="$xlists $xlist${x11_version}"
 fi
done
d70 17
@


1.8
log
@sh3e[bl] -> sh3.
sh3 has no shlib yet.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.7 2000/11/18 05:32:00 wiz Exp $
d16 14
a29 1
xlists="xbase xcomp xcontrib xfont xserver xmisc"
@


1.7
log
@retire secr here, too.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.6 2000/10/27 13:04:58 fvdl Exp $
d64 1
a64 1
arch=`echo $arch | sed s,^mipse.,mips,`
@


1.6
log
@Sort obsolete file lists in reverse order, so that subdirectories come
before their parent dirs. Avoids 'directory not empty' problems when
removing directories.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.5 2000/10/05 00:11:44 tv Exp $
d15 1
a15 1
nlists="base comp etc games man misc secr text"
@


1.5
log
@Obliterate "man/md_share".  The difference is negligible relative to the
size of the man set, and with all architectures' man pages in "man", we
can now share both "man" and "misc" on all platforms (CD-ROM space saver).
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.4 2000/10/01 22:49:05 thorpej Exp $
d83 1
a83 1
	fi) | egrep -v '^#' | sort -u > $file
d88 1
a88 1
done | egrep -v '^#' | sort -u
@


1.4
log
@Add the xmisc set.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.3 2000/08/03 10:41:02 ad Exp $
a73 3
	if [ -f $setd/lists/$setname/obsolete.md_share ]; then
		awk -- '{print $1}' $setd/lists/$setname/obsolete.md_share
	fi
@


1.3
log
@Look for and use `obsolete.md_share'.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.2 2000/01/23 20:31:17 jwise Exp $
d16 1
a16 1
xlists="xbase xcomp xcontrib xfont xserver"
@


1.2
log
@Compatible upgrade to set list behavior -- any (whitespace separated) fields
after the first in each line of a set list are ignored.  This introduces
no change in current set list behavior, but will need to be revisited if
we wish to distribute files with spaces in their names -- in this case we can
move to tab separated fields or some other behavior.

Current set lists work exactly as before, but in the future set lists may
have additional fields for use in a system packaging script.

I will post a detailed work plan for the system package system which uses
this to tech-pkg and tech-install in the next day or so.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.1 1999/06/05 20:17:42 bouyer Exp $
d74 3
@


1.2.4.1
log
@Pull up revision 1.3 (approved by releng-1-5):
  Look for and use `obsolete.md_share'.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.3 2000/08/03 10:41:02 ad Exp $
a73 3
	if [ -f $setd/lists/$setname/obsolete.md_share ]; then
		awk -- '{print $1}' $setd/lists/$setname/obsolete.md_share
	fi
@


1.2.4.2
log
@Pull up 1.5 (obliterate man/md_share), approved by thorpej.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.5 2000/10/05 00:11:44 tv Exp $
d74 3
@


1.2.4.3
log
@Pullup 1.4 [jmc]:
Enable xmisc in sysinst.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.2.4.2 2000/10/05 02:33:50 tv Exp $
d16 1
a16 1
xlists="xbase xcomp xcontrib xfont xserver xmisc"
@


1.2.4.4
log
@Pullup 1.6 [fvdl]:
Sort obsolete file lists in reverse order, so that subdirectories come
before their parent dirs. Avoids "directory not empty" problems when
removing directories.
@
text
@d3 1
a3 1
# $NetBSD: makeobsolete,v 1.2.4.3 2000/11/01 02:05:37 tv Exp $
d83 1
a83 1
	fi) | egrep -v '^#' | sort -ru > $file
d88 1
a88 1
done | egrep -v '^#' | sort -ru
@


1.1
log
@Generate the /dist/obsolete_* files used by sysinst from the obsolete lists
in sets/lists/*. The sript sets/makeobsolete concatenates the mi and md
obsolete list files all or a specified set and dumps it in a file, in a
subdir specified on the command line (inspired from the maketar and makeflist
files).
Use this for all the sysinst-based installs.
Untested for non-i386, and the md obsolete list may be wrong or incomplete.
Each postmaster is supposed to check this on his port.
@
text
@d3 1
a3 1
# $NetBSD: $
d75 1
a75 1
		cat $setd/lists/$setname/obsolete.mi
d79 1
a79 1
		cat $setd/lists/$setname/obsolete.${arch}
d82 1
a82 1
		cat $setd/lists/$setname/obsolete.${machine}
@


1.1.2.1
log
@file makeobsolete was added on branch netbsd-1-4 on 1999-06-05 20:17:43 +0000
@
text
@d1 88
@


1.1.2.2
log
@Generate the /dist/obsolete_* files used by sysinst from the obsolete lists
in sets/lists/*. The sript sets/makeobsolete concatenates the mi and md
obsolete list files all or a specified set and dumps it in a file, in a
subdir specified on the command line (inspired from the maketar and makeflist
files).
Use this for all the sysinst-based installs.
Untested for non-i386, and the md obsolete list may be wrong or incomplete.
Each postmaster is supposed to check this on his port.
@
text
@a0 88
#!/bin/sh
#
# $NetBSD: makeobsolete,v 1.1 1999/06/05 20:17:42 bouyer Exp $
#
# Print out the obsolete files for a set
# Usage: makeobsolete [-b] [-x] [-a arch] [-m machine] [-s setsdir] \
#    [-t target] [setname ...]
#

# set defaults
: ${MAKE=make}
machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | $MAKE -s -f-`}
arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | $MAKE -s -f-`}
setd=`pwd`
nlists="base comp etc games man misc secr text"
xlists="xbase xcomp xcontrib xfont xserver"
lists=$nlists
target=./dist

# handle args
while : ; do
	case $1 in
	-b*)
		lists="$xlists $nlists"
		;;
	-x*)
		lists=$xlists;;
	-a*)
		arch=$2; shift
		;;
	-m*)
		machine=$2; shift
		;;
	-s*)
		setd=$2; shift
		;;
	-t*)
		target=$2;shift
		;;
	-*)
		cat 1>&2 <<USAGE
Usage: $0 [-a arch] [-m machine] [-s setsdir] [setname ...]
	-b		make netbsd + x11 lists
	-x 		only make x11 lists
	-a arch		set arch (e.g, m68k, mips, powerpc)	[$arch]
	-m machine	set machine (e.g, amiga, i386, macppc)	[$machine]
	-s setsdir	directory to find sets	[$setd]
	-t target	target directory [$target]
	[setname ...] 	sets to build
USAGE
		exit 1
		;;
	*)
		break
		;;
	esac
	shift
done
if [ -n "$1" ]; then
	lists="$*"
fi

# Convert mipse[lb] to mips after processing command line arguments.
arch=`echo $arch | sed s,^mipse.,mips,`

if [ ! -d $target ] ; then
	echo "target directory [$target] doesn't exists"
	exit 1
fi

for setname in $lists; do
	file=$target/${setname}_obsolete
	(
	if [ -f $setd/lists/$setname/obsolete.mi ]; then
		cat $setd/lists/$setname/obsolete.mi
	fi
	if [ "$machine" != "$cpu" -a \
	    -f $setd/lists/$setname/obsolete.${arch} ]; then
		cat $setd/lists/$setname/obsolete.${arch}
	fi
	if [ -f $setd/lists/$setname/obsolete.${machine} ]; then
		cat $setd/lists/$setname/obsolete.${machine}
	fi) | egrep -v '^#' | sort -u > $file
	if [ ! -s $file ] ; then
		rm $file
	fi

done | egrep -v '^#' | sort -u
@

