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
17 $ RENAME= "rename/New_Version"
19 $ echo = "write sys$output"
23 $ CFLAGS = "/Debug/noVerbos"
24 $! CFLAGS = "/noOpt" !uncomment for VAXC
32 $ LIBS = "gnu_cc:[000000]gcclib.olb/Libr,sys$library:vaxcrtl.olb/Libr"
33 $! LIBS = "alloca.obj,sys$library:vaxcrtl.olb/Libr" !uncomment for VAXC
36 $! Nothing beyond this point should need any local configuration changes.
39 $ if "''p1'" .eqs. "LINK" then goto Link
40 $ echo " Building the preprocessor."
44 $ t1:='f$search("CEXP.C")'
45 $ if "''t1'" .eqs. "" then goto 10$
46 $ t1:='f$file_attributes("CEXP.Y","RDT")'
48 $ t2:='f$file_attributes("CEXP.C","RDT")'
50 $ if t1 .les. t2 then goto 20$
54 $ 'RENAME' cexp_tab.c cexp.c
58 $ if f$locate("alloca.obj",f$edit(LIBS,"lowercase")).lt.f$length(LIBS)
61 $ 'CC''CFLAGS'/Define="STACK_DIRECTION=(-1)" alloca.c !#'f$verify(1)
65 $ echo " (Ignore any warning about not finding file ""bison.simple"".)"
68 $ 'CC''CFLAGS' version.c
71 $ echo " Linking the preprocessor."
73 $ 'LINK''LDFLAGS'/Exe=gcc-cpp.exe cccp.obj,cexp.obj,version.obj,version.opt/Opt,-