blob: b46ef04723e419dd0363c4731e591001866ff93e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
cd "$(dirname "$0")"
export TOPDIR=$(realpath ..)
if gmake --help >/dev/null 2>&1; then
export GMAKE=gmake
else
export GMAKE=make
fi
rm -rf pkglist.d
mkdir pkglist.d
for a in */Makefile; do
sd=${a%/*}
cd $sd
pa=$($GMAKE show=ALL_PKGOPTS) # pa: all subpackage options
for xu in $pa; do # xu: package option uppercase
x=$($GMAKE show=PKGNAME_$xu) # x: subpackage name
print -nr -- "$xu" >../pkglist.d/"$x"
done
cd ..
done
rm -f kdeps kaputt
for a in */Makefile; do
sd=${a%/*}
cd $sd
pa=$($GMAKE show=ALL_PKGOPTS) # pa: all subpackage options
for xu in $pa; do # xu: package option uppercase
x=$($GMAKE show=PKGNAME_$xu) # x: subpackage name
deps=$($GMAKE show=PKGDEPS_$xu)
for dep in $deps; do
if [[ $dep = kmod-* ]]; then
print $x $dep >>../kdeps
continue
fi
[[ -e ../pkglist.d/$dep ]] || print $x $dep >>../kaputt
done
done
cd ..
done
|