|
|
1.1 ! root 1: $! Set the def dir to proper place for use in batch. Works for interactive too. ! 2: $flnm = f$enviroment("PROCEDURE") ! get current procedure name ! 3: $set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")' ! 4: $! ! 5: $! This command procedure compiles and links BISON for VMS. ! 6: $! BISON has been tested with VAXC version 2.3 and VMS version 4.5 ! 7: $! and on VMS 4.5 with GCC 1.12. ! 8: $! ! 9: $! Bj|rn Larsen [email protected] ! 10: $! With some contributions by Gabor Karsai, ! 11: $! KARSAIG1%[email protected] ! 12: $! All merged and cleaned by RMS. ! 13: $! ! 14: $! Adapted for both VAX-11 "C" and VMS/GCC compilation by ! 15: $! David L. Kashtan kashtan.iu.ai.sri.com ! 16: $! ! 17: $! First we try to sense which C compiler we have available. Sensing logic ! 18: $! borrowed from Emacs. ! 19: $! ! 20: $set noon !do not bomb if an error occurs. ! 21: $assign nla0: sys$output ! 22: $assign nla0: sys$error !so we do not get an error message about this. ! 23: $cc nla0:compiler_check.c ! 24: $if $status.eq.%x38090 then goto try_gcc ! 25: $ CC :== CC ! 26: $ cc_options:="/NOLIST/define=(""index=strchr"",""rindex=strrchr"")" ! 27: $ extra_linker_files:="VMSHLP," ! 28: $goto have_compiler ! 29: $! ! 30: $try_gcc: ! 31: $gcc nla0:compiler_check.c ! 32: $if $status.eq.%x38090 then goto whoops ! 33: $ CC :== GCC ! 34: $ cc_options:="/DEBUG" ! 35: $ extra_linker_files:="GNU_CC:[000000]GCCLIB/LIB," ! 36: $goto have_compiler ! 37: $! ! 38: $whoops: ! 39: $write sys$output "You must have a C compiler to build BISON. Sorry." ! 40: $deassign sys$output ! 41: $deassign sys$error ! 42: $exit %x38090 ! 43: $! ! 44: $! ! 45: $have_compiler: ! 46: $deassign sys$output ! 47: $deassign sys$error ! 48: $set on ! 49: $if f$search("compiler_check.obj").nes."" then dele/nolog compiler_check.obj; ! 50: $write sys$output "Building BISON with the ''cc' compiler." ! 51: $! ! 52: $! Do the compilation (compiler type is all set up) ! 53: $! ! 54: $ Compile: ! 55: $ if "''p1'" .eqs. "LINK" then goto Link ! 56: $ 'CC' 'cc_options' files.c ! 57: $ 'CC' 'cc_options' LR0.C ! 58: $ 'CC' 'cc_options' ALLOCATE.C ! 59: $ 'CC' 'cc_options' CLOSURE.C ! 60: $ 'CC' 'cc_options' CONFLICTS.C ! 61: $ 'CC' 'cc_options' DERIVES.C ! 62: $ 'CC' 'cc_options' VMSGETARGS.C ! 63: $ 'CC' 'cc_options' GRAM.C ! 64: $ 'CC' 'cc_options' LALR.C ! 65: $ 'CC' 'cc_options' LEX.C ! 66: $ 'CC' 'cc_options' MAIN.C ! 67: $ 'CC' 'cc_options' NULLABLE.C ! 68: $ 'CC' 'cc_options' OUTPUT.C ! 69: $ 'CC' 'cc_options' PRINT.C ! 70: $ 'CC' 'cc_options' READER.C ! 71: $ 'CC' 'cc_options' REDUCE.C ! 72: $ 'CC' 'cc_options' SYMTAB.C ! 73: $ 'CC' 'cc_options' WARSHALL.C ! 74: $ 'CC' 'cc_options' VERSION.C ! 75: $ if "''CC'" .eqs. "CC" then macro vmshlp.mar ! 76: $ Link: ! 77: $ link/exec=bison main,LR0,allocate,closure,conflicts,derives,files,- ! 78: vmsgetargs,gram,lalr,lex,nullable,output,print,reader,reduce,symtab,warshall,- ! 79: version,'extra_linker_files'sys$library:vaxcrtl/lib ! 80: $! ! 81: $! Generate bison.hlp (for online help). ! 82: $! ! 83: $runoff bison.rnh
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.