Skip to content

Commit 79da508

Browse files
committed
Use variables consistently in Makefile
1 parent e1fe95c commit 79da508

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Makefile

+11-6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
# Not really important, but convenient.
55

66
PEP2HTML=pep2html.py
7+
PEP2RSS=pep2rss.py
8+
GENPEPINDEX=genpepindex.py
9+
10+
PEPDIR=peps
11+
OUTPUTDIR=output
712

813
PYTHON=python
914

@@ -12,23 +17,23 @@ PYTHON=python
1217
.txt.html:
1318
@$(PYTHON) $(PEP2HTML) $<
1419

15-
TARGETS=$(patsubst %.txt,%.html,$(wildcard peps/pep-????.txt)) output/pep-0000.html
20+
TARGETS=$(patsubst %.txt,%.html,$(wildcard $(PEPDIR)/pep-????.txt)) $(OUTPUTDIR)/pep-0000.html
1621

1722
all: pep-0000.txt $(TARGETS)
1823

19-
$(TARGETS): pep2html.py
24+
$(TARGETS): $(PEP2HTML)
2025

21-
pep-0000.txt: $(wildcard peps/pep-????.txt) $(wildcard pep0/*.py)
22-
$(PYTHON) genpepindex.py peps/
26+
pep-0000.txt: $(wildcard $(PEPDIR)/pep-????.txt) $(wildcard $(PEPDIR)/pep0/*.py)
27+
$(PYTHON) $(GENPEPINDEX) $(PEPDIR)
2328

2429
rss:
25-
$(PYTHON) pep2rss.py peps/
30+
$(PYTHON) $(PEP2RSS) $(PEPDIR)
2631

2732
install:
2833
echo "Installing is not necessary anymore. It will be done in post-commit."
2934

3035
clean:
31-
-rm -r output/
36+
-rm -r $(OUTPUTDIR)
3237

3338
update:
3439
git pull https://github.com/python/peps.git

0 commit comments

Comments
 (0)