$!
$!
$! Arguments:
$!
$!
$!
$!
$! --------------
$!
$!- configuration -------------------------------------------------------------
$!
$!
$!
$ then
$ debug = "Y"
$ cc_command = "CC''cc_opts'/DEBUG/NOOPTIMIZE/LIST/SHOW=ALL"
$ else
$ debug = "N"
$ cc_command = "CC''cc_opts'"
$ endif
$!
$!
$!
$!
$ bin_progs = "xmllint xmlcatalog"
$!
$!
$ noinst_PROGRAMS = "testSchemas testRelax testSAX testHTML testXPath testURI " -
+ "testThreads testC14N testAutomata testRegexp testReader"
$!
$!
$!
$!
$ whoami = f$parse(f$environment("PROCEDURE"),,,,"NO_CONCEAL")
$ procdir = f$parse(whoami,,,"DEVICE") + f$parse(whoami,,,"DIRECTORY")
$!
$ if f$trnlnm("XML_LIBDIR").eqs.""
$ then
$ if f$search("[-]lib.dir") .eqs. ""
$ then
$ endif
$ write sys$output "Defining XML_LIBDIR as """ + f$trnlnm("XML_LIBDIR") + """
$ endif
$!
$ if f$trnlnm("XML_SRCDIR").eqs.""
$ then
$ globfile = f$search("[-...]globals.c")
$ if globfile.eqs.""
$ then
$ exit
$ else
$ write sys$output "Defining XML_SRCDIR as ""''srcdir'"""
$ endif
$ endif
$!
$ copy/log config.vms xml_srcdir:config.h
$!
$ then
$ if globfile.eqs.""
$ then
$ exit
$ else
$ includedir = f$parse(globfile,,,"DEVICE") + f$parse(globfile,,,"DIRECTORY")
$ endif
$ endif
$!
$!- set up error handling (such as it is) -------------------------------------
$!
$ exit_status = 1
$ saved_default = f$environment("default")
$ on error then goto ERROR_OUT
$ on control_y then goto ERROR_OUT
$!
$!- move to the source directory and create any necessary subdirs and the
$! object library
$!
$ set default xml_srcdir
$ if f$search("XML_LIBDIR:LIBXML.OLB").eqs.""
$ then
$ write sys$output "Creating new object library XML_LIBDIR:LIBXML.OLB"
$ library/create XML_LIBDIR:LIBXML.OLB
$ endif
$!
$ goto start_here
$!
$!- compile modules into the library ------------------------------------------
$!
$ lib_command = "LIBRARY/REPLACE/LOG XML_LIBDIR:LIBXML.OLB"
$ link_command = ""
$!
$ write sys$output ""
$ write sys$output "Building modules into the LIBXML object library"
$ write sys$output ""
$!
$ s_no = 0
$ sources = f$edit(sources,"COMPRESS")
$!
$ source_loop:
$!
$ next_source = f$element (S_no," ",sources)
$ if next_source.nes."" .and. next_source.nes." "
$ then
$!
$ on error then goto ERROR_OUT
$ on control_y then goto ERROR_OUT
$ s_no = s_no + 1
$ goto source_loop
$!
$ endif
$!
$!- now build self-test programs ----------------------------------------------
$!
$! these programs are built as ordinary modules into XML_LIBDIR:LIBXML.OLB. Here they
$! are built a second time with /DEFINE=(STANDALONE) in which case a main()
$! is also compiled into the module
$
$ lib_command = ""
$ link_command = "LINK"
$!
$ library/compress XML_LIBDIR:LIBXML.OLB
$ purge XML_LIBDIR:LIBXML.OLB
$!
$ write sys$output ""
$ write sys$output "Building STANDALONE self-test programs"
$ write sys$output ""
$!
$ call build NANOFTP.C /DEFINE=(STANDALONE)
$ call build NANOHTTP.C /DEFINE=(STANDALONE)
$ call build TRIONAN.C /DEFINE=(STANDALONE)
$!
$!- now build main and test programs ------------------------------------------
$!
$!
$ lib_command = ""
$ link_command = "LINK"
$!
$ write sys$output ""
$ write sys$output "Building main programs and test programs"
$ write sys$output ""
$!
$ p_no = 0
$ all_progs = bin_progs + " " + noinst_PROGRAMS
$ all_progs = f$edit(all_progs,"COMPRESS")
$!
$ prog_loop:
$!
$ next_prog = f$element (p_no," ",all_progs)
$ if next_prog.nes."" .and. next_prog.nes." "
$ then
$!
$ on error then goto ERROR_OUT
$ on control_y then goto ERROR_OUT
$ p_no = p_no + 1
$ goto prog_loop
$!
$ endif
$!
$!
$ exit_here:
$!
$ exit
$ goto exit_out
$!
$!
$!
$ set default 'saved_default
$ exit 'exit_status
$!
$
$ exit_status = $status
$ goto EXIT_OUT
$!
$!
$ source_file = p1
$!
$!- compile
$!
$!
$!- insert into library if command defined
$!
$!
$!- link module if command defined
$ if link_command.nes.""
$ then
$ opts = ""
$ if debug then opts = "/DEBUG"
$ link_command'opts' 'object_file',-
XML_LIBDIR:libxml.olb/library
$ endif
$!
$ exit $status
$!