From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- pkg/vocl/mkpkg | 226 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 pkg/vocl/mkpkg (limited to 'pkg/vocl/mkpkg') diff --git a/pkg/vocl/mkpkg b/pkg/vocl/mkpkg new file mode 100644 index 00000000..8658ad8e --- /dev/null +++ b/pkg/vocl/mkpkg @@ -0,0 +1,226 @@ +# Make the CL. + +$call relink # make vocl.e in current directory +$exit + +update: # make vocl.e and install in bin$ + $ifeq (MACH, sparc) then + $set XFLAGS = "$(XFLAGS) -/DNO_READLINE" + $endif + $call relink + $call install + ; + +relink: + # [MACHDEP] The following is machine dependent, but is exercised only + # on our software development system when changes are made to the + # grammar of the CL. On other systems the files lexyy.c, ytab.c, and + # ytab.h may be used without modification. + + $ifeq (hostid, unix) + $ifolder (lexyy.c, grammar.l) + $echo "rebuilding lexyy.c" + !lex -t grammar.l | sed -f lex.sed > lexyy.c + $endif + $ifolder (ytab.c, grammar.y) + $echo "rebuilding ytab.c" + $ifeq (MACH, linux, redhat, suse) + !yacc -vd grammar.y; + !egrep -v "\" y.tab.c > ytab.c; + !egrep -v "\" ytab.c > ntab.c; mv ntab.c ytab.c + !mv y.tab.h ytab.h + $else + !yacc -vd grammar.y; mv y.tab.c ytab.c; mv y.tab.h ytab.h + $endif + $endif + $endif + + $ifeq (siteid, stsci) + $ifeq (hostid, vms) + $ifolder (lexyy.c, grammar.l) + $echo "rebuilding lexyy.c" + !lex grammar.l + !@lex.com + $endif + $ifolder (ytab.c, grammar.y) + $echo "rebuilding ytab.c" + !yacc -vd grammar.y + $endif + $endif + $endif + + $ifeq (MACH, sparc) then + $set XFLAGS = "$(XFLAGS) -/DNO_READLINE" + $endif + + $update libpkg.a + + #$set xflags = "$(xflags) -x -/DYYDEBUG" + $set xflags = "$(xflags) -x -/I../../vendor/ -I./" + $omake vocl.x + $omake globals.c \ + construct.h eparam.h operand.h param.h task.h + $omake opcodes.c config.h\ + construct.h errs.h grammar.h mem.h opcodes.h operand.h\ + param.h task.h +link: + $set LIBS = "-lc -lcur -lds -lstg" + $ifneq (MACH, sparc) then + $ifeq (MACH, linux) then + $set LIBS2 = "-/L/usr/lib32 -lreadline -lncurses" + $else + $set LIBS2 = "-lreadline -lncurses" + $endif + $else + $set LIBS2 = "" + $endif + $link vocl.o globals.o opcodes.o libpkg.a $(LIBS) $(LIBS2) + ; + +install: + $move vocl.e bin$ + ; + +libpkg.a: + #$set xflags = "$(xflags) -qx -/DYYDEBUG" + $set xflags = "$(xflags) -x -/I../../vendor/ -I./" + + binop.c \ + config.h\ + operand.h errs.h + + bkg.c \ + \ + clmodes.h config.h operand.h clmodes.h\ + mem.h errs.h param.h task.h + + builtin.c \ + \ + clmodes.h\ + config.h mem.h operand.h param.h task.h errs.h + + clprintf.c \ + config.h operand.h param.h\ + task.h errs.h + + clsystem.c \ + errs.h + + compile.c config.h\ + operand.h opcodes.h mem.h errs.h + + debug.c \ + operand.h mem.h grammar.h opcodes.h config.h param.h\ + task.h + + decl.c \ + clmodes.h operand.h mem.h grammar.h opcodes.h config.h\ + param.h task.h errs.h construct.h ytab.h + + edcap.c \ + config.h operand.h\ + param.h task.h eparam.h + + eparam.c \ + \ + config.h mem.h operand.h\ + errs.h param.h grammar.h task.h eparam.h + + errs.c \ + \ + clmodes.h\ + config.h operand.h param.h task.h mem.h errs.h\ + grammar.h construct.h + + exec.c \ + clmodes.h config.h mem.h\ + opcodes.h operand.h param.h task.h errs.h\ + grammar.h + + gquery.c \ + config.h operand.h param.h grammar.h\ + task.h clmodes.h + + gram.c \ + clmodes.h operand.h mem.h grammar.h\ + opcodes.h config.h param.h task.h errs.h construct.h\ + ytab.h + + history.c \ + config.h errs.h\ + mem.h operand.h param.h task.h clmodes.h grammar.h + + lists.c \ + config.h mem.h operand.h param.h\ + task.h errs.h + + main.c \ + \ + \ + grammar.h\ + opcodes.h operand.h param.h config.h clmodes.h task.h\ + errs.h mem.h + + modes.c \ + clmodes.h\ + config.h construct.h operand.h param.h grammar.h\ + mem.h task.h errs.h + + multop.c \ + clmodes.h operand.h mem.h grammar.h\ + opcodes.h config.h param.h task.h errs.h construct.h\ + ytab.h + + operand.c \ + errs.h config.h operand.h param.h grammar.h\ + mem.h task.h construct.h eparam.h + + param.c \ + config.h operand.h param.h grammar.h mem.h\ + task.h errs.h clmodes.h construct.h + + pfiles.c \ + config.h\ + errs.h operand.h mem.h param.h task.h grammar.h + + prcache.c \ + \ + config.h errs.h task.h + + scan.c \ + config.h operand.h param.h grammar.h\ + task.h errs.h + + stack.c \ + mem.h operand.h config.h param.h task.h\ + errs.h + + task.c \ + config.h operand.h param.h mem.h task.h\ + errs.h clmodes.h + + unop.c \ + config.h\ + operand.h errs.h task.h param.h + + ytab.c \ + config.h mem.h operand.h\ + param.h grammar.h opcodes.h clmodes.h task.h\ + construct.h errs.h lexyy.c lexicon.c + + + # VO-related sources. + + builtin_vo.c config.h clmodes.h mem.h operand.h opcodes.h \ + param.h task.h errs.h + + voclient.c config.h clmodes.h operand.h mem.h grammar.h \ + opcodes.h param.h task.h errs.h \ + construct.h ytab.h + + samp.c clsamp.h + sampCmd.c clsamp.h + sampFuncs.c clsamp.h + sampHandlers.c clsamp.h + ; + -- cgit