docs/suckless
annotate Makefile @ 0:79424d211485
initial commit (based on GimmeShellter)
author | meillo@marmaro.de |
---|---|
date | Mon, 11 Aug 2008 21:42:23 +0200 |
parents | |
children |
rev | line source |
---|---|
meillo@0 | 1 # Makefile for latex docs |
meillo@0 | 2 # by meillo@marmaro.de |
meillo@0 | 3 # |
meillo@0 | 4 |
meillo@0 | 5 |
meillo@0 | 6 PDFLATEX = pdflatex |
meillo@0 | 7 |
meillo@0 | 8 SRC = suckless.tex |
meillo@0 | 9 OBJ = suckless.pdf |
meillo@0 | 10 #OBJ = ${SRC:.tex:.pdf} |
meillo@0 | 11 |
meillo@0 | 12 PRINT = print.tex |
meillo@0 | 13 PRINTPDF = print.pdf |
meillo@0 | 14 PRINTALL = print.* |
meillo@0 | 15 PRINTOBJ = suckless_print.pdf |
meillo@0 | 16 |
meillo@0 | 17 |
meillo@0 | 18 all: ${OBJ} |
meillo@0 | 19 |
meillo@0 | 20 |
meillo@0 | 21 #.tex.pdf: |
meillo@0 | 22 ${OBJ}: ${SRC} |
meillo@0 | 23 @echo generating $< |
meillo@0 | 24 @${PDFLATEX} $< |
meillo@0 | 25 |
meillo@0 | 26 |
meillo@0 | 27 dist: realclean print |
meillo@0 | 28 # generate 3 times for correct toc and pagenumbers |
meillo@0 | 29 ${MAKE} all |
meillo@0 | 30 sleep 1 |
meillo@0 | 31 touch ${SRC} |
meillo@0 | 32 ${MAKE} all |
meillo@0 | 33 sleep 1 |
meillo@0 | 34 touch ${SRC} |
meillo@0 | 35 ${MAKE} all |
meillo@0 | 36 |
meillo@0 | 37 |
meillo@0 | 38 clean: |
meillo@0 | 39 @echo 'cleaning ...' |
meillo@0 | 40 @rm -f *.{aux,lof,log,lot,nav,out,snm,toc} |
meillo@0 | 41 |
meillo@0 | 42 rmpdf: |
meillo@0 | 43 @echo 'removing PDFs ...' |
meillo@0 | 44 @rm -f *.pdf |
meillo@0 | 45 |
meillo@0 | 46 realclean: clean rmpdf |
meillo@0 | 47 |
meillo@0 | 48 xpdf: all |
meillo@0 | 49 xpdf -z page ${OBJ} & |
meillo@0 | 50 |
meillo@0 | 51 print: |
meillo@0 | 52 @echo 'creating print version' |
meillo@0 | 53 @sed -e '/\\pause/d' ${SRC} > ${PRINT} |
meillo@0 | 54 @${PDFLATEX} ${PRINT} |
meillo@0 | 55 sleep 1 |
meillo@0 | 56 touch ${SRC} |
meillo@0 | 57 @${PDFLATEX} ${PRINT} |
meillo@0 | 58 sleep 1 |
meillo@0 | 59 touch ${SRC} |
meillo@0 | 60 @${PDFLATEX} ${PRINT} |
meillo@0 | 61 @${MAKE} clean |
meillo@0 | 62 @rm -r ${PRINT} |
meillo@0 | 63 @mv ${PRINTPDF} ${PRINTOBJ} |
meillo@0 | 64 |
meillo@0 | 65 .PHONY: all xpdf dist clean realclean rmpdf |
meillo@0 | 66 .SUFFIXES: .tex .pdf |