$!----------------------------------------------------------------------------- $! BUILD_CALENDAR.COM $! $! P1 == LINK or BUILD or empty (builds) $! $! Determines environment by looking for hints in the build procedure device $! so help things along by setting default to the environment concealed root. $! Suggested locations: WASD_ROOT:[SRC.MISC] $! WWW_ROOT:[SCRIPT_CODE.WASD] $! APACHE_ROOT:[WASD] $! $! 06-OCT-2004 MGD CGILIB object library $! 07-JUL-2001 MGD (in)directly support multiple environments $! CAUTION: CALENDAR support direct #include of CGILIB code $! (in part just as a check that this continues to work!) $!----------------------------------------------------------------------------- $! $ ON CONTROLY THEN EXIT 44 $! $ WRITE SYS$OUTPUT "" $ WRITE SYS$OUTPUT "Building ""CALENDAR""" +- " for ""''F$GETSYI("ARCH_NAME")'"" architecture" $! $ ARCH_NAME = F$EDIT(F$GETSYI("ARCH_NAME"),"UPCASE") $ IF ARCH_NAME .EQS. "ALPHA" THEN ARCH_NAME = "AXP" $ PROC_DEV = F$PARSE(F$ENVIRONMENT("PROCEDURE"),,,"DEVICE") $! $!(assume CGILIB #include is in same directory except for WASD) $ INCLUDES = " /INCLUDE=([])" $ IF PROC_DEV .EQS. "WASD_ROOT:" THEN INCLUDES = " /INCLUDE=([SRC.MISC])" $ DEFINES = " /DEFINE=(__VMS_VER=70000000,__CRTL_VER=70000000)" $ WARNINGS= " /WARNING=(DISABLE=(PREOPTW,IMPLICITFUNC,NEEDCONSTEXT))" $ CC_OPTIONS = "/DECC /OPTIMIZE /STAND=RELAXED_ANSI /PREFIX=ALL" +- INCLUDES + DEFINES + WARNINGS $! $ IF F$SEARCH("OBJ_''ARCH_NAME'.DIR") .EQS. "" - THEN CREATE /DIR [.OBJ_'ARCH_NAME'] $ OBJECT_DIR = "[.OBJ_''ARCH_NAME']" $! $ IF P1 .EQS. "" .OR. P1 .EQS. "BUILD" .OR. P1 .EQS. "COMPILE" $ THEN $ SET NOON $ SET VERIFY $ CC 'CC_OPTIONS' /OBJECT='OBJECT_DIR' CALENDAR $! 'F$VERIFY(0) $ SET ON $ ENDIF $! $ IF P1 .EQS. "" .OR. P1 .EQS. "BUILD" .OR. P1 .EQS. "LINK" $ THEN $ CGILIB_OLB = "[.OBJ_''ARCH_NAME']CGILIB.OLB" $ IF PROC_DEV .EQS. "WASD_ROOT:" THEN CGILIB_OLB = "[SRC.MISC.OBJ_''ARCH_NAME']CGILIB.OLB" $ EXE_DIR = "" $ IF PROC_DEV .EQS. "APACHE_ROOT:" THEN EXE_DIR = "CGI-BIN:[000000]" $ IF PROC_DEV .EQS. "WWW_ROOT:" THEN EXE_DIR = "WWW_ROOT:[BIN]" $ IF PROC_DEV .EQS. "WASD_ROOT:" THEN EXE_DIR = "WASD_EXE:" $ SET NOON $ SET VERIFY $ LINK /EXECUTABLE='EXE_DIR'CALENDAR.EXE - 'OBJECT_DIR'CALENDAR,'CGILIB_OLB'/LIBRARY $! 'F$VERIFY(0) $ SET ON $ ENDIF $ PURGE /NOLOG 'OBJECT_DIR' $! $!-----------------------------------------------------------------------------