xref: /aoo4110/main/swext/mediawiki/makefile.mk (revision b1cdbd2c)
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=swext
26TARGET=mediawiki
27.IF "$(L10N_framework)"==""
28.IF "$(ENABLE_MEDIAWIKI)" == "YES"
29.INCLUDE : ant.mk
30
31.IF "$(SYSTEM_APACHE_COMMONS)" != "YES"
32COMMONS_CODEC_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-codec-1.9.jar
33COMMONS_LANG_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-lang3-3.3.jar
34COMMONS_HTTPCLIENT_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-httpclient-3.1.jar
35COMMONS_LOGGING_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-logging-1.1.3.jar
36.ELSE
37COMP=fix_system_commons
38.ENDIF
39
40.IF defined(debug) || defined(DEBUG)
41ANTDEBUG=true
42.ELSE
43ANTDEBUG=off
44.ENDIF
45
46ANT_FLAGS+=-Dcommons-codec-jar=$(COMMONS_CODEC_JAR) -Dcommons-lang-jar=$(COMMONS_LANG_JAR) -Dcommons-httpclient-jar=$(COMMONS_HTTPCLIENT_JAR) -Dcommons-logging-jar=$(COMMONS_LOGGING_JAR) -Dantdebug=$(ANTDEBUG)
47
48# creates two files wiki-publisher.oxt and mediawiki_develop.zip, the second one might be used in further build process
49ALLTAR: $(COMP) ANTBUILD
50
51fix_system_commons:
52	@echo "Fix Java Class-Path entry for Apache Commons libraries from system."
53	@$(SED) -i.bak -r -e "s#(name=\"Class-Path\" value=\").*\"#\1file://$(COMMONS_CODEC_JAR) file://$(COMMONS_LANG_JAR) \
54file://$(COMMONS_HTTPCLIENT_JAR) file://$(COMMONS_LOGGING_JAR)\"#" build.xml
55	@echo "Unbundle Apache Commons libraries from Mediawiki Presentation extension."
56	@$(SED) -i.bak '/file="..commons/d' build.xml
57
58.ELSE
59@all:
60	@echo "MediaWiki Publisher extension disabled."
61.ENDIF
62
63.ELSE
64pesudo:
65.ENDIF
66