Skip to content

Commit 2a0156d

Browse files
committed
Prompt to bootstrap python.make if not loaded.
1 parent 1dbb8af commit 2a0156d

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

GNUmakefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@
77
# ----------------------------------------------------------------------------
88

99
.PHONY: all
10-
all: python-help
10+
all:
1111

12+
ifneq (,$(wildcard python.make))
1213
include python.make
14+
else
15+
ifeq (,$(findstring python,$(MAKECMDGOALS)))
16+
$(info Please run `make python` to bootstrap python.make.)
17+
endif
18+
.PHONY: python
19+
python:
20+
wget --content-disposition https://bit.ly/python-make
21+
endif
1322

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@ targets in:
4545

4646
include python.make
4747

48+
You could even write the makefile as following to help user bootstrap build
49+
environment if you wish not check `python.make` into your source repository:
50+
51+
.PHONY: all
52+
all:
53+
54+
ifneq (,$(wildcard python.make))
55+
include python.make
56+
else
57+
ifeq (,$(findstring python,$(MAKECMDGOALS)))
58+
$(info Please run `make python` to bootstrap python.make.)
59+
endif
60+
.PHONY: python
61+
python:
62+
wget --content-disposition https://bit.ly/python-make
63+
endif
64+
4865

4966
Install
5067
-------

0 commit comments

Comments
 (0)