Skip to content

Commit

Permalink
Merge pull request #203 from stweil/build
Browse files Browse the repository at this point in the history
Rename build directory for tesseract
  • Loading branch information
bertsky authored Apr 29, 2024
2 parents ed73d96 + 196d2f4 commit bf93020
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ test-workspace
/.coverage
/htmlcov
/.cache
build_tesseract
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ help:
@echo " docker Build docker image"
@echo " clean Remove temporary files"
@echo " clean-assets Remove only test/assets"
@echo " clean-tesseract Remove only build_tesseract"
@echo " clean-tesseract Remove only build/tesseract"
@echo ""
@echo " Variables"
@echo ""
Expand Down Expand Up @@ -111,15 +111,15 @@ install-tesseract: $(TESSERACT_PREFIX)/bin/tesseract

install-tesseract-training: $(TESSERACT_PREFIX)/bin/lstmtraining

$(TESSERACT_PREFIX)/bin/tesseract: build_tesseract/Makefile
$(MAKE) -C build_tesseract install
$(TESSERACT_PREFIX)/bin/tesseract: build/tesseract/Makefile
$(MAKE) -C build/tesseract install
if [[ "$(TESSERACT_PREFIX)" = "/usr"* ]]; then ldconfig; fi

$(TESSERACT_PREFIX)/bin/lstmtraining: build_tesseract/Makefile
$(MAKE) -C build_tesseract training-install
$(TESSERACT_PREFIX)/bin/lstmtraining: build/tesseract/Makefile
$(MAKE) -C build/tesseract training-install

TESSERACT_CONFIG ?= --disable-openmp --disable-shared CXXFLAGS="-g -O2 -fPIC -fno-math-errno -Wall -Wextra -Wpedantic"
build_tesseract/Makefile: repo/tesseract/Makefile.in
build/tesseract/Makefile: repo/tesseract/Makefile.in
mkdir -p $(@D)
cd $(@D) && $(CURDIR)/repo/tesseract/configure \
--prefix=$(TESSERACT_PREFIX) \
Expand Down Expand Up @@ -180,7 +180,7 @@ test/assets: repo/assets
clean: clean-assets clean-tesseract

clean-tesseract:
$(RM) -rf $(CURDIR)/build_tesseract
$(RM) -rf $(CURDIR)/build/tesseract
cd repo/tesseract; make distclean

.PHONY: clean-assets
Expand Down

0 comments on commit bf93020

Please sign in to comment.