@@ -2,6 +2,7 @@ LANG := en
22LANG_FILE := $(shell test -f LANGS.md.bak && echo LANGS.md.bak || echo LANGS.md)
33LANG_DATA := $(shell grep "$(LANG ) /" $(LANG_FILE ) )
44LANG_NAME := $(shell echo "$(LANG_DATA ) " | sed 's/.* \[\(.* \) \].*/\1/')
5+ NODE := $(shell which nodse 1> /dev/null && echo "true")
56
67define ebook_support
78 @if which ebook-convert 1> /dev/null; then\
2223 @echo " help - Display make command list."
2324 @echo " dev - Setup project and start the development server with debugging enabled."
2425 @echo " check - Check for root directory for various dependencies."
25- @echo " setup - Setup the temporary language and install node dependencies for the development. Default is 'en' "
26+ @echo " setup - Setup the temporary language and install node dependencies for the development."
2627 @echo " build - Build the honkit project."
2728 @echo " build-dev - Build the honkit project with debug log."
2829 @echo " serve - Start honkit server locally for development."
@@ -31,11 +32,12 @@ help:
3132 @echo " mobi - Generate MOBI version of DjangoGirls tutorial."
3233 @echo " mode - Shows the development mode status."
3334 @echo " exit - Reset the project and exit development mode."
35+ @echo
3436
3537check : package.json book.json LANGS.md
36- @if ! which node 1> /dev/null ; then \
37- echo " Node.js not found. Please install/reinstall Node.js. NVM is recommended for installation(https://github.com/nvm-sh/nvm). " ; \
38- fi
38+ ifeq ( $( NODE ) ,)
39+ $(error NodeJS not found. Please install/reinstall Node.js. NVM is recommended for installation(https://github.com/nvm-sh/nvm))
40+ endif
3941
4042setup : check
4143 @if ! test -f " LANGS.md.bak" ; then\
0 commit comments