#!/bin/sh

DIR=$1
shift
DIR=${*:+${DIR:-.}/}

rm -f profinit.h

for a in ${*:--};
    do cat $DIR$a |
	${EGREP:-egrep} '^[\t ]*PROF(PUSH)?\("[^"]+"\)' |
	sed 's/^[\t ]*PROF[PUSH]*("\([^"]*\)").*$/\1/' |
	sort | uniq |
	(while read X; do echo "PS(\"$X\");";done) >>profinit.h
    done
