Skip to content

Commit

Permalink
build: remove rules for installing OpenCC data in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiredPlanck committed Oct 12, 2024
1 parent ca9a8ab commit 28835a8
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mainDir=app/src/main
resDir=$(mainDir)/res
jniDir=$(mainDir)/jni

.PHONY: all clean build debug spotlessCheck spotlessApply clang-format-lint clang-format style-lint style-apply release install opencc-data translate ndk android
.PHONY: all clean build debug spotlessCheck spotlessApply clang-format-lint clang-format style-lint style-apply release install translate ndk android

all: release

Expand Down Expand Up @@ -56,7 +56,7 @@ cliff:
git-cliff -o CHANGELOG.md

TRANSLATE=$(resDir)/values-zh-rCN/strings.xml
release: opencc-data style-lint
release: style-lint
./gradlew assembleRelease

install: release
Expand All @@ -69,20 +69,6 @@ $(TRANSLATE): $(resDir)/values-zh-rTW/strings.xml

translate: $(TRANSLATE)

opencc-data: srcDir = $(jniDir)/OpenCC/data
opencc-data: targetDir = $(mainDir)/assets/shared/opencc
opencc-data:
@echo "copy opencc data"
@rm -rf $(targetDir)
@mkdir -p $(targetDir)
@cp $(srcDir)/dictionary/*.txt $(targetDir)/
@cp $(srcDir)/config/*.json $(targetDir)/
@rm $(targetDir)/TWPhrases*.txt
@python $(srcDir)/scripts/merge.py $(srcDir)/dictionary/TWPhrases*.txt $(targetDir)/TWPhrases.txt
@python $(srcDir)/scripts/reverse.py $(targetDir)/TWPhrases.txt $(targetDir)/TWPhrasesRev.txt
@python $(srcDir)/scripts/reverse.py $(srcDir)/dictionary/TWVariants.txt $(targetDir)/TWVariantsRev.txt
@python $(srcDir)/scripts/reverse.py $(srcDir)/dictionary/HKVariants.txt $(targetDir)/HKVariantsRev.txt

ndk:
(cd $(mainDir); ndk-build)

Expand Down

0 comments on commit 28835a8

Please sign in to comment.