RCS=$Id: Makefile,v 1.10 2003/10/03 04:48:36 gilles Exp gilles $ DATEDAY=$(shell date '+%Y%m%d') .PHONY: default all page help lfo clean dist test help: default default: @echo " Bulding Your Cards " @echo " " @echo " make all # to build everything" @echo " make page # to build the page" @echo " make clean # to clean everything cleanable" @echo "" @echo "" @echo "$(RCS)" date: echo $(DATEDAY) all: carte.png carte-page.ps carte-page-img.pdf \ carte-page-img-fgp.pdf page: carte-page-img-fgp.ps @echo "The file carte-page-img-fgp.ps is done" @echo "Take a look at it and then print it :" @echo "gv carte-page-img-fgp.ps" @echo "lpr carte-page-img-fgp.ps" lfo: clean sh .index.memo carte.dvi: carte.tex images/bsd-big.ps latex carte.tex carte.ps: carte.dvi dvips -f < carte.dvi > carte.ps carte.pdf: carte.ps ps2pdf carte.ps carte.pdf carte.png: carte.ps pstoimg -antialias -aaliastext -density 100 -type png \ -geometry 250x150 -margins 10,20 carte.ps carte-page.dvi: carte-input.tex carte-page.tex latex carte-page.tex carte-page.ps: carte-page.dvi dvips -t a4 -f < carte-page.dvi > carte-page.ps carte-page.pdf: carte-page.ps ps2pdf carte-page.ps carte-page.pdf carte-page-img.dvi: carte-sgl-img.tex carte-page-img.tex latex carte-page-img.tex carte-page-img.ps: carte-page-img.dvi dvips -t a4 -f < carte-page-img.dvi > carte-page-img.ps carte-page-img.pdf: carte-page-img.ps ps2pdf carte-page-img.ps carte-page-img.pdf carte-page-img.png: carte-page-img.ps pstoimg -antialias -aaliastext -density 100 -type png carte-page-img.ps carte-sgl-img-fgp.tex: VERSION carte.tex cp carte-sgl-img-fgp.tex carte-sgl-img-fgp.tex.$(DATEDAY) sed -e '/^\\begin{document}/,/^\\end{document}/!d' \ -e '/^\\begin{document}/d' \ -e '/^\\end{document}/d' carte.tex > carte-sgl-img-fgp.tex carte-page-img-fgp.dvi: carte-sgl-img-fgp.tex carte-page-img-fgp.tex latex carte-page-img-fgp.tex carte-page-img-fgp.ps: carte-page-img-fgp.dvi dvips -t a4 -f < carte-page-img-fgp.dvi > carte-page-img-fgp.ps carte-page-img-fgp.pdf: carte-page-img-fgp.ps ps2pdf carte-page-img-fgp.ps carte-page-img-fgp.pdf carte-page-img-fgp.png: carte-page-img-fgp.ps pstoimg -antialias -aaliastext -density 100 -type png carte-page-img-fgp.ps VERSION: carte.lyx Makefile ident -q carte.lyx | egrep -o '[0-9]+\.[0-9]+' > VERSION define VERSION $(shell \ if [ -f ./VERSION ]; then\ cat VERSION;\ else \ echo "unknown";\ fi ) endef TAR_DIR=visit_card_$(VERSION) CP=cp -f copy: $(CP) Makefile README VERSION \ carte-page-img-fgp.tex carte-sgl-img-fgp.tex \ carte.lyx carte.tex \ tmp/ mkdir -p tmp/images/ $(CP) images/NetBSD.ps images/bsd-big.ps images/reiss-head.ps \ images/tux-large.ps images/wanda.ps images/openlogo-nd.eps \ tmp/images/ rcscheck: rcsdiff RCS/* dist: copy rcscheck mkdir $(TAR_DIR) && \ rsync -av tmp/ $(TAR_DIR) && \ tar czvf ./dist/$(TAR_DIR).tgz $(TAR_DIR) && \ rm -rf $(TAR_DIR) test: dist mkdir -p test cd test && tar xzvf ../dist/$(TAR_DIR).tgz && \ cd $(TAR_DIR) && make page && make clean && \ cd ../.. && rm -rf test clean: rm -f *.aux \ *.tex.dep \ *.dvi \ *.log \ *.ps \ *.pdf \ *~