Skip to content

Commit

Permalink
Simplify Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Hongxin Liang <[email protected]>
  • Loading branch information
honnix committed Mar 26, 2021
1 parent ce7b015 commit 0838c06
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
define PIP_COMPILE
pip-compile $(1) --upgrade --verbose
endef
PIP_COMPILE = pip-compile --upgrade --verbose

.SILENT: help
.PHONY: help
Expand Down Expand Up @@ -49,19 +47,19 @@ unit_test:

requirements-spark2.txt: export CUSTOM_COMPILE_COMMAND := make requirements-spark2.txt
requirements-spark2.txt: requirements-spark2.in install-piptools
$(call PIP_COMPILE,requirements-spark2.in)
$(PIP_COMPILE) $<

requirements.txt: export CUSTOM_COMPILE_COMMAND := make requirements.txt
requirements.txt: install-piptools
$(call PIP_COMPILE,requirements.in)
requirements.txt: requirements.in install-piptools
$(PIP_COMPILE) $<

dev-requirements.txt: export CUSTOM_COMPILE_COMMAND := make dev-requirements.txt
dev-requirements.txt: requirements.txt install-piptools
$(call PIP_COMPILE,dev-requirements.in)
dev-requirements.txt: dev-requirements.in requirements.txt install-piptools
$(PIP_COMPILE) $<

doc-requirements.txt: export CUSTOM_COMPILE_COMMAND := make doc-requirements.txt
doc-requirements.txt: dev-requirements.txt install-piptools
$(call PIP_COMPILE,doc-requirements.in)
doc-requirements.txt: doc-requirements.in install-piptools
$(PIP_COMPILE) $<

.PHONY: requirements
requirements: requirements.txt dev-requirements.txt requirements-spark2.txt doc-requirements.txt ## Compile requirements
Expand Down

0 comments on commit 0838c06

Please sign in to comment.