blob: 7d61264bd350e151d2405ffca66765923eedba95 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
# MKMLIST -- Make a library member list on the standard output, e.g., for
# inclusion in a MKPKG file.
_ml1() {
ls *.[xfcs]
grep '^include' *.x
}
_ml2() {
_ml1 | grep -v '#' | grep -v '<syserr.h>' | sort | uniq |\
sed -e 's/^.*include./ /' | sed -e 's/\"//g' |\
sed -e 's/\.x/.x /' | tr -s '\n ' '\t'
}
echo -n " "
_ml2 | sed -e 's/\( \)\([^<]\)/# \2/g' | tr '#' '\n' |\
sed -e 's/> </> </g'
|