# This is a sample Makefile for use with SchemeWEB(2) # To use it, create a new file called Makefile in the directory # containing the SchemeWEB files, whose name should end by .sw # inside this file, add the line # TEXFILE = XXX.tex [ YYY.tex ZZZ.tex ... ] # Where XXX.tex YYY.tex and ZZZ.tex are the name of your main tex # files (those you which to compile with 'LaTeX XXX.tex') # then, add the line # include /sweb.make # where is the name of the directory containing the # present file. You can now compile with 'make', 'make dvi', # 'make ps', 'make html', or clean the directory with 'make clean' (be # carefull with this option !) SWFILE := $(wildcard *.sw) normal : tex scm all : tex scm dvi html ps clean : rm -f `echo *.sw | sed 's/.sw$//.scm/g'` rm -f `echo *.sw | sed 's/.sw$//.tex/g'` rm -f *.toc *.aux *.log rm -f $(TEXFILE:.tex=.dvi) rm -f $(TEXFILE:.tex=.ps) tex : $(SWFILE:.sw=.tex) scm : $(SWFILE:.sw=.scm) dvi : $(TEXFILE:.tex=.dvi) ps : $(TEXFILE:.tex=.ps) html : $(TEXFILE) latex2html $< %.tex : %.sw sweb -w $< $@ %.scm : %.sw sweb -s $< $@ # Sometimes, you have to compile twice. This is the reason of the sleep and touch. $(TEXFILE:.tex=.dvi) : $(wildcard *.tex) latex $(@:.dvi=.tex) sleep 1 touch $(@:.dvi=.tex) $(TEXFILE:.tex=.ps) : $(TEXFILE:.tex=.dvi) dvips $< -o $@