Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a799835

Browse files
committed
Revised some targets to make better use of make "special" variables, to avoid
repeating file names. Change lib.texi target to not overwrite the input file; work on a copy.
1 parent ef05803 commit a799835

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

Doc/Makefile

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ PARTPARSE= $(PYTHON) $(PARTPARSEOBJ)
7373
VERSION=1.5
7474

7575
DVIFILES= api.dvi ext.dvi lib.dvi tut.dvi
76+
INFOFILES= python-lib.info
7677
PDFFILES= api.pdf ext.pdf lib.pdf tut.pdf
7778
PSFILES= api.ps ext.ps lib.ps tut.ps
7879

@@ -213,17 +214,18 @@ api.dvi: api.tex
213214
# the info file gets generated.
214215

215216
lib1.texi: lib*.tex texipre.dat texipost.dat $(PARTPARSEOBJ)
216-
$(PARTPARSE) -o lib1.texi `./whichlibs`
217-
sed 's/"{\\}n{\\}n/"\\n\\n/' lib1.texi >lib2.texi
218-
mv lib2.texi lib1.texi
217+
$(PARTPARSE) -o $@ `./whichlibs`
218+
sed 's/"{\\}n{\\}n/"\\n\\n/' $@ >temp.texi
219+
mv temp.texi $@
219220

220221
lib.texi: lib1.texi fix.el
222+
cp lib1.texi temp.texi
221223
$(EMACS) -batch -l fix.el -f save-buffer -kill
222-
cp lib1.texi lib.texi
224+
mv temp.texi $@
223225

224226
python-lib.info: lib.texi
225227
-$(MAKEINFO) --footnote-style end --fill-column 72 \
226-
--paragraph-indent 0 lib.texi
228+
--paragraph-indent 0 $<
227229

228230
# this is needed to prevent a second set of info files from being generated,
229231
# at least when using GNU make
@@ -280,19 +282,26 @@ l2hapi: api.dvi myformat.perl
280282
mv api/xxx api/api.html
281283
ln -s api.html api/index.html || true
282284

285+
info-$(VERSION).tar.gz: $(INFOFILES)
286+
tar cf - python-???.info* | gzip -9 >$@
287+
283288
pdf-$(VERSION).tar.gz: $(PDFFILES)
284-
tar cf - ???.pdf | gzip -9 >pdf-$(VERSION).tar.gz
289+
tar cf - ???.pdf | gzip -9 >$@
285290

286291
postscript-$(VERSION).tar.gz: $(PSFILES) ref/ref.ps
287292
cp ref/ref.ps .
288-
tar cf - ???.ps | gzip -9 >postscript-$(VERSION).tar.gz
293+
tar cf - ???.ps | gzip -9 >$@
289294
rm ref.ps
290295

291296
tarhtml:
292297
@echo "Did you remember to run makeMIFs.py in the ref subdirectory...?"
293298
tar cf - index.html ???/???.css ???/*.html lib/*.gif icons/*.* \
294299
| gzip -9 >html-$(VERSION).tar.gz
295300

301+
# convenience targets:
302+
303+
tarinfo: info-$(VERSION).tar.gz
304+
296305
tarps: postscript-$(VERSION).tar.gz
297306

298307
tarpdf: pdf-$(VERSION).tar.gz

0 commit comments

Comments
 (0)