summaryrefslogtreecommitdiffstats
path: root/parser/html/java/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /parser/html/java/Makefile
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'parser/html/java/Makefile')
-rw-r--r--parser/html/java/Makefile52
1 files changed, 52 insertions, 0 deletions
diff --git a/parser/html/java/Makefile b/parser/html/java/Makefile
new file mode 100644
index 0000000000..5dd7d6bb0a
--- /dev/null
+++ b/parser/html/java/Makefile
@@ -0,0 +1,52 @@
+# 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 .
+
+sync_javaparser:: \
+; if [ ! -d javaparser/.git ] ; \
+ then rm -rf javaparser ; \
+ git clone https://github.com/javaparser/javaparser.git ; \
+ fi ; \
+ cd javaparser ; git checkout javaparser-1.0.6 ; cd ..
+
+sync_htmlparser:: \
+; if [ -d htmlparser/.hg ] ; \
+ then echo "The htmlparser repo has move to GitHub. Please remove the htmlparser directory and resync." ; exit ; \
+ elif [ ! -d htmlparser/.git ] ; \
+ then rm -rf htmlparser ; \
+ git clone https://github.com/validator/htmlparser.git ; \
+ cd htmlparser ; git checkout master ; cd .. ; \
+ fi
+
+sync:: sync_javaparser sync_htmlparser
+
+translate:: translator \
+; mkdir -p ../javasrc ; \
+ java -jar translator.jar \
+ htmlparser/src/nu/validator/htmlparser/impl \
+ .. ../../../xpcom/ds/StaticAtoms.py ../../../xpcom/ds/HTMLAtoms.py
+
+translate_from_snapshot:: translator \
+; mkdir -p ../javasrc ; \
+ java -jar translator.jar \
+ ../javasrc \
+ .. ../../../xpcom/ds/StaticAtoms.py ../../../xpcom/ds/HTMLAtoms.py
+
+named_characters:: translator \
+; java -cp translator.jar \
+ nu.validator.htmlparser.generator.GenerateNamedCharactersCpp \
+ named-character-references.html ../