BIN = bin HTDOCS = htdocs BIBLIOGRAPHY = bibliography/bibliography.bib BIBFILTER = '(public = "yes")' #DESTINATION = dan@clamshell.ambulatoryclam.net:/usr/local/www/apache24/data/drkp DESTINATION = dan@geoduck.ambulatoryclam.net:/var/www/drkp DESTINATION2 = drkp@tricycle.cs.washington.edu:public_html DESTINATIONALT = drkp@giraffe.cs.washington.edu:/var/www/html/drkp AWK = awk BIB2BIB = bib2bib BIBTEX2HTML = bibtex2html BIBEXPORT = $(BIN)/bibexport.sh BIBTOOL = bibtool RSYNC = rsync MV = mv SED := $(shell if which gsed >/dev/null; then echo gsed; else echo sed; fi) export BSTINPUTS=$(BIN) TARGETS = $(HTDOCS)/bibliography-public.bib $(HTDOCS)/bibliography-public.json $(HTDOCS)/bibliography-sorted.bib $(HTDOCS)/bibliography-flat.html $(HTDOCS)/bibliography-flat_bib.html $(HTDOCS)/exhibit3 export TMPDIR=. all : $(TARGETS) clean : $(RM) -rf $(TARGETS) $(RM) -f bibliography-filtered.bib bibliography-filtered.citations bibexport.aux $(HTDOCS)/bibliography-public.bib : $(BIBLIOGRAPHY) $(BIB2BIB) -ob bibliography-filtered.bib -oc bibliography-filtered.citations -c $(BIBFILTER) -w $^ $(AWK) '{printf "\\citation{%s}\n", $$0} END{print "\\bibstyle{plain}"; print "\\bibdata{bibliography-filtered}"}' bibliography-filtered.citations > bibexport.aux ${BIBEXPORT} -n -o $@ bibexport.aux $(HTDOCS)/bibliography-sorted.bib : $(HTDOCS)/bibliography-public.bib $(BIBTOOL) -S -- 'sort.format={{(@InProceedings){3}{(@MastersThesis){2}{(@Unpublished){1}{}}}} {%D(year)}}' -- 'add.field = {monthnum="%s(month)"}' -r $(BIN)/monthtonum.rsc $^ | bibtool -r $(BIN)/numtomonth.rsc > $@ $(HTDOCS)/bibliography-public.json : $(HTDOCS)/bibliography-sorted.bib $(BIN)/bibtex2exhibit $^ | $(BIN)/debracify > $@ $(HTDOCS)/bibliography-flat.html : $(HTDOCS)/bibliography-sorted.bib $(BIBTEX2HTML) -u -t "Dan Ports's publications" -o $(HTDOCS)/bibliography-flat -f ps -f psgz -nf slidespdf "slides (.pdf)" $^ $(BIN)/HTMLUnentitizer.py < $(HTDOCS)/bibliography-flat.html | $(SED) -e '//a ' | $(SED) -e "s,htdocs/,," > $(HTDOCS)/bibliography-flat.html.tmp $(MV) $(HTDOCS)/bibliography-flat.html.tmp $(HTDOCS)/bibliography-flat.html chmod 644 $(HTDOCS)/bibliography-flat.html $(HTDOCS)/bibliography-flat_bib.html : $(HTDOCS)/bibliography-flat.html $(HTDOCS)/exhibit3: exhibit3/scripted/dist cp -r $< $@ exhibit3/scripted/dist: exhibit3/scripted cd $< && ant dist deploy : all $(RSYNC) -Cvza --progress --stats $(HTDOCS)/ $(DESTINATION)/ $(RSYNC) -Cvza --progress --stats $(HTDOCS)/ $(DESTINATION2)/ #$(RSYNC) -Cvza --progress --stats $(HTDOCS)/ $(DESTINATIONALT)/ deployalt : all $(RSYNC) -Cvza --progress --stats $(HTDOCS)/ $(DESTINATIONALT)/