Commit bdb603c7 authored by Vincent Zweije's avatar Vincent Zweije
Browse files

Add clean tag creation script

parent 6328f7a7
......@@ -17,7 +17,7 @@ clean:
rm -Rf errors.err $(SYS)
tags: *.dcl *.icl ../compiler/*.dcl ../compiler/*.icl
cleantags $^ >$@
sh cleantags $^ >$@
%: $(SYS)/%.abc
@:
......
#!/bin/sh
# $Id$
if [ $# = 0 ]
then echo "usage: `basename $0` file.{icl,dcl} ... >tags" >&2
exit 1
fi
{ echo '!_DUMMY tags // ;" vi:set ts=32 noet:'
for f
do qf="`echo \"$f\" | sed -e 's:/:\\\\/:g'`"
sed -n -e "/^::[ ]*\<[A-Za-z0-9_]*\>/{" \
-e "s/^\(::[ ]*\<\([A-Za-z0-9_]*\)\>\).*/\2 $qf \/^\1\//" \
-e "s/ /\\\\t/g" \
-e "s/\\\\t/ /" \
-e "s/\\\\t/ /" \
-e p \
-e \} \
-e "/\<[A-Za-z0-9_]*\>[ ]*::/{" \
-e "s/.*\(\<\([A-Za-z0-9_]*\)\>[ ]*::\).*/\2 $qf \/\1\//" \
-e "s/ /\\\\t/g" \
-e "s/\\\\t/ /" \
-e "s/\\\\t/ /" \
-e p \
-e \} \
$f
done
} | sort
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment