diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2005-08-30 01:25:05 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2005-08-30 01:25:05 (GMT) |
commit | e8f44d683e79c7a9659a4480736d55193da4a7b1 (patch) | |
tree | 37e8b05066aa1caf85f6b25d52f1576366e45e8e /Doc/howto/Makefile | |
parent | f1b2ba6aa1751c5325e8fb87a28e54a857796bfa (diff) | |
download | cpython-e8f44d683e79c7a9659a4480736d55193da4a7b1.zip cpython-e8f44d683e79c7a9659a4480736d55193da4a7b1.tar.gz cpython-e8f44d683e79c7a9659a4480736d55193da4a7b1.tar.bz2 |
Commit the howto source to the main Python repository, with Fred's approval
Diffstat (limited to 'Doc/howto/Makefile')
-rw-r--r-- | Doc/howto/Makefile | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/Doc/howto/Makefile b/Doc/howto/Makefile new file mode 100644 index 0000000..19701c6 --- /dev/null +++ b/Doc/howto/Makefile @@ -0,0 +1,88 @@ + +MKHOWTO=../tools/mkhowto +WEBDIR=. +RSTARGS = --input-encoding=utf-8 +VPATH=.:dvi:pdf:ps:txt + +# List of HOWTOs that aren't to be processed + +REMOVE_HOWTO = + +# Determine list of files to be built + +HOWTO=$(filter-out $(REMOVE_HOWTO),$(wildcard *.tex)) +RST_SOURCES = $(shell echo *.rst) +DVI =$(patsubst %.tex,%.dvi,$(HOWTO)) +PDF =$(patsubst %.tex,%.pdf,$(HOWTO)) +PS =$(patsubst %.tex,%.ps,$(HOWTO)) +TXT =$(patsubst %.tex,%.txt,$(HOWTO)) +HTML =$(patsubst %.tex,%,$(HOWTO)) + +# Rules for building various formats +%.dvi : %.tex + $(MKHOWTO) --dvi $< + mv $@ dvi + +%.pdf : %.tex + $(MKHOWTO) --pdf $< + mv $@ pdf + +%.ps : %.tex + $(MKHOWTO) --ps $< + mv $@ ps + +%.txt : %.tex + $(MKHOWTO) --text $< + mv $@ txt + +% : %.tex + $(MKHOWTO) --html --iconserver="." $< + tar -zcvf html/$*.tgz $* + #zip -r html/$*.zip $* + +default: + @echo "'all' -- build all files" + @echo "'dvi', 'pdf', 'ps', 'txt', 'html' -- build one format" + +all: $(HTML) + +.PHONY : dvi pdf ps txt html rst +dvi: $(DVI) + +pdf: $(PDF) +ps: $(PS) +txt: $(TXT) +html:$(HTML) + +# Rule to build collected tar files +dist: #all + for i in dvi pdf ps txt ; do \ + cd $$i ; \ + tar -zcf All.tgz *.$$i ;\ + cd .. ;\ + done + +# Rule to copy files to the Web tree on AMK's machine +web: dist + cp dvi/* $(WEBDIR)/dvi + cp ps/* $(WEBDIR)/ps + cp pdf/* $(WEBDIR)/pdf + cp txt/* $(WEBDIR)/txt + for dir in $(HTML) ; do cp -rp $$dir $(WEBDIR) ; done + for ltx in $(HOWTO) ; do cp -p $$ltx $(WEBDIR)/latex ; done + +rst: unicode.html + +%.html: %.rst + rst2html $(RSTARGS) $< >$@ + +clean: + rm -f *~ *.log *.ind *.l2h *.aux *.toc *.how + rm -f *.dvi *.ps *.pdf *.bkm + rm -f unicode.html + +clobber: + rm dvi/* ps/* pdf/* txt/* html/* + + + |