$!----------------------------------------------------------------------------- $! BUILD_SOYMAIL.COM $! $! Build the soyMAIL executable. $! $! DEC C V5.6-003 on OpenVMS Alpha V8.2 has been reported as producing $! a number of portability warning messages not issued by later versions $! of the compiler, i.e. $! $! HP C V7.1-015 on OpenVMS Alpha V8.3 $! Compaq C V6.4-008 on OpenVMS Alpha V7.3 $! HP C V7.1-011 on OpenVMS IA64 V8.3 $! Compaq C V6.4-005 on OpenVMS VAX V7.2 $! Compaq C V6.4-005 on OpenVMS VAX V7.3 $! $! The parameter NOWARNINGS can be added to the procedure command line $! to suppress the warnings under these circumstances. Warnings under $! the compiler versions listed above, or later, should be investigated. $! $! P1-4 == BUILD, COMPILE, LINK or empty (builds) $! $! 21-MAR-2007 MGD add NOWARNINGS for older compiler versions $! 07-OCT-2006 MGD LOGIN.C module contortions $! 08-MAR-2006 MGD workaround system logical LANG and lang.c module $! 01-FEB-2005 MGD initial (soymail) $!----------------------------------------------------------------------------- $! $ IF P1 .EQS. "DIST" $ THEN $! (distribution build - not used on your average site) $ @BUILD_SOYMAIL $ @BUILD_SOYMAIL JUST:LOGIN LOGIN_ACME=0 $ EXIT $ ENDIF $! $!(marshal the build parameters) $ BUILD = "BUILD" $ IF P1 .EQS. "BUILD" THEN BUILD = P1 $ IF P2 .EQS. "BUILD" THEN BUILD = P2 $ IF P3 .EQS. "BUILD" THEN BUILD = P3 $ IF P4 .EQS. "BUILD" THEN BUILD = P4 $ IF P1 .EQS. "COMPILE" THEN BUILD = P1 $ IF P2 .EQS. "COMPILE" THEN BUILD = P2 $ IF P3 .EQS. "COMPILE" THEN BUILD = P3 $ IF P4 .EQS. "COMPILE" THEN BUILD = P4 $ IF P1 .EQS. "LINK" THEN BUILD = P1 $ IF P2 .EQS. "LINK" THEN BUILD = P2 $ IF P3 .EQS. "LINK" THEN BUILD = P3 $ IF P4 .EQS. "LINK" THEN BUILD = P4 $ WARNINGS = "" $ IF P1 .EQS. "NOWARNINGS" THEN WARNINGS = " /" + P1 $ IF P2 .EQS. "NOWARNINGS" THEN WARNINGS = " /" + P2 $ IF P3 .EQS. "NOWARNINGS" THEN WARNINGS = " /" + P3 $ IF P4 .EQS. "NOWARNINGS" THEN WARNINGS = " /" + P4 $ JUST = "" $ IF F$ELEMENT(0,":",P1) .EQS. "JUST" THEN JUST = F$ELEMENT(1,":",P1) $ IF F$ELEMENT(0,":",P2) .EQS. "JUST" THEN JUST = F$ELEMENT(1,":",P2) $ IF F$ELEMENT(0,":",P3) .EQS. "JUST" THEN JUST = F$ELEMENT(1,":",P3) $ IF F$ELEMENT(0,":",P4) .EQS. "JUST" THEN JUST = F$ELEMENT(1,":",P4) $! $ DATETIME = F$TIME() $ IF F$EXTRACT(0,1,DATETIME) .EQS. " " THEN DATETIME = F$EXTRACT(1,99,DATETIME) $! $ ON CONTROLY THEN EXIT 44 $! $ WRITE SYS$OUTPUT "" $ WRITE SYS$OUTPUT "Building ""soyMAIL"" for ""''F$GETSYI("ARCH_NAME")'""" $! $ ARCH_NAME = F$EDIT(F$GETSYI("ARCH_NAME"),"UPCASE") $ IF ARCH_NAME .EQS. "ALPHA" THEN ARCH_NAME = "AXP" $! $ VMS_VERSION = F$GETSYI("VERSION") $ VMS_VERSION = F$INTEGER(F$EXTRACT(1,1,VMS_VERSION)) * 10 +- F$INTEGER(F$EXTRACT(3,1,VMS_VERSION)) $! $ CC_DEFINES = "/DEFINE=(SOYMAIL_VMS_V6,BUILD_DATETIME=""""""''DATETIME'"""""")" $! $ LINK_OPTIONS = F$SEARCH("SOYMAIL_''ARCH_NAME'.OPT") $ IF LINK_OPTIONS .NES. "" - THEN LINK_OPTIONS = "," + F$ELEMENT(0,";",LINK_OPTIONS) + "/OPTIONS" $! $ IF F$SEARCH("OBJ_''ARCH_NAME'.DIR") .EQS. "" - THEN CREATE/DIR [.OBJ_'ARCH_NAME'] $ OBJECT_DIR = "[.OBJ_''ARCH_NAME']" $! $ IF JUST .EQS. "" .AND. BUILD .NES. "LINK" $ THEN $ DELETE = "DELETE/LOG" $ DELETE 'OBJECT_DIR'*.OBJ;* $ ENDIF $! $ IF F$EDIT(F$GETSYI("ARCH_NAME"),"UPCASE") .EQS. "VAX" $ THEN $ CC_OPTIONS = "/DECC /OPT /STAND=RELAXED /PREFIX=ALL''WARNINGS' /INC=[]" $ ELSE $ CC_OPTIONS = "/DECC /OPT /STAND=RELAXED /PREFIX=ALL''WARNINGS' /INC=[] " $ ENDIF $! $ IF BUILD .EQS. "BUILD" .OR. BUILD .EQS. "COMPILE" $ THEN $ SET NOON $ CC /VERSION NL: $ SET VERIFY $!(compile soymail components) $ IF JUST .NES. "" THEN GOTO 'JUST' $ ADDRESS: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' address $ IF JUST .NES. "" THEN GOTO END_JUST $ ATTACH: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' attach $ IF JUST .NES. "" THEN GOTO END_JUST $ CALLMAIL: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' CallMail $ IF JUST .NES. "" THEN GOTO END_JUST $ CEREAL: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' cereal $ IF JUST .NES. "" THEN GOTO END_JUST $ CGILIB: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' CGILIB $ IF JUST .NES. "" THEN GOTO END_JUST $ COMPOSE: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' compose $ IF JUST .NES. "" THEN GOTO END_JUST $ CONFIG: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' config $ IF JUST .NES. "" THEN GOTO END_JUST $ CONTACTS: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' contacts $ IF JUST .NES. "" THEN GOTO END_JUST $ DRAFT: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' draft $ IF JUST .NES. "" THEN GOTO END_JUST $ FOLDER: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' folder $ IF JUST .NES. "" THEN GOTO END_JUST $ GMT: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' gmt $ IF JUST .NES. "" THEN GOTO END_JUST $ HELP: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' help $ IF JUST .NES. "" THEN GOTO END_JUST $ HTML: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' html $ IF JUST .NES. "" THEN GOTO END_JUST $ INETMAIL: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' inetmail $ IF JUST .NES. "" THEN GOTO END_JUST $ LANG: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' []lang $ IF JUST .NES. "" THEN GOTO END_JUST $ LOGIN: $ LOGIN_OBJ = "login_acme" $ IF VMS_VERSION .LT. 73 THEN LOGIN_OBJ = "login_sysuaf" $ IF ARCH_NAME .EQS. "VAX" THEN LOGIN_OBJ = "login_sysuaf" $ IF P2 .EQS. "LOGIN_ACME=0" THEN LOGIN_OBJ = "login_sysuaf" $ CC_DEFS = CC_DEFINES $ IF LOGIN_OBJ .EQS. "login_sysuaf" THEN CC_DEFS = CC_DEFS - ")" + ",LOGIN_ACME=0)" $ CC 'CC_OPTIONS' 'CC_DEFS' /OBJ='OBJECT_DIR''login_obj' login $ IF JUST .NES. "" THEN GOTO END_JUST $ MAINMENU: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' mainmenu $ IF JUST .NES. "" THEN GOTO END_JUST $ MESSAGE: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' message $ IF JUST .NES. "" THEN GOTO END_JUST $ MIMEDEC: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' mimedec $ IF JUST .NES. "" THEN GOTO END_JUST $ MIMEENC: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' mimeenc $ IF JUST .NES. "" THEN GOTO END_JUST $ MTA: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' mta $ IF JUST .NES. "" THEN GOTO END_JUST $ NEWMAIL: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' newmail $ IF JUST .NES. "" THEN GOTO END_JUST $ OPTIONS: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' options $ IF JUST .NES. "" THEN GOTO END_JUST $ OTHER: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' other $ IF JUST .NES. "" THEN GOTO END_JUST $ PUBLIC: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' public $ IF JUST .NES. "" THEN GOTO END_JUST $ REGEX: $ REGEX_DEFINES = CC_DEFINES - ")" + "," + "STDC_HEADERS,REGEX_MALLOC)" $ CC 'CC_OPTIONS' 'REGEX_DEFINES' /OBJ='OBJECT_DIR' regex $ IF JUST .NES. "" THEN GOTO END_JUST $ RC4: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' rc4 $ IF JUST .NES. "" THEN GOTO END_JUST $ REQUEST: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' request $ IF JUST .NES. "" THEN GOTO END_JUST $ SENDMAIL: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' sendmail $ IF JUST .NES. "" THEN GOTO END_JUST $ SOYMAIL: $ CC 'CC_OPTIONS' 'CC_DEFINES' /OBJ='OBJECT_DIR' soyMAIL $ IF JUST .NES. "" THEN GOTO END_JUST $ SEARCH: $ REGEX_DEFINES = CC_DEFINES - ")" + "," + "STDC_HEADERS,REGEX_MALLOC)" $ CC 'CC_OPTIONS' 'REGEX_DEFINES' /OBJ='OBJECT_DIR' search $ IF JUST .NES. "" THEN GOTO END_JUST $! $ ENDIF $! $ IF BUILD .EQS. "BUILD" .OR. BUILD .EQS. "LINK" $ THEN $ LOGIN_OBJ = "login_acme" $ IF VMS_VERSION .LT. 73 THEN LOGIN_OBJ = "login_sysuaf" $ IF ARCH_NAME .EQS. "VAX" THEN LOGIN_OBJ = "login_sysuaf" $ IF P2 .EQS. "LOGIN_ACME=0" THEN LOGIN_OBJ = "login_sysuaf" $ LINK_OPTIONS = "" $ SET NOON $ SET VERIFY $! (linking vanilla version) $ LINK/NOTRACE/EXECUTABLE='OBJECT_DIR'SOYMAIL.EXE - 'OBJECT_DIR'address,attach,callmail,cereal,CGILIB,compose,config,- contacts,draft,folder,GMT,help,HTML,inetmail,- 'OBJECT_DIR'lang,'login_obj',mainmenu,message,mimedec,newmail,- mimeenc,mta,options,other,public,regex,RC4,request,sendmail,- soyMAIL,search $! 'F$VERIFY(0) $ SET ON $ ENDIF $ PURGE/NOLOG 'OBJECT_DIR' $ END_JUST: $!'F$VERIFY(0) $! $!-----------------------------------------------------------------------------