2005-05-01 11:06:09 +04:00
|
|
|
# $NetBSD: sets.subr,v 1.41 2005/05/01 07:06:09 lukem Exp $
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
2003-12-29 06:13:25 +03:00
|
|
|
|
|
|
|
#
|
2004-01-03 05:38:58 +03:00
|
|
|
# The following variables contain defaults for sets.subr functions and callers:
|
2003-12-29 06:13:25 +03:00
|
|
|
# setsdir path to src/distrib/sets
|
|
|
|
# nlists list of base sets
|
|
|
|
# xlists list of x11 sets
|
|
|
|
# obsolete controls if obsolete files are selected instead
|
|
|
|
# lkm if != "no", enable LKM sets
|
|
|
|
# shlib shared library format (a.out, elf, or "")
|
|
|
|
# stlib static library format (a.out, elf)
|
2004-01-08 04:39:26 +03:00
|
|
|
# x11_version version of XFree86. one of:
|
|
|
|
# "" cross built from src/x11
|
|
|
|
# 3 XFree86 3.x from xsrc/xc
|
|
|
|
# 4 XFree86 4.x from xsrc/xfree/xc
|
2004-01-03 05:38:58 +03:00
|
|
|
#
|
|
|
|
# The following <bsd.own.mk> variables are exported to the environment:
|
|
|
|
# MACHINE
|
|
|
|
# MACHINE_ARCH
|
|
|
|
# MACHINE_CPU
|
|
|
|
# HAVE_GCC3
|
|
|
|
# TOOLCHAIN_MISSING
|
|
|
|
# OBJECT_FMT
|
2004-01-11 18:09:51 +03:00
|
|
|
# as well as:
|
|
|
|
#
|
|
|
|
MKVARS="\
|
|
|
|
MKBFD \
|
|
|
|
MKCATPAGES \
|
|
|
|
MKCRYPTO \
|
|
|
|
MKCRYPTO_IDEA \
|
|
|
|
MKCRYPTO_MDC2 \
|
|
|
|
MKCRYPTO_RC5 \
|
|
|
|
MKCVS \
|
2005-01-10 01:24:04 +03:00
|
|
|
MKGCCCMDS \
|
2004-01-12 02:42:27 +03:00
|
|
|
MKDOC \
|
2004-03-17 23:32:02 +03:00
|
|
|
MKGDB \
|
2004-01-11 18:09:51 +03:00
|
|
|
MKHESIOD \
|
2004-01-12 02:42:27 +03:00
|
|
|
MKINFO \
|
2005-02-22 17:39:58 +03:00
|
|
|
MKIPFILTER \
|
2005-01-10 06:13:04 +03:00
|
|
|
MKINET6 \
|
2004-01-11 18:09:51 +03:00
|
|
|
MKKERBEROS \
|
|
|
|
MKKERBEROS4 \
|
|
|
|
MKLINT \
|
|
|
|
MKMAN \
|
2004-06-14 02:35:02 +04:00
|
|
|
MKMANPAGES \
|
2004-01-11 18:09:51 +03:00
|
|
|
MKMANZ \
|
2004-01-12 02:42:27 +03:00
|
|
|
MKNLS \
|
2005-01-10 03:20:21 +03:00
|
|
|
MKPAM \
|
2005-02-22 17:39:58 +03:00
|
|
|
MKPF \
|
2004-02-28 04:02:05 +03:00
|
|
|
MKPIC \
|
2004-01-11 18:09:51 +03:00
|
|
|
MKPOSTFIX \
|
|
|
|
MKPROFILE \
|
|
|
|
MKSENDMAIL \
|
2004-01-12 06:08:06 +03:00
|
|
|
MKSHARE \
|
2004-01-11 18:09:51 +03:00
|
|
|
MKSKEY \
|
2004-01-12 12:42:07 +03:00
|
|
|
MKUUCP \
|
2005-03-22 12:28:24 +03:00
|
|
|
MKX11 \
|
2004-01-11 18:09:51 +03:00
|
|
|
MKYP \
|
2005-05-01 11:06:09 +04:00
|
|
|
USE_INET6 \
|
|
|
|
USE_KERBEROS \
|
|
|
|
USE_YP \
|
2004-01-11 18:09:51 +03:00
|
|
|
"
|
2004-01-03 15:23:11 +03:00
|
|
|
|
2003-12-29 06:13:25 +03:00
|
|
|
oIFS=$IFS
|
|
|
|
IFS="
|
|
|
|
"
|
|
|
|
for x in $(
|
2004-01-03 15:23:11 +03:00
|
|
|
${MAKE:-make} -B -f- all <<EOMAKE
|
2003-12-29 06:13:25 +03:00
|
|
|
.include <bsd.own.mk>
|
2004-06-14 02:35:02 +04:00
|
|
|
.if (\${MKMAN} == "no" || empty(MANINSTALL:Mmaninstall))
|
|
|
|
MKMANPAGES=no
|
|
|
|
.else
|
|
|
|
MKMANPAGES=yes
|
|
|
|
.endif
|
2003-12-29 06:13:25 +03:00
|
|
|
all:
|
2004-01-03 05:38:58 +03:00
|
|
|
.for i in MACHINE MACHINE_ARCH MACHINE_CPU \
|
|
|
|
HAVE_GCC3 OBJECT_FMT TOOLCHAIN_MISSING \
|
2004-01-03 15:23:11 +03:00
|
|
|
${MKVARS}
|
|
|
|
@echo "export \$i=\${\$i}"
|
2004-01-03 05:38:58 +03:00
|
|
|
.endfor
|
2004-01-08 04:39:26 +03:00
|
|
|
.if (\${MKX11:Uno} != "no")
|
|
|
|
@echo x11_version=""
|
2003-12-29 06:13:25 +03:00
|
|
|
.else
|
2005-01-07 21:56:40 +03:00
|
|
|
@echo x11_version=4
|
2003-12-29 06:13:25 +03:00
|
|
|
.endif
|
|
|
|
|
2004-01-03 15:23:11 +03:00
|
|
|
EOMAKE
|
2003-12-29 06:13:25 +03:00
|
|
|
); do
|
2004-01-03 05:38:58 +03:00
|
|
|
# echo 1>&2 "DEBUG: read $x"
|
2003-12-29 06:13:25 +03:00
|
|
|
eval $x
|
|
|
|
done
|
|
|
|
IFS=$oIFS
|
|
|
|
|
2004-07-23 19:11:26 +04:00
|
|
|
setsdir=${0%/*}
|
2003-12-29 06:13:25 +03:00
|
|
|
nlists="base comp etc games man misc text"
|
|
|
|
case $x11_version in
|
2004-01-08 04:39:26 +03:00
|
|
|
3) xlists="xbase3 xcomp3 xcontrib3 xfont3 xmisc3 xserver3" ;;
|
|
|
|
4) xlists="xbase4 xcomp4 xcontrib4 xfont4 xmisc4 xserver4" ;;
|
2004-01-23 17:38:09 +03:00
|
|
|
"") xlists="xbase xcomp xetc xfont xserver" ;;
|
2004-01-08 04:39:26 +03:00
|
|
|
*) xlists="" ;; # unknown!
|
2003-12-29 06:13:25 +03:00
|
|
|
esac
|
|
|
|
obsolete=0
|
|
|
|
lkm=yes
|
2004-01-03 05:38:58 +03:00
|
|
|
if [ "${MACHINE}" = "evbppc" ]; then
|
2003-12-29 06:13:25 +03:00
|
|
|
lkm=no # Turn off LKMs for some ports.
|
|
|
|
fi
|
2004-03-05 07:52:50 +03:00
|
|
|
# Determine lib type. Do this first so stlib also gets set.
|
|
|
|
if [ "${OBJECT_FMT}" = "ELF" ]; then
|
2003-12-29 06:13:25 +03:00
|
|
|
shlib=elf
|
|
|
|
else
|
|
|
|
shlib=aout
|
|
|
|
fi
|
|
|
|
stlib=$shlib
|
2004-03-05 07:52:50 +03:00
|
|
|
# Now check for MKPIC or specials and turn off shlib if need be.
|
|
|
|
if [ "${MKPIC}" = "no" ]; then
|
|
|
|
shlib=no
|
|
|
|
fi
|
2004-02-22 04:43:02 +03:00
|
|
|
if [ "${MACHINE_ARCH}" = "m68000" ]; then
|
2003-12-29 06:13:25 +03:00
|
|
|
shlib=no # Turn off shlibs for some ports.
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# list_set_files setfile [...]
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
2003-12-29 06:13:25 +03:00
|
|
|
# Produce a packing list for setfile(s).
|
|
|
|
# In each file, a record consists of a path and a System Package name,
|
|
|
|
# separated by whitespace. E.g.,
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
2005-05-01 11:06:09 +04:00
|
|
|
# # $NetBSD: sets.subr,v 1.41 2005/05/01 07:06:09 lukem Exp $
|
2003-12-29 06:13:25 +03:00
|
|
|
# . base-sys-root [keyword[,...]]
|
|
|
|
# ./altroot base-sys-root
|
|
|
|
# ./bin base-sys-root
|
|
|
|
# ./bin/[ base-util-root
|
|
|
|
# ./bin/cat base-util-root
|
|
|
|
# [...]
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
2003-12-29 06:13:25 +03:00
|
|
|
# A # in the first column marks a comment.
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
2003-12-29 06:13:25 +03:00
|
|
|
# If ${obsolete} != 0, only entries with an "obsolete" keyword will
|
|
|
|
# be printed.
|
|
|
|
#
|
|
|
|
# The third field is an optional comma separated list of keywords to
|
|
|
|
# control if a record is printed; every keyword listed must be enabled
|
|
|
|
# for the record to be printed. The following keywords are available:
|
|
|
|
# dummy dummy entry (ignored)
|
2004-01-03 16:31:38 +03:00
|
|
|
# obsolete file is obsolete, and only printed if
|
|
|
|
# ${obsolete} != 0
|
|
|
|
#
|
2004-01-11 18:09:51 +03:00
|
|
|
# bfd ${MKBFD} != no
|
|
|
|
# catpages ${MKCATPAGES} != no
|
|
|
|
# crypto ${MKCRYPTO} != no
|
|
|
|
# crypto_idea ${MKCRYPTO_IDEA} != no
|
|
|
|
# crypto_mdc2 ${MKCRYPTO_MDC2} != no
|
|
|
|
# crypto_rc5 ${MKCRYPTO_RC5} != no
|
|
|
|
# cvs ${MKCVS} != no
|
2004-01-12 02:42:27 +03:00
|
|
|
# doc ${MKDOC} != no
|
2005-01-10 01:24:04 +03:00
|
|
|
# gcccmds ${MKGCCCMDS} != no
|
2004-03-17 23:32:02 +03:00
|
|
|
# gdb ${MKGDB} != no
|
2004-01-11 18:09:51 +03:00
|
|
|
# hesiod ${MKHESIOD} != no
|
2004-01-12 02:42:27 +03:00
|
|
|
# info ${MKINFO} != no
|
2005-02-22 17:39:58 +03:00
|
|
|
# ipfilter ${MKIPFILTER} != no
|
2005-01-10 06:13:04 +03:00
|
|
|
# inet6 ${MKINET6} != no
|
2004-01-11 18:09:51 +03:00
|
|
|
# kerberos ${MKKERBEROS} != no
|
|
|
|
# kerberos4 ${MKKERBEROS4} != no
|
|
|
|
# lint ${MKLINT} != no
|
|
|
|
# man ${MKMAN} != no
|
|
|
|
# manz ${MKMANZ} != no
|
2004-01-12 02:42:27 +03:00
|
|
|
# nls ${MKNLS} != no
|
2005-01-10 03:20:21 +03:00
|
|
|
# pam ${MKPAM} != no
|
2005-02-22 17:39:58 +03:00
|
|
|
# pf ${MKPF} != no
|
2004-01-11 18:09:51 +03:00
|
|
|
# postfix ${MKPOSTFIX} != no
|
|
|
|
# profile ${MKPROFILE} != no
|
|
|
|
# sendmail ${MKSENDMAIL} != no
|
2004-01-12 06:08:06 +03:00
|
|
|
# share ${MKSHARE} != no
|
2004-01-11 18:09:51 +03:00
|
|
|
# skey ${MKSKEY} != no
|
2004-01-12 12:42:07 +03:00
|
|
|
# uucp ${MKUUCP} != no
|
2004-01-11 18:09:51 +03:00
|
|
|
# yp ${MKYP} != no
|
|
|
|
#
|
2005-05-01 11:06:09 +04:00
|
|
|
# use_inet6 ${USE_INET6} != no
|
|
|
|
# use_kerberos ${USE_KERBEROS} != no
|
|
|
|
# use_yp ${USE_YP} != no
|
|
|
|
#
|
2004-01-11 18:09:51 +03:00
|
|
|
# .cat if ${MKMANZ} != "no" && ${MKCATPAGES} != "no"
|
|
|
|
# automatically append ".gz" to the filename
|
|
|
|
#
|
|
|
|
# .man if ${MKMANZ} != "no" && ${MKMAN} != "no"
|
|
|
|
# automatically append ".gz" to the filename
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
2003-12-26 09:05:27 +03:00
|
|
|
list_set_files()
|
|
|
|
{
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
for setname; do
|
|
|
|
list_set_lists $setname
|
2003-12-29 06:13:25 +03:00
|
|
|
done | xargs cat | \
|
2004-01-03 05:38:58 +03:00
|
|
|
awk -v obsolete=${obsolete} '
|
2003-12-29 06:13:25 +03:00
|
|
|
BEGIN {
|
|
|
|
if (! obsolete) {
|
2004-01-03 15:23:11 +03:00
|
|
|
split("'"${MKVARS}"'", needvars)
|
2003-12-29 06:13:25 +03:00
|
|
|
for (vi in needvars) {
|
|
|
|
nv = needvars[vi]
|
2005-05-01 11:06:09 +04:00
|
|
|
kw = tolower(nv)
|
|
|
|
sub(/^mk/, "", kw)
|
2004-01-03 15:23:11 +03:00
|
|
|
if (ENVIRON[nv] != "no")
|
|
|
|
wanted[kw] = 1
|
2003-12-29 06:13:25 +03:00
|
|
|
}
|
2004-06-14 02:35:02 +04:00
|
|
|
if (("man" in wanted) && ("catpages" in wanted))
|
2004-01-11 18:09:51 +03:00
|
|
|
wanted[".cat"] = 1
|
2004-06-14 02:35:02 +04:00
|
|
|
if (("man" in wanted) && ("manpages" in wanted))
|
2004-01-11 18:09:51 +03:00
|
|
|
wanted[".man"] = 1
|
2003-12-29 06:13:25 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/^#/ {
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
|
|
|
NF > 2 && $3 != "-" {
|
|
|
|
split($3, keywords, ",")
|
|
|
|
show = 1
|
|
|
|
for (ki in keywords) {
|
|
|
|
kw = keywords[ki]
|
|
|
|
if (kw == "obsolete") {
|
|
|
|
if (obsolete)
|
|
|
|
print
|
|
|
|
next
|
|
|
|
}
|
2004-01-11 18:09:51 +03:00
|
|
|
if (("manz" in wanted) &&
|
|
|
|
(kw == ".cat" || kw == ".man"))
|
|
|
|
$1 = $1 ".gz"
|
2003-12-29 06:13:25 +03:00
|
|
|
if (! (kw in wanted))
|
|
|
|
show = 0
|
|
|
|
}
|
|
|
|
if (show)
|
|
|
|
print
|
|
|
|
next
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
if (! obsolete)
|
|
|
|
print
|
|
|
|
}'
|
|
|
|
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# list_set_lists setname
|
|
|
|
#
|
|
|
|
# Print to stdout a list of files, one filename per line, which
|
|
|
|
# concatenate to create the packing list for setname. E.g.,
|
|
|
|
#
|
|
|
|
# .../lists/base/mi
|
|
|
|
# .../lists/base/rescue.mi
|
|
|
|
# .../lists/base/md.i386
|
2003-12-29 06:13:25 +03:00
|
|
|
# [...]
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
2003-12-29 06:13:25 +03:00
|
|
|
# For a given setname $set, the following files may be selected from
|
|
|
|
# .../list/$set:
|
|
|
|
# mi
|
2004-01-03 05:38:58 +03:00
|
|
|
# ad.${MACHINE_ARCH}
|
|
|
|
# (or) ad.${MACHINE_CPU}
|
|
|
|
# ad.${MACHINE_CPU}.shl
|
|
|
|
# md.${MACHINE}.${MACHINE_ARCH}
|
|
|
|
# (or) md.${MACHINE}
|
2003-12-29 06:13:25 +03:00
|
|
|
# stl.mi
|
|
|
|
# stl.stlib
|
|
|
|
# shl.mi
|
|
|
|
# shl.shlib
|
|
|
|
# lkm.mi if ${lkm} != no
|
|
|
|
# gcc.mi
|
|
|
|
# gcc.shl
|
|
|
|
# tc.mi
|
|
|
|
# tc.shl
|
|
|
|
# rescue.shl
|
2004-01-03 05:38:58 +03:00
|
|
|
# rescue.${MACHINE}
|
|
|
|
# rescue.ad.${MACHINE_ARCH}
|
|
|
|
# (or) rescue.ad.${MACHINE_CPU}
|
|
|
|
# rescue.ad.${MACHINE_CPU}.shl
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
2003-12-29 06:13:25 +03:00
|
|
|
# Environment:
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
# shlib
|
|
|
|
# stlib
|
|
|
|
#
|
2003-12-26 09:05:27 +03:00
|
|
|
list_set_lists()
|
|
|
|
{
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
setname=$1
|
|
|
|
|
2003-12-29 06:13:25 +03:00
|
|
|
setdir=$setsdir/lists/$setname
|
|
|
|
echo $setdir/mi
|
2004-01-03 05:38:58 +03:00
|
|
|
if [ "${MACHINE}" != "${MACHINE_ARCH}" ]; then
|
|
|
|
# Prefer an ad.${MACHINE_ARCH} over an ad.${MACHINE_CPU},
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
# since the arch-specific one will be more specific than
|
|
|
|
# the cpu-specific one.
|
2004-01-03 05:38:58 +03:00
|
|
|
if [ -f $setdir/ad.${MACHINE_ARCH} ]; then
|
|
|
|
echo $setdir/ad.${MACHINE_ARCH}
|
|
|
|
elif [ -f $setdir/ad.${MACHINE_CPU} ]; then
|
|
|
|
echo $setdir/ad.${MACHINE_CPU}
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" -a \
|
2004-01-03 05:38:58 +03:00
|
|
|
-f $setdir/ad.${MACHINE_CPU}.shl ]; then
|
|
|
|
echo $setdir/ad.${MACHINE_CPU}.shl
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
|
|
|
fi
|
2004-01-03 05:38:58 +03:00
|
|
|
if [ -f $setdir/md.${MACHINE}.${MACHINE_ARCH} ]; then
|
|
|
|
echo $setdir/md.${MACHINE}.${MACHINE_ARCH}
|
|
|
|
elif [ -f $setdir/md.${MACHINE} ]; then
|
|
|
|
echo $setdir/md.${MACHINE}
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
2003-12-29 06:13:25 +03:00
|
|
|
if [ -f $setdir/stl.mi ]; then
|
|
|
|
echo $setdir/stl.mi
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
2003-12-29 06:13:25 +03:00
|
|
|
if [ -f $setdir/stl.${stlib} ]; then
|
|
|
|
echo $setdir/stl.${stlib}
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" ]; then
|
2003-12-29 06:13:25 +03:00
|
|
|
if [ -f $setdir/shl.mi ]; then
|
|
|
|
echo $setdir/shl.mi
|
2003-12-11 12:46:26 +03:00
|
|
|
fi
|
2003-12-29 06:13:25 +03:00
|
|
|
if [ -f $setdir/shl.${shlib} ]; then
|
|
|
|
echo $setdir/shl.${shlib}
|
2003-12-11 12:46:26 +03:00
|
|
|
fi
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
|
|
|
if [ "$lkm" != "no" ]; then
|
2003-12-29 06:13:25 +03:00
|
|
|
if [ -f $setdir/lkm.mi ]; then
|
|
|
|
echo $setdir/lkm.mi
|
2003-12-11 12:46:26 +03:00
|
|
|
fi
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
2004-01-03 05:38:58 +03:00
|
|
|
if [ "${TOOLCHAIN_MISSING}" != "yes" ]; then
|
|
|
|
if [ "${HAVE_GCC3}" = "yes" ]; then
|
2003-12-29 06:13:25 +03:00
|
|
|
if [ -f $setdir/gcc.mi ]; then
|
|
|
|
echo $setdir/gcc.mi
|
2003-08-04 09:53:20 +04:00
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" ]; then
|
2003-12-29 06:13:25 +03:00
|
|
|
if [ -f $setdir/gcc.shl ]; then
|
|
|
|
echo $setdir/gcc.shl
|
2003-08-04 09:53:20 +04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
else
|
2003-12-29 06:13:25 +03:00
|
|
|
if [ -f $setdir/tc.mi ]; then
|
|
|
|
echo $setdir/tc.mi
|
2003-08-04 09:53:20 +04:00
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" ]; then
|
2003-12-29 06:13:25 +03:00
|
|
|
if [ -f $setdir/tc.shl ]; then
|
|
|
|
echo $setdir/tc.shl
|
2003-08-04 09:53:20 +04:00
|
|
|
fi
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2003-12-29 06:13:25 +03:00
|
|
|
if [ -f $setdir/rescue.mi ]; then
|
|
|
|
echo $setdir/rescue.mi
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
2004-01-03 05:38:58 +03:00
|
|
|
if [ -f $setdir/rescue.${MACHINE} ]; then
|
|
|
|
echo $setdir/rescue.${MACHINE}
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
2004-01-03 05:38:58 +03:00
|
|
|
if [ "${MACHINE}" != "${MACHINE_ARCH}" ]; then
|
|
|
|
# Prefer a rescue.ad.${MACHINE_ARCH} over a
|
|
|
|
# rescue.ad.${MACHINE_CPU}, since the arch-
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
# specific one will be more specific than the
|
|
|
|
# cpu-specific one.
|
2004-01-03 05:38:58 +03:00
|
|
|
if [ -f $setdir/rescue.ad.${MACHINE_ARCH} ]; then
|
|
|
|
echo $setdir/rescue.ad.${MACHINE_ARCH}
|
|
|
|
elif [ -f $setdir/rescue.ad.${MACHINE_CPU} ]; then
|
|
|
|
echo $setdir/rescue.ad.${MACHINE_CPU}
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
2003-12-29 23:54:58 +03:00
|
|
|
if [ "$shlib" != "no" -a \
|
2004-01-03 05:38:58 +03:00
|
|
|
-f $setdir/rescue.ad.${MACHINE_CPU}.shl ]; then
|
|
|
|
echo $setdir/rescue.ad.${MACHINE_CPU}.shl
|
2003-12-29 23:54:58 +03:00
|
|
|
fi
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2003-12-29 06:13:25 +03:00
|
|
|
# arch_to_cpu mach
|
|
|
|
#
|
2004-01-03 05:38:58 +03:00
|
|
|
# Print the ${MACHINE_CPU} for ${MACHINE_ARCH}=mach,
|
2003-12-29 06:13:25 +03:00
|
|
|
# as determined by <bsd.own.mk>.
|
|
|
|
#
|
2003-12-26 09:05:27 +03:00
|
|
|
arch_to_cpu()
|
|
|
|
{
|
2004-01-03 15:23:11 +03:00
|
|
|
MACHINE_ARCH=${1} ${MAKE:-make} -f- all <<EOMAKE
|
2003-11-25 10:19:46 +03:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
all:
|
|
|
|
@echo \${MACHINE_CPU}
|
2004-01-03 15:23:11 +03:00
|
|
|
EOMAKE
|
2003-11-25 10:19:46 +03:00
|
|
|
}
|