Skip to content

Commit

Permalink
Add build and requirements recipes to Makefile
Browse files Browse the repository at this point in the history
The requirements recipe installs requirements for all plugins along
with the main project requirement.

Signed-off-by: Nabarun Pal <[email protected]>
  • Loading branch information
palnabarun committed Jul 8, 2020
1 parent dd3e855 commit 125e210
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/output
CONFFILE=$(BASEDIR)/pelicanconf.py

PLUGIN_REQUIREMENTS=$(wildcard plugins/*/requirements.txt)

PORT ?= 8000
BIND ?= 127.0.0.1

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

requirements:
pip install -r requirements.txt
for requirement in $(PLUGIN_REQUIREMENTS); do \
pip install -r $$requirement; \
done

html: $(INPUTDIR) $(CONFFILE) $(OUTPUTDIR)

$(OUTPUTDIR):
Expand All @@ -42,6 +50,8 @@ else
$(GENERATOR)
endif

build: requirements html

clean:
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)

Expand Down

0 comments on commit 125e210

Please sign in to comment.