aboutsummaryrefslogtreecommitdiff
path: root/pkg/ecl/mkpkg
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/ecl/mkpkg
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'pkg/ecl/mkpkg')
-rw-r--r--pkg/ecl/mkpkg206
1 files changed, 206 insertions, 0 deletions
diff --git a/pkg/ecl/mkpkg b/pkg/ecl/mkpkg
new file mode 100644
index 00000000..1a360c8a
--- /dev/null
+++ b/pkg/ecl/mkpkg
@@ -0,0 +1,206 @@
+# Make the CL.
+
+$call relink # make ecl.e in current directory
+$exit
+
+update: # make ecl.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 "\<stdlib.h\>" y.tab.c > ytab.c;
+ !egrep -v "\<stdio.h\>" 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"
+ $omake ecl.x
+ $omake globals.c <libc/libc.h> <libc/stdio.h> <libc/spp.h>\
+ construct.h eparam.h operand.h param.h task.h
+ $omake opcodes.c <libc/libc.h> <libc/spp.h> <libc/stdio.h> 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 ecl.o globals.o opcodes.o libpkg.a $(LIBS) $(LIBS2)
+ ;
+
+install:
+ $move ecl.e bin$
+ ;
+
+libpkg.a:
+ #$set xflags = "$(xflags) -qx -/DYYDEBUG"
+ $set xflags = "$(xflags) -qx"
+
+ binop.c <libc/spp.h> <libc/libc.h> <libc/xnames.h>\
+ <libc/math.h> <libc/ctype.h> config.h\
+ operand.h errs.h
+
+ bkg.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ <libc/knames.h> <libc/xwhen.h> <libc/ctype.h>\
+ clmodes.h config.h operand.h clmodes.h\
+ mem.h errs.h param.h task.h
+
+ builtin.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
+ <libc/error.h> <libc/ctype.h> <libc/stdio.h>\
+ <libc/alloc.h> <libc/ttset.h> clmodes.h\
+ config.h mem.h operand.h param.h task.h errs.h
+
+ clprintf.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ config.h operand.h param.h\
+ task.h errs.h
+
+ clsystem.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ errs.h
+
+ compile.c <libc/spp.h> <libc/libc.h> config.h\
+ operand.h opcodes.h mem.h errs.h
+
+ debug.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ operand.h mem.h grammar.h opcodes.h config.h param.h\
+ task.h
+
+ decl.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ clmodes.h operand.h mem.h grammar.h opcodes.h config.h\
+ param.h task.h errs.h construct.h ytab.h
+
+ edcap.c <libc/stdio.h> <libc/libc.h> <libc/ctype.h>\
+ <libc/fset.h> <libc/spp.h> config.h operand.h\
+ param.h task.h eparam.h
+
+ eparam.c <libc/stdio.h> <libc/libc.h> <libc/error.h>\
+ <libc/ctype.h> <libc/ttset.h> <libc/fset.h>\
+ <libc/spp.h> config.h mem.h operand.h\
+ errs.h param.h grammar.h task.h eparam.h
+
+ errs.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
+ <libc/stdio.h> <libc/setjmp.h> <libc/knames.h>\
+ <libc/xnames.h> clmodes.h\
+ config.h operand.h param.h task.h mem.h errs.h\
+ grammar.h construct.h
+
+ exec.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ <libc/xwhen.h> clmodes.h config.h mem.h\
+ opcodes.h operand.h param.h task.h errs.h\
+ grammar.h
+
+ gquery.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ config.h operand.h param.h grammar.h\
+ task.h clmodes.h
+
+ gram.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ clmodes.h operand.h mem.h grammar.h\
+ opcodes.h config.h param.h task.h errs.h construct.h\
+ ytab.h
+
+ history.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ <libc/fset.h> <libc/ctype.h> config.h errs.h\
+ mem.h operand.h param.h task.h clmodes.h grammar.h
+
+ lists.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ config.h mem.h operand.h param.h\
+ task.h errs.h
+
+ main.c <libc/spp.h> <libc/libc.h> <libc/fset.h>\
+ <libc/main.h> <libc/stdio.h> <libc/error.h>\
+ <libc/setjmp.h> <libc/knames.h> <libc/prtype.h>\
+ <libc/xwhen.h> <libc/xnames.h> grammar.h\
+ opcodes.h operand.h param.h config.h clmodes.h task.h\
+ errs.h mem.h
+
+ modes.c <libc/spp.h> <libc/libc.h>\
+ <libc/stdio.h> <libc/ctype.h> clmodes.h\
+ config.h construct.h operand.h param.h grammar.h\
+ mem.h task.h errs.h
+
+ operand.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ errs.h config.h operand.h param.h grammar.h\
+ mem.h task.h construct.h eparam.h
+
+ param.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ config.h operand.h param.h grammar.h mem.h\
+ task.h errs.h clmodes.h construct.h
+
+ pfiles.c <libc/spp.h> <libc/libc.h> <libc/finfo.h>\
+ <libc/stdio.h> <libc/ctype.h> config.h\
+ errs.h operand.h mem.h param.h task.h grammar.h
+
+ prcache.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ <libc/error.h> <libc/finfo.h> <libc/prstat.h>\
+ config.h errs.h task.h
+
+ scan.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ config.h operand.h param.h grammar.h\
+ task.h errs.h
+
+ stack.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ mem.h operand.h config.h param.h task.h\
+ errs.h
+
+ task.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ config.h operand.h param.h mem.h task.h\
+ errs.h clmodes.h
+
+ unop.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ <libc/xnames.h> <libc/math.h> config.h\
+ operand.h errs.h task.h param.h
+
+ ytab.c <libc/spp.h> <libc/libc.h> <libc/stdio.h>\
+ <libc/ctype.h> config.h mem.h operand.h\
+ param.h grammar.h opcodes.h clmodes.h task.h\
+ construct.h errs.h lexyy.c lexicon.c
+ ;
+