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