Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
#!/bin/sh
2
###############################################################################
3
if [ "${#}" != "2" ]
4
then
5
	echo "`basename $0`: usage: object-directory output-file" >&2
6
	exit 1
7
fi
8
OBJECTS="${1}"
9
SHORTFILE="${2}"
10
 
11
find "${OBJECTS}" -name '*.o' -print -exec nm '{}' ';' |
12
	awk '
13
BEGIN {
14
	printf ("/* Automatically generated by 'build_shortnames'. */\n");
15
}
16
$1 ~ /\.o$/ {
17
	printf ("/* From file '%s': */\n", $1);
18
}
19
$2 ~ /^[TSDCB]$/ {
20
	printf ("#define %s I%05d\n", substr ($3, 2), id ++);
21
}' > ${SHORTFILE}