@@ -89,12 +89,14 @@ bikeshed-keep:
89
89
echo Downloaded Bikeshed.
90
90
91
91
92
- .PHONY : index
93
- index :
94
- (cd appendix; ./index-instructions.py)
92
+ GENERATED = appendix/index-instructions.rst
93
+ .INTERMEDIATE : $(GENERATED )
94
+
95
+ % .rst : % .py
96
+ (cd ` dirname $@ ` ; ./` basename $^` )
95
97
96
98
.PHONY : pdf
97
- pdf : index latexpdf
99
+ pdf : $( GENERATED ) latexpdf
98
100
mkdir -p $(BUILDDIR ) /html/$(DOWNLOADDIR )
99
101
ln -f $(BUILDDIR ) /latex/$(NAME ) .pdf $(BUILDDIR ) /html/$(DOWNLOADDIR ) /$(NAME ) .pdf
100
102
@@ -103,10 +105,9 @@ pdf: index latexpdf
103
105
clean :
104
106
rm -rf $(BUILDDIR )
105
107
rm -rf $(STATICDIR )
106
- rm -f appendix/index-instructions.rst
107
108
108
109
.PHONY : html
109
- html : index
110
+ html : $( GENERATED )
110
111
$(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(BUILDDIR ) /html
111
112
for file in ` ls $( BUILDDIR) /html/* .html` ; \
112
113
do \
@@ -122,19 +123,19 @@ html: index
122
123
@echo " Build finished. The HTML pages are in ` pwd` /$( BUILDDIR) /html/."
123
124
124
125
.PHONY : dirhtml
125
- dirhtml :
126
+ dirhtml : $( GENERATED )
126
127
$(SPHINXBUILD ) -b dirhtml $(ALLSPHINXOPTS ) $(BUILDDIR ) /dirhtml
127
128
@echo
128
129
@echo " Build finished. The HTML pages are in $( BUILDDIR) /dirhtml."
129
130
130
131
.PHONY : singlehtml
131
- singlehtml :
132
+ singlehtml : $( GENERATED )
132
133
$(SPHINXBUILD ) -b singlehtml $(ALLSPHINXOPTS ) $(BUILDDIR ) /singlehtml
133
134
@echo
134
135
@echo " Build finished. The HTML page is in $( BUILDDIR) /singlehtml."
135
136
136
137
.PHONY : bikeshed
137
- bikeshed :
138
+ bikeshed : $( GENERATED )
138
139
$(SPHINXBUILD ) -b singlehtml -c util/bikeshed \
139
140
$(ALLSPHINXOPTS ) $(BUILDDIR ) /bikeshed_singlehtml
140
141
python util/bikeshed_fixup.py $(BUILDDIR ) /bikeshed_singlehtml/index.html \
0 commit comments