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=..
25
26.INCLUDE :	settings.mk
27
28version=4.5.0
29
30.IF "$(RAT_JAR_HOME)"=="BUILD"
31rat_jar_home=$(CLASSDIR)
32.ELSE
33rat_jar_home=$(RAT_JAR_HOME)
34.ENDIF
35.IF "$(OS)"=="WNT"
36rat_jar_home!:=$(shell cygpath -u $(rat_jar_home))
37.ENDIF
38
39rat_scan_output:=$(MISC)/rat-output.xml
40.IF "$(OS)"=="WNT"
41rat_scan_output!:=$(shell cygpath -m $(rat_scan_output))
42.ENDIF
43
44all : $(MISC)/aoo-$(version)_rat-scan-output.html
45
46show-excludes .PHONY : $(MISC)/excluded-files.txt
47
48$(MISC)/aoo-$(version)_rat-scan-output.html : $(MISC)/rat-scan-output.xml
49	java -jar $(OUTDIR)/bin/saxon9.jar -t -s:$< -xsl:rat-output-to-html.xsl -o:$@ -l:on -warnings:fatal
50	@echo
51	@echo Find rat scan report in $@
52
53$(MISC)/rat-scan-output.xml .PHONY : rat-scan.xml $(SRC_ROOT)/rat-excludes
54	$(ANT) -f rat-scan.xml -DRAT_SCAN_OUTPUT=$@ -DRAT_JAR_HOME=$(rat_jar_home)
55
56$(MISC)/excluded-files.txt : $(MISC)/excluded-files-raw.txt
57	cat $< | sed 's/;/\n/g' > $@
58
59$(MISC)/excluded-files-raw.txt : rat-scan.xml $(SRC_ROOT)/rat-excludes
60	$(ANT) -f rat-scan.xml -DEXCLUDED_FILES_OUTPUT=$@ -DEXCLUDED_SOLVER_OUTPUT=$@ \
61		-DRAT_JAR_HOME=$(rat_jar_home) show-excluded-files
62