1*b1cdbd2cSJim Jagielski#**************************************************************
2*b1cdbd2cSJim Jagielski#
3*b1cdbd2cSJim Jagielski#  Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski#  or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski#  distributed with this work for additional information
6*b1cdbd2cSJim Jagielski#  regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski#  to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski#  "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski#  with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski#
11*b1cdbd2cSJim Jagielski#    http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski#
13*b1cdbd2cSJim Jagielski#  Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski#  software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski#  KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski#  specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski#  under the License.
19*b1cdbd2cSJim Jagielski#
20*b1cdbd2cSJim Jagielski#**************************************************************
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim JagielskiPRJ = ../../..
25*b1cdbd2cSJim JagielskiPRJNAME = desktop
26*b1cdbd2cSJim JagielskiTARGET = test_deployment_passive
27*b1cdbd2cSJim Jagielski
28*b1cdbd2cSJim JagielskiENABLE_EXCEPTIONS = TRUE
29*b1cdbd2cSJim Jagielski
30*b1cdbd2cSJim JagielskiPACKAGE = com/sun/star/comp/test/deployment/passive_java
31*b1cdbd2cSJim JagielskiJAVAFILES = Dispatch.java Provider.java Services.java
32*b1cdbd2cSJim JagielskiJARFILES = juh.jar ridl.jar unoil.jar
33*b1cdbd2cSJim Jagielski
34*b1cdbd2cSJim Jagielskimy_platform_components = passive_native
35*b1cdbd2cSJim Jagielskimy_generic_components = passive_java passive_python
36*b1cdbd2cSJim Jagielski
37*b1cdbd2cSJim Jagielski.INCLUDE: settings.mk
38*b1cdbd2cSJim Jagielski
39*b1cdbd2cSJim JagielskiDLLPRE =
40*b1cdbd2cSJim Jagielski
41*b1cdbd2cSJim JagielskiSLOFILES = $(SHL1OBJS)
42*b1cdbd2cSJim Jagielski
43*b1cdbd2cSJim JagielskiSHL1TARGET = passive_native.uno
44*b1cdbd2cSJim JagielskiSHL1OBJS = $(SLO)/passive_native.obj
45*b1cdbd2cSJim JagielskiSHL1RPATH = OXT
46*b1cdbd2cSJim JagielskiSHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB)
47*b1cdbd2cSJim JagielskiSHL1VERSIONMAP = $(SOLARENV)/src/component.map
48*b1cdbd2cSJim JagielskiDEF1NAME = $(SHL1TARGET)
49*b1cdbd2cSJim Jagielski
50*b1cdbd2cSJim Jagielski.INCLUDE: target.mk
51*b1cdbd2cSJim Jagielski
52*b1cdbd2cSJim JagielskiALLTAR : $(MISC)/passive.oxt
53*b1cdbd2cSJim Jagielski
54*b1cdbd2cSJim Jagielski$(MISC)/passive.oxt : manifest.xml description.xml Addons.xcu \
55*b1cdbd2cSJim Jagielski        ProtocolHandler.xcu $(MISC)/$(TARGET)/platform.components \
56*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/generic.components $(SHL1TARGETN) \
57*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/passive_java.jar passive_python.py
58*b1cdbd2cSJim Jagielski    $(RM) $@
59*b1cdbd2cSJim Jagielski    $(RM) -r $(MISC)/$(TARGET)/passive.oxt-zip
60*b1cdbd2cSJim Jagielski    $(MKDIR) $(MISC)/$(TARGET)/passive.oxt-zip
61*b1cdbd2cSJim Jagielski    $(MKDIRHIER) $(MISC)/$(TARGET)/passive.oxt-zip/META-INF
62*b1cdbd2cSJim Jagielski    $(SED) -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' < manifest.xml \
63*b1cdbd2cSJim Jagielski        > $(MISC)/$(TARGET)/passive.oxt-zip/META-INF/manifest.xml
64*b1cdbd2cSJim Jagielski    $(COPY) description.xml Addons.xcu ProtocolHandler.xcu \
65*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/platform.components \
66*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/generic.components $(SHL1TARGETN) \
67*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/passive_java.jar passive_python.py \
68*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/passive.oxt-zip/
69*b1cdbd2cSJim Jagielski    cd $(MISC)/$(TARGET)/passive.oxt-zip && zip ../../passive.oxt \
70*b1cdbd2cSJim Jagielski        META-INF/manifest.xml description.xml Addons.xcu ProtocolHandler.xcu \
71*b1cdbd2cSJim Jagielski        platform.components generic.components $(SHL1TARGETN:f) \
72*b1cdbd2cSJim Jagielski        passive_java.jar passive_python.py
73*b1cdbd2cSJim Jagielski
74*b1cdbd2cSJim Jagielski$(MISC)/$(TARGET)/platform.components : $(SOLARENV)/bin/packcomponents.xslt \
75*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/platform.components.input \
76*b1cdbd2cSJim Jagielski        $(my_platform_components:^"$(MISC)/$(TARGET)/":+".component")
77*b1cdbd2cSJim Jagielski    $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/$(TARGET)/ -o $@ \
78*b1cdbd2cSJim Jagielski        $(SOLARENV)/bin/packcomponents.xslt \
79*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/platform.components.input
80*b1cdbd2cSJim Jagielski
81*b1cdbd2cSJim Jagielski$(MISC)/$(TARGET)/platform.components.input :
82*b1cdbd2cSJim Jagielski    $(MKDIRHIER) $(@:d)
83*b1cdbd2cSJim Jagielski    echo '<list>' \
84*b1cdbd2cSJim Jagielski        '$(my_platform_components:^"<filename>":+".component</filename>")' \
85*b1cdbd2cSJim Jagielski        '</list>' > $@
86*b1cdbd2cSJim Jagielski
87*b1cdbd2cSJim Jagielski$(MISC)/$(TARGET)/generic.components : $(SOLARENV)/bin/packcomponents.xslt \
88*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/generic.components.input \
89*b1cdbd2cSJim Jagielski        $(my_generic_components:^"$(MISC)/$(TARGET)/":+".component")
90*b1cdbd2cSJim Jagielski    $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/$(TARGET)/ -o $@ \
91*b1cdbd2cSJim Jagielski        $(SOLARENV)/bin/packcomponents.xslt \
92*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/generic.components.input
93*b1cdbd2cSJim Jagielski
94*b1cdbd2cSJim Jagielski$(MISC)/$(TARGET)/generic.components.input :
95*b1cdbd2cSJim Jagielski    $(MKDIRHIER) $(@:d)
96*b1cdbd2cSJim Jagielski    echo '<list>' \
97*b1cdbd2cSJim Jagielski        '$(my_generic_components:^"<filename>":+".component</filename>")' \
98*b1cdbd2cSJim Jagielski        '</list>' > $@
99*b1cdbd2cSJim Jagielski
100*b1cdbd2cSJim Jagielski$(MISC)/$(TARGET)/passive_native.component : \
101*b1cdbd2cSJim Jagielski        $(SOLARENV)/bin/createcomponent.xslt passive_native.component
102*b1cdbd2cSJim Jagielski    $(MKDIRHIER) $(@:d)
103*b1cdbd2cSJim Jagielski    $(XSLTPROC) --nonet --stringparam uri \
104*b1cdbd2cSJim Jagielski        '$(COMPONENTPREFIX_EXTENSION)$(SHL1TARGETN:f)' -o $@ \
105*b1cdbd2cSJim Jagielski        $(SOLARENV)/bin/createcomponent.xslt passive_native.component
106*b1cdbd2cSJim Jagielski
107*b1cdbd2cSJim Jagielski$(MISC)/$(TARGET)/passive_java.component : \
108*b1cdbd2cSJim Jagielski        $(SOLARENV)/bin/createcomponent.xslt passive_java.component
109*b1cdbd2cSJim Jagielski    $(MKDIRHIER) $(@:d)
110*b1cdbd2cSJim Jagielski    $(XSLTPROC) --nonet --stringparam uri \
111*b1cdbd2cSJim Jagielski        '$(COMPONENTPREFIX_EXTENSION)passive_java.jar' -o $@ \
112*b1cdbd2cSJim Jagielski        $(SOLARENV)/bin/createcomponent.xslt passive_java.component
113*b1cdbd2cSJim Jagielski
114*b1cdbd2cSJim Jagielski$(MISC)/$(TARGET)/passive_python.component : \
115*b1cdbd2cSJim Jagielski        $(SOLARENV)/bin/createcomponent.xslt passive_python.component
116*b1cdbd2cSJim Jagielski    $(MKDIRHIER) $(@:d)
117*b1cdbd2cSJim Jagielski    $(XSLTPROC) --nonet --stringparam uri \
118*b1cdbd2cSJim Jagielski        '$(COMPONENTPREFIX_EXTENSION)passive_python.py' -o $@ \
119*b1cdbd2cSJim Jagielski        $(SOLARENV)/bin/createcomponent.xslt passive_python.component
120*b1cdbd2cSJim Jagielski
121*b1cdbd2cSJim Jagielski$(MISC)/$(TARGET)/passive_java.jar : MANIFEST.MF $(JAVATARGET)
122*b1cdbd2cSJim Jagielski    $(MKDIRHIER) $(@:d)
123*b1cdbd2cSJim Jagielski    $(RM) $@
124*b1cdbd2cSJim Jagielski    $(RM) -r $(MISC)/$(TARGET)/passive_java.jar-zip
125*b1cdbd2cSJim Jagielski    $(MKDIR) $(MISC)/$(TARGET)/passive_java.jar-zip
126*b1cdbd2cSJim Jagielski    $(MKDIRHIER) $(MISC)/$(TARGET)/passive_java.jar-zip/META-INF \
127*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/passive_java.jar-zip/$(PACKAGE)
128*b1cdbd2cSJim Jagielski    $(COPY) MANIFEST.MF $(MISC)/$(TARGET)/passive_java.jar-zip/META-INF/
129*b1cdbd2cSJim Jagielski    $(COPY) $(foreach,i,$(JAVAFILES:b) $(CLASSDIR)/$(PACKAGE)/$i.class) \
130*b1cdbd2cSJim Jagielski        $(MISC)/$(TARGET)/passive_java.jar-zip/$(PACKAGE)/
131*b1cdbd2cSJim Jagielski    cd $(MISC)/$(TARGET)/passive_java.jar-zip && zip ../passive_java.jar \
132*b1cdbd2cSJim Jagielski        META-INF/MANIFEST.MF $(foreach,i,$(JAVAFILES:b) $(PACKAGE)/$i.class)
133