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 24EXTENSION_TARGET:=$(ZIP9TARGETN) 25 26.SOURCE.xcu : $(MISC)/$(EXTNAME)/merge $(MISC)/$(EXTNAME)/registry/data $(MISC)/$(COMPONENT_SHARED_CONFIG)_in/merge $(MISC)/$(COMPONENT_SHARED_CONFIG)_in/registry/data $(COMPONENT_CONFIGDIR) . 27.SOURCE.xcs : $(MISC)/$(EXTNAME)/registry $(MISC)/$(EXTNAME)/registry/schema . 28 29fixme=$(MISC)/$(EXTNAME)/merge/$(MISC) 30fixme2=$(fixme:n) 31 32fixme3=$(MISC)/$(EXTNAME)/$(MISC) 33fixme4=$(fixme:n) 34 35$(EXTENSIONDIR)/$(COMPONENT_CONFIGDEST)/%.xcu : %.xcu 36# ugly hacking to workaround prepended first source path 37 @@-$(MKDIRHIER) $(subst,$(fixme2),$(MISC) $(@:d)) 38.IF "$(COMPONENT_XCU_REPLACEMENT)"!="" 39 $(TYPE) $< | sed '$(COMPONENT_XCU_REPLACEMENT)' > $(subst,$(fixme2),$(MISC) $@) 40.ELSE # "$(COMPONENT_REPLACEMENT)"!="" 41 $(GNUCOPY) $< $(subst,$(fixme2),$(MISC) $@) 42.ENDIF # "$(COMPONENT_REPLACEMENT)"!="" 43 44$(EXTENSIONDIR)/$(COMPONENT_CONFIGDESTSCHEMA)/%.xcs : %.xcs 45 @@-$(MKDIRHIER) $(subst,$(fixme4),$(MISC) $(@:d)) 46 $(GNUCOPY) $< $(subst,$(fixme4),$(MISC) $@) 47 48$(EXTENSIONDIR)/%.jar : $(SOLARBINDIR)/%.jar 49 @@-$(MKDIRHIER) $(@:d) 50 $(GNUCOPY) $< $@ 51 52.IF "$(COMPONENT_FILES)"!="" 53COMPONENT_FILES_SRC*=./ 54# ugly hacking to workaround prepended first source path - also hits 55# here in case of "just copied" .xcu files 56$(COMPONENT_FILES) : $$(@:s|$(fixme2)|$(MISC)|:s|$(EXTENSIONDIR)/|$(COMPONENT_FILES_SRC)|) 57 @@-$(MKDIRHIER) $(@:s|$(fixme2)|$(MISC)|:d) 58 $(COMMAND_ECHO)$(COPY) $< $(@:s|$(fixme2)|$(MISC)|) 59.ENDIF # "$(COMPONENT_FILES)"!="" 60 61.IF "$(COMPONENT_JARFILES)"!="" 62$(COMPONENT_JARFILES) : $(CLASSDIR)/$$(@:f) 63 @@-$(MKDIRHIER) $(@:d) 64 $(COMMAND_ECHO)$(COPY) $< $@ 65.ENDIF # "$(COMPONENT_JARFILES)"!="" 66 67.IF "$(COMPONENT_LIBRARIES)"!="" 68PACK_RUNTIME!:=TRUE 69# TODO(Q3): strip the binary? 70$(COMPONENT_LIBRARIES) : $(DLLDEST)/$$(@:f) 71 @@-$(MKDIRHIER) $(@:d) 72 $(COMMAND_ECHO)$(COPY) $< $@ 73.ENDIF # "$(COMPONENT_LIBRARIES)"!="" 74 75.IF "$(PACK_RUNTIME)"!="" 76PACK_RUNTIME_FLAG:=$(MISC)/$(TARGET)_pack_runtime.flag 77$(EXTENSION_TARGET) : $(PACK_RUNTIME_FLAG) 78 79$(EXTENSIONDIR) : 80 @@-$(MKDIRHIER) $(@:d) 81 82$(PACK_RUNTIME_FLAG) : $(EXTENSIONDIR) 83 @@-$(MKDIRHIER) $(@:d) 84.IF "$(OS)$(CPU)"=="WNTI" 85.IF "$(COM)"=="GCC" 86 $(GNUCOPY) $(SOLARBINDIR)/mingwm10.dll $(EXTENSIONDIR) 87 .IF "$(MINGW_GCCDLL)"!="" 88 $(GNUCOPY) $(SOLARBINDIR)/$(MINGW_GCCDLL) $(EXTENSIONDIR) 89 .ENDIF 90 .IF "$(MINGW_GXXDLL)"!="" 91 $(GNUCOPY) $(SOLARBINDIR)/$(MINGW_GXXDLL) $(EXTENSIONDIR) 92 .ENDIF 93.ELSE 94.IF "$(PACKMS)"!="" 95.IF "$(CCNUMVER)" <= "001399999999" 96 $(GNUCOPY) $(PACKMS)/msvcr71.dll $(EXTENSIONDIR) 97 $(GNUCOPY) $(PACKMS)/msvcp71.dll $(EXTENSIONDIR) 98.ELSE # "$(CCNUMVER)" <= "001399999999" 99.IF "$(CCNUMVER)" <= "001499999999" 100 $(GNUCOPY) $(PACKMS)/msvcr80.dll $(EXTENSIONDIR) 101 $(GNUCOPY) $(PACKMS)/msvcp80.dll $(EXTENSIONDIR) 102 $(GNUCOPY) $(PACKMS)/msvcm80.dll $(EXTENSIONDIR) 103 $(GNUCOPY) $(PACKMS)/Microsoft.VC80.CRT.manifest $(EXTENSIONDIR) 104.ELSE # "$(CCNUMVER)" <= "001499999999" 105 $(GNUCOPY) $(PACKMS)/msvcr90.dll $(EXTENSIONDIR) 106 $(GNUCOPY) $(PACKMS)/msvcp90.dll $(EXTENSIONDIR) 107 $(GNUCOPY) $(PACKMS)/msvcm90.dll $(EXTENSIONDIR) 108 $(GNUCOPY) $(PACKMS)/Microsoft.VC90.CRT.manifest $(EXTENSIONDIR) 109.ENDIF # "$(CCNUMVER)" <= "001499999999" 110.ENDIF # "$(CCNUMVER)" <= "001399999999" 111.ELSE # "$(PACKMS)"!="" 112.IF "$(CCNUMVER)" <= "001399999999" 113 $(GNUCOPY) $(SOLARBINDIR)/msvcr71.dll $(EXTENSIONDIR) 114 $(GNUCOPY) $(SOLARBINDIR)/msvcp71.dll $(EXTENSIONDIR) 115.ELSE # "$(CCNUMVER)" <= "001399999999" 116.IF "$(CCNUMVER)" <= "001499999999" 117 $(GNUCOPY) $(SOLARBINDIR)/msvcr80.dll $(EXTENSIONDIR) 118 $(GNUCOPY) $(SOLARBINDIR)/msvcp80.dll $(EXTENSIONDIR) 119 $(GNUCOPY) $(SOLARBINDIR)/msvcm80.dll $(EXTENSIONDIR) 120 $(GNUCOPY) $(SOLARBINDIR)/Microsoft.VC80.CRT.manifest $(EXTENSIONDIR) 121.ELSE # "$(CCNUMVER)" <= "001499999999" 122 $(GNUCOPY) $(SOLARBINDIR)/msvcr90.dll $(EXTENSIONDIR) 123 $(GNUCOPY) $(SOLARBINDIR)/msvcp90.dll $(EXTENSIONDIR) 124 $(GNUCOPY) $(SOLARBINDIR)/msvcm90.dll $(EXTENSIONDIR) 125 $(GNUCOPY) $(SOLARBINDIR)/Microsoft.VC90.CRT.manifest $(EXTENSIONDIR) 126.ENDIF # "$(CCNUMVER)" <= "001499999999" 127.ENDIF # "$(CCNUMVER)" <= "001399999999" 128.ENDIF # "$(PACKMS)"!="" 129.ENDIF #"$(COM)"=="GCC" 130.ENDIF # "$(OS)$(CPU)"=="WNTI" 131 @$(TOUCH) $@ 132.ENDIF # "$(PACK_RUNTIME)"!="" 133 134IMPLEMENTATION_IDENTIFIER*="com.sun.star.$(EXTENSIONNAME)-$(PLATFORMID)" 135 136.INCLUDE .IGNORE : $(MISC)/$(TARGET)_lang_track.mk 137.IF "$(LAST_WITH_LANG)"!="$(WITH_LANG)" 138PHONYDESC=.PHONY 139.ENDIF # "$(LAST_WITH_LANG)"!="$(WITH_LANG)" 140.IF "$(DESCRIPTION)"!="" 141$(DESCRIPTION) $(PHONYDESC) : $(DESCRIPTION_SRC) 142 @@-$(MKDIRHIER) $(@:d) 143 @echo LAST_WITH_LANG=$(WITH_LANG) > $(MISC)/$(TARGET)_lang_track.mk 144 145 $(COMMAND_ECHO)$(PERL) $(SOLARENV)/bin/licinserter.pl $(DESCRIPTION_SRC) $(COMPONENT_LIC_TEMPL) $@.1.$(EXTNAME) 146 147 $(COMMAND_ECHO)$(PERL) $(SOLARENV)/bin/transform_description.pl $@.1.$(EXTNAME) $@.2.$(EXTNAME) 148 @@-$(RM) $@.1.$(EXTNAME) 149 150 $(COMMAND_ECHO)$(TYPE) $@.2.$(EXTNAME) | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $@.3.$(EXTNAME) 151 @@-$(RM) $@.2.$(EXTNAME) 152 153 $(COMMAND_ECHO)$(TYPE) $@.3.$(EXTNAME) | sed s/UPDATED_SUPPORTED_PLATFORM/$(PLATFORMID)/ > $@ 154 @@-$(RM) $@.3.$(EXTNAME) 155 156.ENDIF # "$(DESCRIPTION)"!="" 157 158# default license text for Apache OpenOffice extensions is the Apache Licence 2 159# may not fit... 160.IF "$(CUSTOM_LICENSE)"=="" 161PACKLICDEPS=$(SOLARBINDIR)/osl/LICENSE_ALv2 162.ELSE # "$(CUSTOM_LICENSE)" == "" 163PACKLICDEPS=$(CUSTOM_LICENSE) 164.ENDIF # "$(CUSTOM_LICENSE)" == "" 165.IF "$(PACKLICS)"!="" 166$(PACKLICS) : $(PACKLICDEPS) 167 @@-$(MKDIRHIER) $(@:d) 168 $(COMMAND_ECHO)$(GNUCOPY) $< $@ 169.ENDIF # "$(PACKLICS)"!="" 170 171.IF "$(COMPONENT_MANIFEST)"!="" 172#$(COMPONENT_MANIFEST) : $$(@:f) 173$(COMPONENT_MANIFEST) : $(MANIFEST_SRC) $(MANIFEST_DEPS) 174 @@-$(MKDIRHIER) $(@:d) 175.IF "$(COMPONENT_MANIFEST_GENERIC)" == "" 176 $(COMMAND_ECHO)$(TYPE) $(MANIFEST_SRC) | $(SED) "s/SHARED_EXTENSION/$(DLLPOST)/" | $(SED) "s/EXEC_EXTENSION/$(EXECPOST)/" > $@ 177.ELSE # "$(COMPONENT_MANIFEST_GENERIC)" != "" 178 $(COMMAND_ECHO)$(PERL) $(SOLARENV)/bin/makemani.pl $(PRJ)/util/manifest.xml $(EXTENSIONDIR) $(COMPONENT_MANIFEST_SEARCHDIR) $(@:d:d) 179.ENDIF # "$(COMPONENT_MANIFEST_GENERIC)" != "" 180.ENDIF # "$(COMPONENT_MANIFEST)"!="" 181 182ALLTAR : $(EXTENSION_PACKDEPS) 183