summaryrefslogtreecommitdiff
path: root/parser/html/java/Makefile
blob: 8c3fe0140bd1a2cf35eb9197c35d215121b67626 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

libs:: translator

translator:: javaparser \
; mkdir -p htmlparser/bin && \
  find htmlparser/translator-src/nu/validator/htmlparser -name "*.java" | \
    xargs javac -cp javaparser.jar -g -d htmlparser/bin && \
  jar cfm translator.jar manifest.txt -C htmlparser/bin .

javaparser:: \
; mkdir -p javaparser/bin && find javaparser/src -name "*.java" | \
    xargs javac -encoding ISO-8859-1 -g -d javaparser/bin && \
  jar cf javaparser.jar -C javaparser/bin .

translate:: translator \
; mkdir -p ../javasrc ; \
  java -jar translator.jar \
    htmlparser/src/nu/validator/htmlparser/impl \
    .. ../nsHtml5AtomList.h

translate-javasrc:: translator \
; mkdir -p ../javasrc ; \
  java -jar translator.jar \
    ../javasrc \
    .. ../nsHtml5AtomList.h

named-characters:: translator \
; java -cp translator.jar \
    nu.validator.htmlparser.generator.GenerateNamedCharactersCpp \
      named-character-references.html ../

clean-javaparser:: \
; rm -rf javaparser/bin javaparser.jar

clean-htmlparser:: \
; rm -rf htmlparser/bin translator.jar

clean-javasrc:: \
; rm -rf ../javasrc

clean:: clean-javaparser clean-htmlparser clean-javasrc