merge the formfield patch from ooo-build
[ooovba.git] / solenv / inc / extension_post.mk
blob120fc105a9ee60d958c07f03c5a7f015c0c84371
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: extension_post.mk,v $
11 # $Revision: 1.5 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 .SOURCE.xcu : $(MISC)/$(EXTNAME)/merge $(MISC)/$(EXTNAME)/registry/data $(MISC)/$(COMPONENT_SHARED_CONFIG)_in/merge $(MISC)/$(COMPONENT_SHARED_CONFIG)_in/registry/data $(COMPONENT_CONFIGDIR) .
33 .SOURCE.xcs : $(MISC)/$(EXTNAME)/registry $(MISC)/$(EXTNAME)/registry/schema .
35 fixme=$(MISC)/$(EXTNAME)/merge/$(MISC)
36 fixme2=$(fixme:n)
38 fixme3=$(MISC)/$(EXTNAME)/$(MISC)
39 fixme4=$(fixme:n)
41 $(EXTENSIONDIR)/$(COMPONENT_CONFIGDEST)/%.xcu : %.xcu
42 # ugly hacking to workaround prepended first source path
43 @@-$(MKDIRHIER) $(subst,$(fixme2),$(MISC) $(@:d))
44 $(GNUCOPY) $< $(subst,$(fixme2),$(MISC) $@)
46 $(EXTENSIONDIR)/$(COMPONENT_CONFIGDESTSCHEMA)/%.xcs : %.xcs
47 @@-$(MKDIRHIER) $(subst,$(fixme4),$(MISC) $(@:d))
48 $(GNUCOPY) $< $(subst,$(fixme4),$(MISC) $@)
50 $(EXTENSIONDIR)/%.jar : $(SOLARBINDIR)/%.jar
51 @@-$(MKDIRHIER) $(@:d)
52 $(GNUCOPY) $< $@
54 .IF "$(COMPONENT_FILES)"!=""
55 COMPONENT_FILES_SRC*=./
56 # ugly hacking to workaround prepended first source path - also hits
57 # here in case of "just copied" .xcu files
58 $(COMPONENT_FILES) : $$(@:s|$(fixme2)|$(MISC)|:s|$(EXTENSIONDIR)/|$(COMPONENT_FILES_SRC)|)
59 @@-$(MKDIRHIER) $(@:s|$(fixme2)|$(MISC)|:d)
60 $(COMMAND_ECHO)$(COPY) $< $(@:s|$(fixme2)|$(MISC)|)
61 .ENDIF # "$(COMPONENT_FILES)"!=""
63 .IF "$(COMPONENT_JARFILES)"!=""
64 $(COMPONENT_JARFILES) : $(CLASSDIR)/$$(@:f)
65 @@-$(MKDIRHIER) $(@:d)
66 $(COMMAND_ECHO)$(COPY) $< $@
67 .ENDIF # "$(COMPONENT_JARFILES)"!=""
69 .IF "$(COMPONENT_LIBRARIES)"!=""
70 # TODO(Q3): strip the binary?
71 $(COMPONENT_LIBRARIES) : $(DLLDEST)/$$(@:f)
72 @@-$(MKDIRHIER) $(@:d)
73 $(COMMAND_ECHO)$(COPY) $< $@
74 .IF "$(OS)$(CPU)"=="WNTI"
75 .IF "$(COM)"=="GCC"
76 $(GNUCOPY) $(SOLARBINDIR)/mingwm10.dll $(EXTENSIONDIR)
77 .IF "$(MINGW_GCCDLL)"!=""
78 $(GNUCOPY) $(SOLARBINDIR)/$(MINGW_GCCDLL) $(EXTENSIONDIR)
79 .ENDIF
80 .IF "$(MINGW_GXXDLL)"!=""
81 $(GNUCOPY) $(SOLARBINDIR)/$(MINGW_GXXDLL) $(EXTENSIONDIR)
82 .ENDIF
83 .ELSE
84 .IF "$(PACKMS)"!=""
85 .IF "$(CCNUMVER)" <= "001399999999"
86 $(GNUCOPY) $(PACKMS)/msvcr71.dll $(EXTENSIONDIR)
87 $(GNUCOPY) $(PACKMS)/msvcp71.dll $(EXTENSIONDIR)
88 .ELSE # "$(CCNUMVER)" <= "001399999999"
89 .IF "$(CCNUMVER)" <= "001499999999"
90 $(GNUCOPY) $(PACKMS)/msvcr80.dll $(EXTENSIONDIR)
91 $(GNUCOPY) $(PACKMS)/msvcp80.dll $(EXTENSIONDIR)
92 $(GNUCOPY) $(PACKMS)/msvcm80.dll $(EXTENSIONDIR)
93 $(GNUCOPY) $(PACKMS)/Microsoft.VC80.CRT.manifest $(EXTENSIONDIR)
94 .ELSE # "$(CCNUMVER)" <= "001499999999"
95 $(GNUCOPY) $(PACKMS)/msvcr90.dll $(EXTENSIONDIR)
96 $(GNUCOPY) $(PACKMS)/msvcp90.dll $(EXTENSIONDIR)
97 $(GNUCOPY) $(PACKMS)/msvcm90.dll $(EXTENSIONDIR)
98 $(GNUCOPY) $(PACKMS)/Microsoft.VC90.CRT.manifest $(EXTENSIONDIR)
99 .ENDIF # "$(CCNUMVER)" <= "001499999999"
100 .ENDIF # "$(CCNUMVER)" <= "001399999999"
101 .ELSE # "$(PACKMS)"!=""
102 .IF "$(CCNUMVER)" <= "001399999999"
103 $(GNUCOPY) $(SOLARBINDIR)/msvcr71.dll $(EXTENSIONDIR)
104 $(GNUCOPY) $(SOLARBINDIR)/msvcp71.dll $(EXTENSIONDIR)
105 .ELSE # "$(CCNUMVER)" <= "001399999999"
106 .IF "$(CCNUMVER)" <= "001499999999"
107 $(GNUCOPY) $(SOLARBINDIR)/msvcr80.dll $(EXTENSIONDIR)
108 $(GNUCOPY) $(SOLARBINDIR)/msvcp80.dll $(EXTENSIONDIR)
109 $(GNUCOPY) $(SOLARBINDIR)/msvcm80.dll $(EXTENSIONDIR)
110 $(GNUCOPY) $(SOLARBINDIR)/Microsoft.VC80.CRT.manifest $(EXTENSIONDIR)
111 .ELSE # "$(CCNUMVER)" <= "001499999999"
112 $(GNUCOPY) $(SOLARBINDIR)/msvcr90.dll $(EXTENSIONDIR)
113 $(GNUCOPY) $(SOLARBINDIR)/msvcp90.dll $(EXTENSIONDIR)
114 $(GNUCOPY) $(SOLARBINDIR)/msvcm90.dll $(EXTENSIONDIR)
115 $(GNUCOPY) $(SOLARBINDIR)/Microsoft.VC90.CRT.manifest $(EXTENSIONDIR)
116 .ENDIF # "$(CCNUMVER)" <= "001499999999"
117 .ENDIF # "$(CCNUMVER)" <= "001399999999"
118 .ENDIF # "$(PACKMS)"!=""
119 .ENDIF #"$(COM)"=="GCC"
120 .ENDIF # "$(OS)$(CPU)"=="WNTI"
121 .ENDIF # "$(COMPONENT_LIBRARIES)"!=""
123 IMPLEMENTATION_IDENTIFIER*="com.sun.star.$(EXTENSIONNAME)-$(PLATFORMID)"
125 .INCLUDE .IGNORE : $(MISC)/$(TARGET)_lang_track.mk
126 .IF "$(LAST_WITH_LANG)"!="$(WITH_LANG)"
127 PHONYDESC=.PHONY
128 .ENDIF # "$(LAST_WITH_LANG)"!="$(WITH_LANG)"
129 .IF "$(DESCRIPTION)"!=""
130 $(DESCRIPTION) $(PHONYDESC) : $(DESCRIPTION_SRC)
131 @@-$(MKDIRHIER) $(@:d)
132 $(COMMAND_ECHO)$(PERL) $(SOLARENV)/bin/licinserter.pl $(DESCRIPTION_SRC) $(COMPONENT_LIC_TEMPL) $@.$(EXTNAME)
133 @echo LAST_WITH_LANG=$(WITH_LANG) > $(MISC)/$(TARGET)_lang_track.mk
134 $(COMMAND_ECHO)$(TYPE) $@.$(EXTNAME) | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(MISC)/desc.tmp.$(EXTNAME)
135 @@-$(RM) $@.$(EXTNAME)
136 $(COMMAND_ECHO)$(TYPE) $(MISC)/desc.tmp.$(EXTNAME) | sed s/UPDATED_SUPPORTED_PLATFORM/$(PLATFORMID)/ > $@
137 @@-$(RM) $(MISC)/desc.tmp.$(EXTNAME)
139 .ENDIF # "$(DESCRIPTION)"!=""
140 # default OOo license text!!!
141 # may not fit...
142 .IF "$(CUSTOM_LICENSE)"==""
143 .IF "$(GUI)" == "WNT"
144 PACKLICDEPS=$(SOLARBINDIR)/osl/license$$(@:b:s/_/./:e:s/./_/)$$(@:e)
145 .ELSE # "$(GUI)" == "WNT"
146 PACKLICDEPS=$(SOLARBINDIR)/osl/LICENSE$$(@:b:s/_/./:e:s/./_/)$$(@:e)
147 .ENDIF # "$(GUI)" == "WNT"
148 .ELSE # "$(CUSTOM_LICENSE)" == ""
149 PACKLICDEPS=$(CUSTOM_LICENSE)
150 .ENDIF # "$(CUSTOM_LICENSE)" == ""
151 .IF "$(PACKLICS)"!=""
152 $(PACKLICS) : $(PACKLICDEPS)
153 @@-$(MKDIRHIER) $(@:d)
154 $(COMMAND_ECHO)$(GNUCOPY) $< $@
155 .ENDIF # "$(PACKLICS)"!=""
157 .IF "$(COMPONENT_MANIFEST)"!=""
158 #$(COMPONENT_MANIFEST) : $$(@:f)
159 $(COMPONENT_MANIFEST) : $(MANIFEST_SRC) $(MANIFEST_DEPS)
160 @@-$(MKDIRHIER) $(@:d)
161 .IF "$(COMPONENT_MANIFEST_GENERIC)" == ""
162 $(COMMAND_ECHO)$(TYPE) $(MANIFEST_SRC) | $(SED) "s/SHARED_EXTENSION/$(DLLPOST)/" | $(SED) "s/EXEC_EXTENSION/$(EXECPOST)/" > $@
163 .ELSE # "$(COMPONENT_MANIFEST_GENERIC)" != ""
164 $(COMMAND_ECHO)$(PERL) $(SOLARENV)/bin/makemani.pl $(PRJ)/util/manifest.xml $(EXTENSIONDIR) $(COMPONENT_MANIFEST_SEARCHDIR) $(@:d:d)
165 .ENDIF # "$(COMPONENT_MANIFEST_GENERIC)" != ""
166 .ENDIF # "$(COMPONENT_MANIFEST)"!=""
168 ALLTAR : $(EXTENSION_PACKDEPS)