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 = desktop
26TARGET = test_deployment_passive
27
28ENABLE_EXCEPTIONS = TRUE
29
30PACKAGE = com/sun/star/comp/test/deployment/passive_java
31JAVAFILES = Dispatch.java Provider.java Services.java
32JARFILES = juh.jar ridl.jar unoil.jar
33
34my_platform_components = passive_native
35my_generic_components = passive_java passive_python
36
37.INCLUDE: settings.mk
38
39DLLPRE =
40
41SLOFILES = $(SHL1OBJS)
42
43SHL1TARGET = passive_native.uno
44SHL1OBJS = $(SLO)/passive_native.obj
45SHL1RPATH = OXT
46SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB)
47SHL1VERSIONMAP = $(SOLARENV)/src/component.map
48DEF1NAME = $(SHL1TARGET)
49
50.INCLUDE: target.mk
51
52ALLTAR : $(MISC)/passive.oxt
53
54$(MISC)/passive.oxt : manifest.xml description.xml Addons.xcu \
55        ProtocolHandler.xcu $(MISC)/$(TARGET)/platform.components \
56        $(MISC)/$(TARGET)/generic.components $(SHL1TARGETN) \
57        $(MISC)/$(TARGET)/passive_java.jar passive_python.py
58    $(RM) $@
59    $(RM) -r $(MISC)/$(TARGET)/passive.oxt-zip
60    $(MKDIR) $(MISC)/$(TARGET)/passive.oxt-zip
61    $(MKDIRHIER) $(MISC)/$(TARGET)/passive.oxt-zip/META-INF
62    $(SED) -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' < manifest.xml \
63        > $(MISC)/$(TARGET)/passive.oxt-zip/META-INF/manifest.xml
64    $(COPY) description.xml Addons.xcu ProtocolHandler.xcu \
65        $(MISC)/$(TARGET)/platform.components \
66        $(MISC)/$(TARGET)/generic.components $(SHL1TARGETN) \
67        $(MISC)/$(TARGET)/passive_java.jar passive_python.py \
68        $(MISC)/$(TARGET)/passive.oxt-zip/
69    cd $(MISC)/$(TARGET)/passive.oxt-zip && zip ../../passive.oxt \
70        META-INF/manifest.xml description.xml Addons.xcu ProtocolHandler.xcu \
71        platform.components generic.components $(SHL1TARGETN:f) \
72        passive_java.jar passive_python.py
73
74$(MISC)/$(TARGET)/platform.components : $(SOLARENV)/bin/packcomponents.xslt \
75        $(MISC)/$(TARGET)/platform.components.input \
76        $(my_platform_components:^"$(MISC)/$(TARGET)/":+".component")
77    $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/$(TARGET)/ -o $@ \
78        $(SOLARENV)/bin/packcomponents.xslt \
79        $(MISC)/$(TARGET)/platform.components.input
80
81$(MISC)/$(TARGET)/platform.components.input :
82    $(MKDIRHIER) $(@:d)
83    echo '<list>' \
84        '$(my_platform_components:^"<filename>":+".component</filename>")' \
85        '</list>' > $@
86
87$(MISC)/$(TARGET)/generic.components : $(SOLARENV)/bin/packcomponents.xslt \
88        $(MISC)/$(TARGET)/generic.components.input \
89        $(my_generic_components:^"$(MISC)/$(TARGET)/":+".component")
90    $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/$(TARGET)/ -o $@ \
91        $(SOLARENV)/bin/packcomponents.xslt \
92        $(MISC)/$(TARGET)/generic.components.input
93
94$(MISC)/$(TARGET)/generic.components.input :
95    $(MKDIRHIER) $(@:d)
96    echo '<list>' \
97        '$(my_generic_components:^"<filename>":+".component</filename>")' \
98        '</list>' > $@
99
100$(MISC)/$(TARGET)/passive_native.component : \
101        $(SOLARENV)/bin/createcomponent.xslt passive_native.component
102    $(MKDIRHIER) $(@:d)
103    $(XSLTPROC) --nonet --stringparam uri \
104        '$(COMPONENTPREFIX_EXTENSION)$(SHL1TARGETN:f)' -o $@ \
105        $(SOLARENV)/bin/createcomponent.xslt passive_native.component
106
107$(MISC)/$(TARGET)/passive_java.component : \
108        $(SOLARENV)/bin/createcomponent.xslt passive_java.component
109    $(MKDIRHIER) $(@:d)
110    $(XSLTPROC) --nonet --stringparam uri \
111        '$(COMPONENTPREFIX_EXTENSION)passive_java.jar' -o $@ \
112        $(SOLARENV)/bin/createcomponent.xslt passive_java.component
113
114$(MISC)/$(TARGET)/passive_python.component : \
115        $(SOLARENV)/bin/createcomponent.xslt passive_python.component
116    $(MKDIRHIER) $(@:d)
117    $(XSLTPROC) --nonet --stringparam uri \
118        '$(COMPONENTPREFIX_EXTENSION)passive_python.py' -o $@ \
119        $(SOLARENV)/bin/createcomponent.xslt passive_python.component
120
121$(MISC)/$(TARGET)/passive_java.jar : MANIFEST.MF $(JAVATARGET)
122    $(MKDIRHIER) $(@:d)
123    $(RM) $@
124    $(RM) -r $(MISC)/$(TARGET)/passive_java.jar-zip
125    $(MKDIR) $(MISC)/$(TARGET)/passive_java.jar-zip
126    $(MKDIRHIER) $(MISC)/$(TARGET)/passive_java.jar-zip/META-INF \
127        $(MISC)/$(TARGET)/passive_java.jar-zip/$(PACKAGE)
128    $(COPY) MANIFEST.MF $(MISC)/$(TARGET)/passive_java.jar-zip/META-INF/
129    $(COPY) $(foreach,i,$(JAVAFILES:b) $(CLASSDIR)/$(PACKAGE)/$i.class) \
130        $(MISC)/$(TARGET)/passive_java.jar-zip/$(PACKAGE)/
131    cd $(MISC)/$(TARGET)/passive_java.jar-zip && zip ../passive_java.jar \
132        META-INF/MANIFEST.MF $(foreach,i,$(JAVAFILES:b) $(PACKAGE)/$i.class)
133