@@ -2,6 +2,7 @@ LANG := en
2
2
LANG_FILE := $(shell test -f LANGS.md.bak && echo LANGS.md.bak || echo LANGS.md)
3
3
LANG_DATA := $(shell grep "$(LANG ) /" $(LANG_FILE ) )
4
4
LANG_NAME := $(shell echo "$(LANG_DATA ) " | sed 's/.* \[\(.* \) \].*/\1/')
5
+ NODE := $(shell which nodse 1> /dev/null && echo "true")
5
6
6
7
define ebook_support
7
8
@if which ebook-convert 1> /dev/null; then\
22
23
@echo " help - Display make command list."
23
24
@echo " dev - Setup project and start the development server with debugging enabled."
24
25
@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."
26
27
@echo " build - Build the honkit project."
27
28
@echo " build-dev - Build the honkit project with debug log."
28
29
@echo " serve - Start honkit server locally for development."
@@ -31,11 +32,12 @@ help:
31
32
@echo " mobi - Generate MOBI version of DjangoGirls tutorial."
32
33
@echo " mode - Shows the development mode status."
33
34
@echo " exit - Reset the project and exit development mode."
35
+ @echo
34
36
35
37
check : 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
39
41
40
42
setup : check
41
43
@if ! test -f " LANGS.md.bak" ; then\
0 commit comments