VirtualBox

source: vbox/trunk/src/libs/libxml2-2.6.30/vms/build_libxml.com@ 34034

Last change on this file since 34034 was 6076, checked in by vboxsync, 17 years ago

Merged dmik/s2 branch (r25959:26751) to the trunk.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 7.9 KB
Line 
1$! BUILD_LIBXML.COM
2$!
3$! Build the LIBXML library
4$!
5$! Arguments:
6$!
7$! "DEBUG" - build everything in debug
8$!
9$! This procedure creates an object library XML_LIBDIR:LIBXML.OLB directory.
10$! After the library is built, you can link LIBXML routines into
11$! your code with the command
12$!
13$! $ LINK your_modules,XML_LIBDIR:LIBXML.OLB/LIBRARY
14$!
15$! Change History
16$! --------------
17$! Command file author : John A Fotheringham ([email protected])
18$! Update history : 13 October 2003 Craig Berry ([email protected])
19$! more new module additions
20$! : 25 April 2003 Craig Berry ([email protected])
21$! added xmlreader.c and relaxng.c to source list
22$! : 28 September 2002 Craig Berry ([email protected])
23$! updated to work with current sources
24$! miscellaneous enhancements to build process
25$!
26$!- configuration -------------------------------------------------------------
27$!
28$!- compile command. If p1="nowarn" suppress the expected warning types
29$!
30$ cc_opts = "/NAMES=(SHORTENED)/FLOAT=IEEE/IEEE_MODE=DENORM_RESULTS"
31$!
32$ if p1.eqs."DEBUG" .or. p2.eqs."DEBUG"
33$ then
34$ debug = "Y"
35$ cc_command = "CC''cc_opts'/DEBUG/NOOPTIMIZE/LIST/SHOW=ALL"
36$ else
37$ debug = "N"
38$ cc_command = "CC''cc_opts'"
39$ endif
40$!
41$!- list of sources to be built into the LIBXML library. Compare this list
42$! to the definition of "libxml2_la_SOURCES" in the file MAKEFILE.IN.
43$! Currently this definition includes the list WITH_TRIO_SOURCES_TRUE
44$!
45$ sources = "SAX.c entities.c encoding.c error.c parserInternals.c"
46$ sources = sources + " parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c"
47$ sources = sources + " valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c"
48$ sources = sources + " xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c"
49$ sources = sources + " catalog.c globals.c threads.c c14n.c xmlstring.c"
50$ sources = sources + " xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c"
51$ sources = sources + " triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c"
52$ sources = sources + " xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c"
53$!
54$!- list of main modules to compile and link. Compare this list to the
55$! definition of bin_PROGRAMS in MAKEFILE.IN
56$!
57$ bin_progs = "xmllint xmlcatalog"
58$!
59$!- list of test modules to compile and link. Compare this list to the
60$! definition of noinst_PROGRAMS in MAKEFILE.
61$!
62$ noinst_PROGRAMS = "testSchemas testRelax testSAX testHTML testXPath testURI " -
63 + "testThreads testC14N testAutomata testRegexp testReader"
64$!
65$!- set up build logicals -----------------------------------------------------\
66$!
67$!
68$!- start from where the procedure is in case it's submitted in batch ----------\
69$!
70$ whoami = f$parse(f$environment("PROCEDURE"),,,,"NO_CONCEAL")
71$ procdir = f$parse(whoami,,,"DEVICE") + f$parse(whoami,,,"DIRECTORY")
72$ set default 'procdir'
73$!
74$ if f$trnlnm("XML_LIBDIR").eqs.""
75$ then
76$ if f$search("[-]lib.dir") .eqs. ""
77$ then
78$ create/directory/log [-.lib]
79$ endif
80$ xml_libdir = f$parse("[-.lib]",,,"DEVICE") + f$parse("[-.lib]",,,"DIRECTORY")
81$ define/process XML_LIBDIR 'xml_libdir'
82$ write sys$output "Defining XML_LIBDIR as """ + f$trnlnm("XML_LIBDIR") + """
83$ endif
84$!
85$ if f$trnlnm("XML_SRCDIR").eqs.""
86$ then
87$ globfile = f$search("[-...]globals.c")
88$ if globfile.eqs.""
89$ then
90$ write sys$output "Can't locate globals.c. You need to manually define a XML_SRCDIR logical"
91$ exit
92$ else
93$ srcdir = f$parse(globfile,,,"DEVICE") + f$parse(globfile,,,"DIRECTORY")
94$ define/process XML_SRCDIR "''srcdir'"
95$ write sys$output "Defining XML_SRCDIR as ""''srcdir'"""
96$ endif
97$ endif
98$!
99$ copy/log config.vms xml_srcdir:config.h
100$!
101$ if f$trnlnm("libxml").eqs.""
102$ then
103$ globfile = f$search("[-...]globals.h")
104$ if globfile.eqs.""
105$ then
106$ write sys$output "Can't locate globals.h. You need to manually define a LIBXML logical"
107$ exit
108$ else
109$ includedir = f$parse(globfile,,,"DEVICE") + f$parse(globfile,,,"DIRECTORY")
110$ define/process libxml "''includedir'"
111$ write sys$output "Defining libxml as ""''includedir'"""
112$ endif
113$ endif
114$!
115$!- set up error handling (such as it is) -------------------------------------
116$!
117$ exit_status = 1
118$ saved_default = f$environment("default")
119$ on error then goto ERROR_OUT
120$ on control_y then goto ERROR_OUT
121$!
122$!- move to the source directory and create any necessary subdirs and the
123$! object library
124$!
125$ set default xml_srcdir
126$ if f$search("DEBUG.DIR").eqs."" then create/dir [.DEBUG]
127$ if f$search("XML_LIBDIR:LIBXML.OLB").eqs.""
128$ then
129$ write sys$output "Creating new object library XML_LIBDIR:LIBXML.OLB"
130$ library/create XML_LIBDIR:LIBXML.OLB
131$ endif
132$!
133$ goto start_here
134$ start_here: ! move this line to debug/rerun parts of this command file
135$!
136$!- compile modules into the library ------------------------------------------
137$!
138$ lib_command = "LIBRARY/REPLACE/LOG XML_LIBDIR:LIBXML.OLB"
139$ link_command = ""
140$!
141$ write sys$output ""
142$ write sys$output "Building modules into the LIBXML object library"
143$ write sys$output ""
144$!
145$ s_no = 0
146$ sources = f$edit(sources,"COMPRESS")
147$!
148$ source_loop:
149$!
150$ next_source = f$element (S_no," ",sources)
151$ if next_source.nes."" .and. next_source.nes." "
152$ then
153$!
154$ on error then goto ERROR_OUT
155$ on control_y then goto ERROR_OUT
156$ call build 'next_source'
157$ s_no = s_no + 1
158$ goto source_loop
159$!
160$ endif
161$!
162$!- now build self-test programs ----------------------------------------------
163$!
164$! these programs are built as ordinary modules into XML_LIBDIR:LIBXML.OLB. Here they
165$! are built a second time with /DEFINE=(STANDALONE) in which case a main()
166$! is also compiled into the module
167$
168$ lib_command = ""
169$ link_command = "LINK"
170$!
171$ library/compress XML_LIBDIR:LIBXML.OLB
172$ purge XML_LIBDIR:LIBXML.OLB
173$!
174$ write sys$output ""
175$ write sys$output "Building STANDALONE self-test programs"
176$ write sys$output ""
177$!
178$ call build NANOFTP.C /DEFINE=(STANDALONE)
179$ call build NANOHTTP.C /DEFINE=(STANDALONE)
180$ call build TRIONAN.C /DEFINE=(STANDALONE)
181$!
182$!- now build main and test programs ------------------------------------------
183$!
184$!
185$ lib_command = ""
186$ link_command = "LINK"
187$!
188$ write sys$output ""
189$ write sys$output "Building main programs and test programs"
190$ write sys$output ""
191$!
192$ p_no = 0
193$ all_progs = bin_progs + " " + noinst_PROGRAMS
194$ all_progs = f$edit(all_progs,"COMPRESS")
195$!
196$ prog_loop:
197$!
198$ next_prog = f$element (p_no," ",all_progs)
199$ if next_prog.nes."" .and. next_prog.nes." "
200$ then
201$!
202$ on error then goto ERROR_OUT
203$ on control_y then goto ERROR_OUT
204$ call build 'next_prog'.c
205$ p_no = p_no + 1
206$ goto prog_loop
207$!
208$ endif
209$!
210$!- Th-th-th-th-th-that's all folks! ------------------------------------------
211$!
212$ goto exit_here ! move this line to avoid parts of this command file
213$ exit_here:
214$!
215$ exit
216$ goto exit_out
217$!
218$!
219$EXIT_OUT:
220$!
221$ purge/nolog [.debug]
222$ set default 'saved_default
223$ exit 'exit_status
224$!
225$
226$ERROR_OUT:
227$ exit_status = $status
228$ write sys$output "''f$message(exit_status)'"
229$ goto EXIT_OUT
230$!
231
232$!- the BUILD subroutine. Compile then insert into library or link as required
233$!
234$BUILD: subroutine
235$ on warning then goto EXIT_BUILD
236$ source_file = p1
237$ name = f$parse(source_file,,,"NAME")
238$ object_file = f$parse("[.debug].OBJ",name,,,"SYNTAX_ONLY")
239$!
240$!- compile
241$!
242$ write sys$output "''cc_command'''p2'/object=''object_file' ''source_file'"
243$ cc_command'p2' /object='object_file 'source_file'
244$!
245$!- insert into library if command defined
246$!
247$ if lib_command.nes."" then lib_command 'object_file'
248$!
249$!- link module if command defined
250$ if link_command.nes.""
251$ then
252$ opts = ""
253$ if debug then opts = "/DEBUG"
254$ write sys$output "''link_command'''opts' ''object_file',XML_LIBDIR:libxml.olb/library"
255$ link_command'opts' 'object_file',-
256 XML_LIBDIR:libxml.olb/library
257$ endif
258$!
259$EXIT_BUILD:
260$ exit $status
261$!
262$endsubroutine
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette