$! build the qi suite for those without make/mms $! $! usage $! @qi_compile multinet $! wollongong $! ucx $ $ if p1 .eqs. "" $ then $ write sys$output "choose multinet, wollongong or ucx as the parameter" $ exit $ endif $ $ qi_def == "" $ $! this is the list of exe files to build and their sources $! $ call build qi_make.c vaxc.opt $ call build qi_add_soundex.c qi_soundex.c vaxc.opt $ call build qi_build.c qi_buildcld.cld vaxc.opt $ qi_def == "/define=''p1'" $ call build qi.c qi_query.c qi_soundex.c qi_socket.c cryptit.c crypt.c 'p1'.opt $ exit $ $! take a list of files and compile and link them $ $build: subroutine $ i = 0 $cloop: $ i = i + 1 $ file = p'i' $ if file .eqs. "" then goto link $ call compile 'file' $ goto cloop $ $link: $ list = "" $ do_link = 0 $ i = 0 $ exespec = f$parse(p1,,,"name") + ".exe" $ if f$search(exespec) .eqs. "" $ then exestamp = "0000-00-00 00:00:00.00" $ else exestamp = f$cvtime(f$file_attribute(exespec,"rdt")) $ endif $ $! if any file is newer that the exe file, set do_link $ $lloop: $ i = i + 1 $ file = p'i' $ if file .eqs. "" then goto link_cmd $ if f$parse(file,,,"type") .eqs. ".OPT" $ then $ file = file + "/opt" $ else file = f$parse(p'i',,,"name") + ".OBJ" if f$cvtime(f$file_attribute(file,"rdt")) .gts. exestamp then do_link = 1 $ endif $ if f$length(list) .gt. 0 then list = list + ", " $ list = list + file $ goto lloop $ $link_cmd: $ if do_link $ then $ write sys$output "$ link ''list'" $ link 'list' $ endif $ exit $ endsubroutine $ $! compare source and object file, compile if source is newer $ $compile: subroutine $ timestamp = f$cvtime(f$file_attribute(p1,"rdt")) $ objspec = f$parse(p1,,,"name") + ".obj" $ if f$search(objspec) .eqs. "" $ then objstamp = "0000-00-00 00:00:00.00" $ else objstamp = f$cvtime(f$file_attribute(objspec,"rdt")) $ endif $ if objstamp .gts. timestamp $ then $! write sys$output "[''p1' is up to date]" $ exit $ endif $ if f$parse(p1,,,"type") .eqs. ".C" $ then $ write sys$output "$ cc ''p1' ''qi_def' " $ cc 'p1' 'qi_def' $ endif $ if f$parse(p1,,,"type") .eqs. ".CLD" $ then $ write sys$output "$ set command/object ''p1'" $ set command/object 'p1' $ endif $ exit $ endsubroutine .