File: buildvms.com

package info (click to toggle)
gnuplot 3.5beta6.347-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 5,032 kB
  • ctags: 4,235
  • sloc: ansic: 42,086; makefile: 561; asm: 539; sh: 386; objc: 379; csh: 297; pascal: 194; perl: 138; lisp: 88
file content (169 lines) | stat: -rw-r--r-- 5,582 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
$ ! for batch operation, set default to the gnuplot directory
$ !
$ ! buildvms.com
$ ! Command file to compile/link gnuplot, gnuplot_x11, and make gnuplot.hlb
$ !
$ ! lph: modified for compatibility with VMS 4.x (which lacks 'if ... endif'),
$ ! but made the default DECC
$ !
$! set noon
$ ON ERROR THEN GOTO FINISH
$!
$! detect compiler - drd
$! if DECC is around, assume that, else gcc is preferred. Finally vaxc
$ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "")
$ its_gnuc = 0	 ! comment out the next line to use VAXC if gcc is also present 
$ its_gnuc = .not.its_decc .and. (f$trnlnm("gnu_cc").nes."")
$ its_vaxc = .not. (its_decc .or. its_gnuc)
$ its_decw = (f$trnlnm("DECW$INCLUDE") .nes. "") 
$!
$! configure
$
$ pfix = "/prefix=all"
$ rtl  = "DECCRTL"
$   if .NOT. its_decc then pfix = "/nolist"
$   if .NOT. its_decc then rtl  = "VAXCRTL"
$!
$ x11 = ""
$ if its_decw then x11 = "X11,"
$! 
$!-----------------------------------------------------------------
$!-----------------------------------------------------------------
$! customize CFLAGS for version of VMS, CRTL, and C compiler.
$!-----------------------------------------------------------------
$!  these defines work for OpenVMS Alpha v6.2 and DEC C v5.3
$ CFLAGS = "/define=(ANSI_C,HAVE_LGAMMA,HAVE_ERF,HAVE_UNISTD_H,HAVE_GETCWD,HAVE_SLEEP,"-
  +"''x11'NO_GIH,PIPES,DECCRTL)''pfix'/warnings=disable=ADDRCONSTEXT"
$!
$!-----------------------------------------------------------------
$!
$! A generic starting point 
$!-----------------------------------------------------------------
$!
$!$ CFLAGS = "/NOWARN/NOOP/DEFINE=(''x11'NO_GIH,PIPES,''rtl')''pfix'"
$!
$! ----------------------------------------------------------------
$!
$! For  VMS 4.7 and VAX C v2.4  
$! ("Compiler abort - virtual memory limits exceeded" if attempt
$!  to include all applicable terminals, but otherwise builds OK.  
$!  Runtime problem: an exit handler error, also w/ gcc build;
$!  a VAXCRTL atexit bug?)
$!
$! Note: VAX uses  D_FLOAT, maximum exponent ca 10e +/- 38;
$!       will cause problems with some of the demos
$!
$!$ CFLAGS    = "/NOOP/DEFINE=(NO_STRSTR, NO_SYS_TYPES_H, "-
$!               +"HAVE_GETCWD, HAVE_SLEEP, NO_LOCALE_H,"-
$!               +"NO_ALL_TERM_H, NO_GIH,PIPES, ''rtl')"
$!$!
$!
$!-----------------------------------------------------------------
$!
$! This will build with gcc v1.42 on VMS 4.7
$! (no virtual memory limit problem)
$!
$! gcc v1.42 string.h can prefix str routines w/ gnu_ (ifdef GCC_STRINGS)
$! but the routines in GCCLIB are not prefixed w/ gcc_  :-(
$! link with GCCLIB, then ignore the link warnings about multiple
$! definitions of STR... in C$STRINGS
$!
$! GCC v1.42 has a locale.h, but neither gcc nor VMS v4.7 VAXCRTL has 
$! the  setlocale function
$!           
$!
$! Note: _assert.c defines assert_gcc, if ndef NDEBUG, but
$!        cgm.trm undefines NDEBUG, so we always compile/link  _assert.c
$!
$!$ CFLAGS    = "/NOOP/DEFINE=(''x11'NO_STRSTR, HAVE_GETCWD,"-
$!		+" HAVE_SLEEP, NO_LOCALE_H, NO_GIH, PIPES, ''rtl')"
$!
$!-----------------------------------------------------------------
$!-----------------------------------------------------------------
$!
$ TERMFLAGS = "/INCLUDE=([],[.term])"
$
$ EXTRALIB = ""
$ if its_gnuc then cc := GCC/NOCASE
$ if its_gnuc then EXTRALIB = ",[]_assert,GNU_CC:[000000]GCCLIB/LIB"
$ 
$
$ CFLAGS="''cflags'" + "''pfix'"
$ LINKOPT=""
$!
$ if .NOT. its_decc then -
      LINKOPT=",sys$disk:[]linkopt.vms/opt"
$!
$!
$ if its_decw then DEFINE/NOLOG X11 DECW$INCLUDE
$ if its_decw then DEFINE/NOLOG SYS SYS$LIBRARY
$!
$ set verify
$ cc 'CFLAGS' alloc.c
$ cc 'CFLAGS' binary.c
$ cc 'CFLAGS' bitmap.c
$ cc 'CFLAGS' command.c
$ cc 'CFLAGS' contour.c
$ cc 'CFLAGS' datafile.c
$ cc 'CFLAGS' eval.c
$ cc 'CFLAGS' fit.c
$ cc 'CFLAGS' graphics.c
$ cc 'CFLAGS' graph3d.c
$ cc 'CFLAGS' hidden3d.c
$ cc 'CFLAGS' internal.c
$ cc 'CFLAGS' interpol.c
$ cc 'CFLAGS' matrix.c
$ cc 'cflags' misc.c
$ cc 'CFLAGS' parse.c
$ cc 'CFLAGS' plot.c
$ cc 'CFLAGS' plot2d.c
$ cc 'CFLAGS' plot3d.c
$ cc 'CFLAGS' scanner.c
$ cc 'CFLAGS' set.c
$ cc 'CFLAGS' show.c
$ cc 'CFLAGS' specfun.c
$ cc 'CFLAGS' standard.c
$ cc 'CFLAGS' stdfn.c
$ cc 'cflags' 'TERMFLAGS' term.c
$ cc 'cflags' time.c
$ cc 'CFLAGS' util.c
$ cc 'CFLAGS' util3d.c
$ cc 'CFLAGS' version.c
$ cc 'CFLAGS' vms.c
$ if its_gnuc then cc 'CFLAGS' GNU_CC_INCLUDE:[000000]_assert.c
$!
$ link/exe=gnuplot -
bitmap,command,contour,eval,graphics,graph3d,vms,-
binary,specfun,interpol,fit,matrix,internal,misc,parse,-
plot,plot2d,plot3d,scanner,set,show,datafile,alloc,-
standard,stdfn,term,util,version,util3d,hidden3d,time'extralib''LINKOPT'
$!
$ cc 'CFLAGS' bf_test.c
$ link /exe=bf_test bf_test,binary,alloc 'extralib''LINKOPT'
$ ren bf_test.exe [.demo]
$ if .NOT. its_decw  then goto do_docs 
$!
$ CC 'CFLAGS' GPLT_X11
$ LINK /exe=GNUPLOT_X11 gplt_x11 'extralib''LINKOPT',SYS$INPUT:/OPT
SYS$SHARE:DECW$XLIBSHR/SHARE
$!
$DO_DOCS:
$ SET DEF [.DOCS]
$ if f$locate("ALL_TERM_DOC",CFLAGS).ne.f$length(CFLAGS) then -
	copy /concatenate [-.term]*.trm []allterm.h
$ cc 'CFLAGS' /OBJ=doc2rnh.obj/include=([],[-],[-.term]) doc2rnh.c 
$ SET DEF [-]		! LINKOPT is defined as being in []
$ link [.docs]doc2rnh /exe=[.docs]doc2rnh 'extralib''LINKOPT'
$ doc2rnh := $sys$disk:[.docs]doc2rnh
$ doc2rnh [.docs]gnuplot.doc [.docs]gnuplot.rnh
$ RUNOFF [.docs]gnuplot.rnh
$ library/create/help sys$disk:[]gnuplot.hlb gnuplot.hlp
$!
$ run [.demo]bf_test
$ if its_decw then -
  write sys$output "%define GNUPLOT_X11 :== $Disk:[directory]GNUPLOT_X11"
$!
$FINISH:
$ set noverify
$ if its_decw then deassign x11
$ exit