Skip to content

Commit 125e210

Browse files
committed
Add build and requirements recipes to Makefile
The requirements recipe installs requirements for all plugins along with the main project requirement. Signed-off-by: Nabarun Pal <[email protected]>
1 parent dd3e855 commit 125e210

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ INPUTDIR=$(BASEDIR)/content
66
OUTPUTDIR=$(BASEDIR)/output
77
CONFFILE=$(BASEDIR)/pelicanconf.py
88

9+
PLUGIN_REQUIREMENTS=$(wildcard plugins/*/requirements.txt)
10+
911
PORT ?= 8000
1012
BIND ?= 127.0.0.1
1113

@@ -33,6 +35,12 @@ help:
3335
@echo 'Set PUBLISH to True in `make html` to publish, e.g. make html PUBLISH=True '
3436
@echo ' '
3537

38+
requirements:
39+
pip install -r requirements.txt
40+
for requirement in $(PLUGIN_REQUIREMENTS); do \
41+
pip install -r $$requirement; \
42+
done
43+
3644
html: $(INPUTDIR) $(CONFFILE) $(OUTPUTDIR)
3745

3846
$(OUTPUTDIR):
@@ -42,6 +50,8 @@ else
4250
$(GENERATOR)
4351
endif
4452

53+
build: requirements html
54+
4555
clean:
4656
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
4757

0 commit comments

Comments
 (0)