
# make ops2.h and token2.h for compilers
# that can't handle enums.

if [ -r /usr/lib/gcc-cpp ]; then
	 cpp=/usr/lib/gcc-cpp
elif [ -r /usr/local/gnu/lib/gcc-cpp ]; then
	cpp=/usr/local/gnu/lib/gcc-cpp
elif [ -r /usr/v9/lib/gcc-cpp ]; then
	cpp=/usr/v9/lib/gcc-cpp
elif [ -r /v/lib/gcc-cpp ]; then
	cpp=/v/lib/gcc-cpp
else
	echo $0: can\'t find gcc-cpp 1>&2; exit 1
fi

($cpp <<\End
#define xx(a,b,c,d,e,f,g) define a b
#define yy(a,b,c,d,e,f,g)
#include "token.h"
End
) | sed -e '/^#/d' -e '/^define/s//#define/' -e '/^[ 	]*$/d' >token2.h

($cpp <<\End
#define xxop(a,b,c,d,e,f) define a (b<<4)
#define yyop(a,b,c,d,e,f) define a ((b<<4)+c)
#include "ops.h"
End
) | sed -e '/^#/d' -e '/^define/s//#define/' -e '/^[ 	]*$/d' >ops2.h
