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