diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-13 09:29:30 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-13 09:32:00 +0100 |
commit | aa2ac8ddedbfd9fc27a5cf8c3da41ad700ae5347 (patch) | |
tree | f04b844c58d310e47578bf1fc75cf5e24453dc3b /parser/html/java/Makefile | |
parent | 60dc9eaa95b96abbe881063b62304a58eadd6b8e (diff) | |
download | UXP-aa2ac8ddedbfd9fc27a5cf8c3da41ad700ae5347.tar UXP-aa2ac8ddedbfd9fc27a5cf8c3da41ad700ae5347.tar.gz UXP-aa2ac8ddedbfd9fc27a5cf8c3da41ad700ae5347.tar.lz UXP-aa2ac8ddedbfd9fc27a5cf8c3da41ad700ae5347.tar.xz UXP-aa2ac8ddedbfd9fc27a5cf8c3da41ad700ae5347.zip |
Reinstate the java->c++ source, generator code + documentation.
We've kept the java source up-to-date until its removal, so there should
be very little additional java mangling needed to have it back up to
speed and usable again.
This reverts commit c6446f1126232935c85397aac493113dd38496cd.
Diffstat (limited to 'parser/html/java/Makefile')
-rw-r--r-- | parser/html/java/Makefile | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/parser/html/java/Makefile b/parser/html/java/Makefile new file mode 100644 index 000000000..b43523e03 --- /dev/null +++ b/parser/html/java/Makefile @@ -0,0 +1,59 @@ +# 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 cd htmlparser ; hg pull --rebase ; cd .. ; \ + else \ + rm -rf htmlparser ; \ + hg clone https://hg.mozilla.org/projects/htmlparser ; \ + fi + +sync:: sync_javaparser sync_htmlparser + +translate:: translator \ +; mkdir -p ../javasrc ; \ + java -jar translator.jar \ + htmlparser/src/nu/validator/htmlparser/impl \ + .. ../nsHtml5AtomList.h + +translate_from_snapshot:: 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:: clean_javaparser clean_htmlparser |