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 $! Build the GNU "C" pre-processor on VMS
7 $! Note: to build with DEC's VAX C compiler, uncomment the 2nd CC, CFLAGS,
8 $! and LIBS alternatives, and also execute the following command:
9 $! DEFINE SYS SYS$LIBRARY:
15 $! CC := cc !uncomment for VAXC
22 $ CFLAGS = "/debug/incl=([],[.config.])"
23 $! CFLAGS = "/noopt/incl=([],[.config])" !uncomment for VAXC
31 $ LIBS := gnu_cc:[000000]gcclib.olb/libr,sys$library:vaxcrtl.olb/libr
32 $! LIBS := alloca.obj,sys$library:vaxcrtl.olb/libr !uncomment for VAXC
34 $ if "''p1'" .eqs. "LINK" then goto Link
36 $ t1:='f$search("CEXP.C")'
37 $ if "''t1'" .eqs. "" then goto 10$
38 $ t1:='f$file_attributes("CEXP.Y","RDT")'
40 $ t2:='f$file_attributes("CEXP.C","RDT")'
42 $ if t1 .les. t2 then goto 20$
45 $ rename cexp_tab.c cexp.c
48 $ if f$locate("alloca.obj",f$edit(LIBS,"lowercase")).lt.f$length(LIBS) then -
49 'CC 'CFLAGS /define="STACK_DIRECTION=(-1)" alloca.c
52 $ 'CC 'CFLAGS version.c
54 $ link 'LDFLAGS /exe=gcc-cpp cccp,cexp,version,version.opt/opt,'LIBS'