File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,26 @@ all: $(VENV)/bin/sphinx-build $(VENV)/bin/blurb clone ## Automatically build an
5353 for file in * .po * /* .po; do ln -f $$ file $( LC_MESSAGES) /$$ file; done
5454 . $(VENV ) /bin/activate; $(MAKE ) -C $(CPYTHON_CLONE ) /Doc/ SPHINXOPTS=' -j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE )
5555
56+ .PHONY : build
57+ build/% : $(VENV ) /bin/sphinx-build $(VENV ) /bin/blurb clone # # Automatically build an html local version
58+ @if [ ! -f " $* .po" ] ; then \
59+ echo " \x1B[1;31m" " ERROR: $* .po not exist" " \x1B[m" ; exit 1; \
60+ exit 1; \
61+ fi
62+ @mkdir -p $(LC_MESSAGES )
63+ @$(eval dir=`echo $* | xargs -n1 dirname`) # # Get dir
64+ # If the build target is in under directory
65+ # We should make direcotry in $(LC_MESSAGES) and link the file.
66+ @if [ $(dir) != "." ]; then \
67+ echo "mkdir -p $(LC_MESSAGES)/$(dir)"; \
68+ mkdir -p $(LC_MESSAGES)/$(dir); \
69+ echo "ln -f ./$*.po $(LC_MESSAGES)/$*.po"; \
70+ ln -f ./$*.po $(LC_MESSAGES)/$*.po; \
71+ fi
72+ # Build
73+ @echo "----"
74+ @. $(VENV)/bin/activate; $(MAKE) -C $(CPYTHON_CLONE)/Doc/ SPHINXOPTS='-j$(JOBS) -D language=$(LANGUAGE) -D locale_dirs=locales -D gettext_compact=0' SOURCES='$*.rst' html
75+
5676help :
5777 @python3 -c " $$ PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST )
5878
You can’t perform that action at this time.
0 commit comments