$!----------------------------------------------------------------------------- $! BUILD_ALL.COM $! $! BRUTE-FORCE build procedure for WASD VMS HTTPd package applications $! $! Copyright (C) 1996-2021 Mark G.Daniel. $! $! Licensed under the Apache License, Version 2.0 (the "License"); $! you may not use this file except in compliance with the License. $! You may obtain a copy of the License at $! $! http://www.apache.org/licenses/LICENSE-2.0 $! $! Unless required by applicable law or agreed to in writing, software $! distributed under the License is distributed on an "AS IS" BASIS, $! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. $! See the License for the specific language governing permissions and $! limitations under the License. $! $! P1 == "BUILD" to compile and link all applications $! P1 == "LINK" to only re-link all applications $! P2 == "SSL" to build/link SSL-version HTTPd executable $! P3 == "DIST" to build a full distribution (not for general usage) $! $! 18-AUG-2021 MGD add SCREPER build $! 12-NOV-2020 MGD VAX no longer supported - it did have a 26 year run! $! 02-JUL-2020 MGD rework to support partial installs $! 28-JUN-2019 MGD replace SDM2HTM with WASDOC $! 05-DEC-2014 MGD remove GIFT build $! 04-SEP-2011 MGD add WEBSOCKET build $! 07-NOV-2009 MGD use WASD_ROOT $! add EXPAT as prerequisite for HTTPd $! 28-NOV-2007 MGD add proxyMUNGE utility/script $! 31-MAY-2005 MGD add WOTSUP utility $! 04-NOV-2002 MGD check for C compiler, $! add RANDSEED and SECHAN, make STREAMLF a procedure $! 28-JUN-2002 MGD add WB and CALOGS, $! remove WWWRKOUT and PERLRTE $! 03-NOV-2001 MGD PERSONA_MACRO $! 20-MAY-2001 MGD add MD5DIGEST build, $! remove SCRUNCH,DBIV,HWP builds $! 26-JAN-2001 MGD "+SSL" for distribution builds $! 28-OCT-2000 MGD modified for CGILIB.OLB $! 27-MAY-2000 MGD add AB utility $! 30-NOV-1999 MGD remove NETLIB/UCX build parameter, $! add SCRUNCH build $! bugfix; HT_ROOT derived from concealed device $! 03-OCT-1998 MGD related EXTRACT in with QUERY $! 27-JUN-1998 MGD modified for v5.1 $! ??-???-???? MGD long unrecorded pre-history :^) $!----------------------------------------------------------------------------- $! $ set noverify $ ss$_abort = 44 $ bell[0,8] = 7 $ copy = "copy/log" $ delete = "delete/noconfirm/log" $ say = "write sys$output" $! $ if f$getsyi("arch_name") .eqs. "VAX" $ then $ write sys$output "VAX no longer supported - it did have a 26 year run!" $ exit 44 $ endif $! $ vms_version = f$integer(f$extract(1,1,f$getsyi("version"))) * 10 +- f$integer(f$extract(3,1,f$getsyi("version"))) $ if vms_version .ge. 72 then set process /parse=traditional $ set noon $ set control=Y $ on controly then exit ss$_abort $! $ if P1 .eqs. "DIST" $ then $ DIST_SSL == "VMS_SSL111=1" $ say f$cvtime() $ stime = f$time() $ P1 = "COMPILE" $ P2 = "" $ P3 = "DIST" $ endif $ if P1 .nes. "BUILD" .and. P1 .nes. "COMPILE" .and. P1 .nes. "LINK" $ then $ say "Usage: @BUILD_ALL LINK|BUILD [SSL]" $ exit $ endif $ if P2 .nes. "" .and. P2 .nes. "SSL" $ then $ say "Usage: @BUILD_ALL LINK|BUILD [SSL]" $ exit $ endif $! $!(look for local WASD_ROOT environment used when building) $ if f$trnlnm("WASD_ROOT","LNM$JOB") .eqs. "" $ then $! (subprocess to do the actual work, define local logicals) $ procCom = f$environment("PROCEDURE") $ procDev = f$parse(procCom,,,"DEVICE","NO_CONCEAL") $ procDir = f$edit(f$parse(procCom,,,"DIRECTORY","NO_CONCEAL"),"UPCASE") $ procDir = procDir - "][" $ wasdRootLength = f$length("WASD_ROOT") $ wasdRoot = procDev+f$extract(0,f$locate("WASD_ROOT",procDir)+wasdRootLength,procDir)+".]" $ define /job /nolog /translation=concealed WASD_ROOT 'wasdRoot' $ wasdExe = "WASD_ROOT:[''wasd_arch_name']" $ define /job /nolog WASD_EXE 'wasdExe' $! (spawn a subprocess to do the actual build ensures job logical deletion) $ spawn /wait @'procCom' "''p1'" "''p2'" "''p3'" $ say "" $ deassign /job WASD_ROOT $ deassign /job WASD_EXE $ exit $ else $ if f$trnlnm("XCC$WASD","LNM$PROCESS") .eqs. "YES" $ then $! (for the spawned process) $ @sys$manager:x86_xtools$sylogin.com $ endif $ endif $! $ @wasd_root:[src]archer.com "" $! $ if P1 .nes. "LINK" $ then $! (make sure we have a C compiler and that it's probably DECC) $ if wasd_arch_name .eqs. "AXP" $ then cc nl: /version $ else cc nl: /decc /version $ endif $ status = $status .and. %x0fffffff $ set on $ if .not. status then exit status $ if f$search("sys$system:decc$*.exe") .eqs. "" $ then $ say "Can't seem to locate SYS$SYSTEM:DECC$*.EXE" $ exit %x00038090 $ endif $ endif $! $ on error then goto finished $ currentDefault = f$environment("DEFAULT") $ set default WASD_ROOT:[SRC] $! $!----------------------------------------------------------------------------- $! $ say "" $ say "--- EXPAT ---" $ set default [.EXPAT] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_EXPAT "''P1'" "''P2'" $ set default [-] $! $ say "" $ say "--- HTTPD ---" $ say "" $ set default [.HTTPD] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_HTTPD "''P1'" "''P2'" "''P3'" $ set default [-] $! $!(library must be built before other applications using it can!) $ say "" $ say "--- CGILIB ---" $ set default [.MISC] $ if P3 .eqs. "DIST" $ then $ delete [.OBJ_'wasd_arch_name']CGILIB*.OBJ;* $ delete [.OBJ_'wasd_arch_name']CGILIB*.OLB;* $ endif $ @BUILD_CGILIB "''P1'" "''P2'" $ set default [-] $! $ if f$search("[]AGENT.DIR") .nes. "" $ then $ say "" $ say "--- AGENTs ---" $ set default [.AGENT] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_ALL "''P1'" "''P2'" $ set default [-] $ endif $! $ if f$search("[]CGIPLUS.DIR") .nes. "" $ then $ say "" $ say "--- CGIPLUS ---" $ set default [.CGIPLUS] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_CGIPLUS "''P1'" "''P2'" $ @BUILD_CGISAPI "''P1'" "''P2'" $ @BUILD_CGIPLUSTEST "''P1'" "''P2'" $ @BUILD_ISAPIEXAMPLE "''P1'" "''P2'" $ @BUILD_RTE_EXAMPLE "''P1'" "''P2'" $ set default [-] $ endif $! $ if f$search("[]CGIPLUS.DIR") .nes. "" $ then $ say "" $ say "--- CONAN ---" $ set default [.CONAN] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_CONAN "''P1'" "''P2'" $ set default [-] $ endif $! $ if f$search("[]HYPERREADER.DIR") .nes. "" $ then $ say "" $ say "--- HYPERREADER & HYPERSHELF ---" $ set default [.HYPERREADER] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_HYPERREADER "''P1'" "''P2'" $ @BUILD_HYPERSHELF "''P1'" "''P2'" $ set default [-] $ endif $! $ if f$search("[]HYPERSPI.DIR") .nes. "" $ then $ say "" $ say "--- HYPERSPI ---" $ set default [.HYPERSPI] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_HYPERSPI$AGENT "''P1'" "''P2'" $ @BUILD_HYPERSPI "''P1'" "''P2'" $! 'f$verify(0) $ set default [-] $ endif $! $ if f$search("[]MISC.DIR") .nes. "" $ then $ say "" $ say "--- MISC(ellaneous) ---" $ set default [.MISC] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* /EXCLUDE=*CGILIB*.OBJ;* $ @BUILD_MISC "''P1'" "''P2'" $ set default [-] $ endif $! $ if f$search("[]OSU.DIR") .nes. "" $ then $ say "" $ say "--- OSU ---" $ set default [.OSU] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_OSU "''P1'" "''P2'" $ set default [-] $ endif $! $ if f$search("[]QUERY.DIR") .nes. "" $ then $ say "" $ say "--- QUERY ---" $ set default [.QUERY] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_QUERY "''P1'" "''P2'" $ set default [-] $ endif $! $ if f$search("[]SCREPER.DIR") .nes. "" $ then $ say "" $ say "--- SCREPER ---" $ set default [.SCREPER] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_SCREPER "''P1'" "''P2'" $ @BUILD_SADHOC "''P1'" "''P2'" $ @BUILD_SHTTPDMON "''P1'" "''P2'" $ @BUILD_SMONITOR "''P1'" "''P2'" $ set default [-] $ endif $! $ if f$search("[]WASDOC.DIR") .nes. "" $ then $ say "" $ say "--- WASDOC ---" $ set default [.WASDOC] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_WASDOC "''P1'" "''P2'" $ set default [-] $ endif $! $ if f$search("[]UTILS.DIR") .nes. "" $ then $ say "" $ say "--- UTILITIES ---" $ set default [.UTILS] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_ALL "''P1'" "''P2'" $ set default [-] $ endif $! $ if f$search("[]WEBSOCKET.DIR") .nes. "" $ then $ say "" $ say "--- WEBSOCKET ---" $ set default [.WEBSOCKET] $ if P3 .eqs. "DIST" then delete [.OBJ_'wasd_arch_name']*.OBJ;* $ @BUILD_ALL "''P1'" "''P2'" $ set default [-] $ endif $! $ finished: !'f$verify(0) $ if P3 .eqs. "DIST" $ then $ say f$cvtime() $ say f$delta_time(stime,f$time()) $ endif $ say "" $ set default 'currentDefault' $! $!-----------------------------------------------------------------------------