1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24PRJ=.. 25PRJNAME=forms 26TARGET=frm 27USE_DEFFILE=TRUE 28 29# --- Settings ---------------------------------- 30 31.INCLUDE : settings.mk 32.INCLUDE: $(PRJ)$/makefile.pmk 33 34# --- Library ----------------------------------- 35# --- frm --------------------------------------- 36LIB1TARGET=$(SLB)$/forms.lib 37LIB1FILES=\ 38 $(SLB)$/common.lib \ 39 $(SLB)$/resource.lib \ 40 $(SLB)$/component.lib \ 41 $(SLB)$/helper.lib \ 42 $(SLB)$/solarcomponent.lib \ 43 $(SLB)$/solarcontrol.lib \ 44 $(SLB)$/richtext.lib \ 45 $(SLB)$/runtime.lib \ 46 $(SLB)$/xforms.lib \ 47 $(SLB)$/xformssubmit.lib \ 48 $(SLB)$/xformsxpath.lib 49 50SHL1TARGET=$(TARGET)$(DLLPOSTFIX) 51 52.IF "$(OS)$(SYSTEM_LIBXML)"=="MACOSXYES" 53# The macOS shared-library link template (tg_shl.mk) always searches 54# $(SOLARLIB) -- which includes /usr/lib -- before any of this makefile's 55# own libs, and the SDK bundles its own older libxml2 under /usr/lib. A 56# plain "-lxml2" (as pulled in by LIBXML2LIB) resolves to that bundled 57# copy instead of the configured --with-system-libxml one, and it is 58# missing symbols (xmlXPathValuePush, xmlXPathValuePop) that xformsxpath 59# needs. Link the intended libxml2 by absolute path so the search order 60# can't shadow it. 61# 62# The path is built from $(LIBXML_PREFIX), not a live `xml2-config` 63# lookup -- see the matching comment in xmlsecurity/util/makefile.mk for 64# why: $(LIBXML_PREFIX) is resolved exactly once by `./configure` 65# (honoring the directory given to --with-system-libxml=DIR) and exported 66# via the generated *Env.Set.sh script, so it can't drift from what 67# configure actually resolved the way a fresh `xml2-config` shell-out at 68# dmake time could. 69# 70# Prefer the dylib when one is actually present at that prefix (it 71# records its own transitive links, e.g. to libz, so nothing extra needs 72# to be added); fall back to the static archive -- which carries no 73# dependency info, so zlib must be linked explicitly to satisfy libxml2's 74# HTTP/gzip symbols (deflate, inflate, gzopen, ...) -- when no dylib 75# exists there. 76# 77# The existence check is resolved into a plain macro first, then branched 78# on -- dmake's .IF does not reliably evaluate a $(shell ...) call written 79# directly inside the condition string itself. 80# 81# The leading "-" is load-bearing: dmake runs $(shell ...) as a phony 82# recipe named "Shell escape" and, same as any other recipe line, treats 83# a non-zero exit as a fatal build error unless the line is marked 84# ignore-errors (the same leading "-" convention as normal recipes, 85# handled by Rcp_attribute() in dag.c). "test -f X && echo yes" exits 1 86# whenever X does not exist -- the expected, common case here, since 87# community builds normally only install libxml2 as a static archive 88# (--enable-shared=no, no dylib at all) -- so without the "-" this aborts 89# the whole build the moment no dylib is found, instead of just leaving 90# the macro empty. 91# 92# --with-static-system-libs=libxml pins this to the archive, so a dylib 93# appearing at the prefix can't silently turn a release build dynamic. 94.IF "$(STATIC_SYSTEM_LIBXML)"=="YES" 95FORMS_LIBXML2_HAS_DYLIB:= 96.ELSE 97FORMS_LIBXML2_HAS_DYLIB:=$(shell -test -f $(LIBXML_PREFIX)/lib/libxml2.dylib && echo yes) 98.ENDIF 99.IF "$(FORMS_LIBXML2_HAS_DYLIB)"=="yes" 100FORMS_LIBXML2LIB:=$(LIBXML_PREFIX)/lib/libxml2.dylib 101.ELSE 102FORMS_LIBXML2LIB:=$(LIBXML_PREFIX)/lib/libxml2.a $(ZLIB3RDLIB) 103.ENDIF 104.ELSE 105FORMS_LIBXML2LIB=$(LIBXML2LIB) 106.ENDIF 107 108SHL1STDLIBS= \ 109 $(EDITENGLIB) \ 110 $(SALLIB) \ 111 $(CPPULIB) \ 112 $(CPPUHELPERLIB) \ 113 $(TOOLSLIB) \ 114 $(I18NISOLANGLIB) \ 115 $(VCLLIB) \ 116 $(SVTOOLLIB) \ 117 $(SVLLIB) \ 118 $(TKLIB) \ 119 $(SFX2LIB) \ 120 $(VOSLIB) \ 121 $(UNOTOOLSLIB) \ 122 $(COMPHELPERLIB) \ 123 $(DBTOOLSLIB) \ 124 $(TKLIB) \ 125 $(SVXCORELIB) \ 126 $(UCBHELPERLIB) \ 127 $(FORMS_LIBXML2LIB) \ 128 $(ICUUCLIB) \ 129 $(ICUINLIB) 130 131SHL1LIBS=$(LIB1TARGET) 132SHL1DEPN=$(LIB1TARGET) \ 133 makefile.mk 134 135 136SHL1VERSIONMAP=$(SOLARENV)/src/component.map 137SHL1DEF=$(MISC)$/$(SHL1TARGET).def 138DEF1NAME=$(SHL1TARGET) 139 140# === .res file ========================================================== 141 142RES1FILELIST=\ 143 $(SRS)$/resource.srs \ 144 145RESLIB1NAME=$(TARGET) 146RESLIB1SRSFILES=$(RES1FILELIST) 147 148# --- Targets ---------------------------------- 149 150.INCLUDE : target.mk 151 152# --- Filter-Datei --- 153 154$(MISC)$/$(SHL1TARGET).flt: makefile.mk 155 @echo ------------------------------ 156 @echo __CT >$@ 157 @echo createRegistryInfo >>$@ 158 @echo queryInterface >>$@ 159 @echo queryAggregation >>$@ 160 @echo NavigationToolBar >>$@ 161 @echo ONavigationBar >>$@ 162 163 164ALLTAR : $(MISC)/frm.component 165 166$(MISC)/frm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ 167 frm.component 168 $(XSLTPROC) --nonet --stringparam uri \ 169 '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ 170 $(SOLARENV)/bin/createcomponent.xslt frm.component 171