# Copyright (c) 1991 - 1900.  The Regents of the University of
# California (Regents).  All Rights Reserved.
# H+
# 	Title	:  mkpkg
# 	Author	:  ericco
# 	Date	:  05/07/91
# 	Synopsis:  
# 	Keywords:
# 		@(#) mkpkg -r1.3 05/07/91 UCB SSL CEA EGOCS
# 	Revisions:
# 	mm/dd/yy   name		description
# 	04/08/94   tnk	std targets
# 	05/07/91   ericco	date and time created 91/05/07 14:08:24 by ericco
# H-
# 
#

#	Revised: 4/8/94

# Make libcea.a

$call preprocess
$call update
$call zzdebug
$exit

preprocess:
	$ifolder(eerror.x, euvlib$eerror.h)
		!awk 'BEGIN{print"#\tGenerated from euvlib$eerror.h.\n#\tRevised: %""G""%\n\ninclude <eerror.h>\nprocedure\teerror(e)\nint\t\te\n\nbegin\n  switch(e){"}/^define.*#/{printf"\tcase %s: call error(e,\"%s\")\n",$2,substr($0,index($0,$5))}END{print "\tdefault: call error(e,\"Unknown error number\")\n  }\nend"}' $euv/lib/eerror.h >eerror.x
	$endif
	;

update:
	$checkout	libcea.a euvbin$
	$update		libcea.a
	$checkin	libcea.a euvbin$
	;

libcea.a:
	eerror.x	<eerror.h>
	;

zzdebug:
	;
	
