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")'
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.
9 $! Bj|rn Larsen blarsen@ifi.uio.no
10 $! With some contributions by Gabor Karsai,
11 $! KARSAIG1%VUENGVAX.BITNET@jade.berkeley.edu
12 $! All merged and cleaned by RMS.
14 $! Adapted for both VAX-11 "C" and VMS/GCC compilation by
15 $! David L. Kashtan kashtan.iu.ai.sri.com
17 $! First we try to sense which C compiler we have available. Sensing logic
18 $! borrowed from Emacs.
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
26 $ cc_options:="/NOLIST/define=(""index=strchr"",""rindex=strrchr"")"
27 $ extra_linker_files:="VMSHLP,"
31 $gcc nla0:compiler_check.c
32 $if $status.eq.%x38090 then goto whoops
34 $ cc_options:="/DEBUG"
35 $ extra_linker_files:="GNU_CC:[000000]GCCLIB/LIB,"
39 $write sys$output "You must have a C compiler to build BISON. Sorry."
49 $if f$search("compiler_check.obj").nes."" then dele/nolog compiler_check.obj;
50 $write sys$output "Building BISON with the ''cc' compiler."
52 $! Do the compilation (compiler type is all set up)
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
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
81 $! Generate bison.hlp (for online help).