|
|
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: $! Build the GNU "C" pre-processor on VMS
6: $!
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:
10: $
11: $!
12: $! C compiler
13: $!
14: $ CC := gcc
15: $! CC := cc !uncomment for VAXC
16: $ BISON := bison
17: $ RENAME := rename
18: $ LINK := link
19: $!
20: $! Compiler options
21: $!
22: $ CFLAGS = "/debug/incl=([],[.config.])"
23: $! CFLAGS = "/noopt/incl=([],[.config])" !uncomment for VAXC
24: $!
25: $! Link options
26: $!
27: $ LDFLAGS := /nomap
28: $!
29: $! Link libraries
30: $!
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
33: $
34: $ if "''p1'" .eqs. "LINK" then goto Link
35: $ 'CC 'CFLAGS cccp.c
36: $ t1:='f$search("CEXP.C")'
37: $ if "''t1'" .eqs. "" then goto 10$
38: $ t1:='f$file_attributes("CEXP.Y","RDT")'
39: $ t1:='f$cvtime(t1)'
40: $ t2:='f$file_attributes("CEXP.C","RDT")'
41: $ t2:='f$cvtime(t2)'
42: $ if t1 .les. t2 then goto 20$
43: $ 10$:
44: $ bison cexp.y
45: $ rename cexp_tab.c cexp.c
46: $ 20$:
47: $!
48: $ if f$locate("alloca.obj",f$edit(LIBS,"lowercase")).lt.f$length(LIBS) then -
49: 'CC 'CFLAGS /define="STACK_DIRECTION=(-1)" alloca.c
50: $!
51: $ 'CC 'CFLAGS cexp.c
52: $ 'CC 'CFLAGS version.c
53: $ Link:
54: $ link 'LDFLAGS /exe=gcc-cpp cccp,cexp,version,version.opt/opt,'LIBS'
55: $!
56: $! Done
57: $!
58: $ exit
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.