SRC=../data/my_lib_ref.bib JARROOT=/usr/share/java RESOLVERJAR=$(JARROOT)/xml-resolver.jar SAXONJAR=$(JARROOT)/saxonb.jar SAXON=java -cp $(RESOLVERJAR):$(SAXONJAR) \ -Dxml.catalog.files=$(CATALOG) -Dxml.catalog.verbosity=1\ net.sf.saxon.Transform\ -novw -r org.apache.xml.resolver.tools.CatalogResolver\ -x org.apache.xml.resolver.tools.ResolvingXMLReader\ -y org.apache.xml.resolver.tools.ResolvingXMLReader BIBTEX=bibtex SED=sed %.bbl: %.aux $(BIBTEX) $< $(SED) -f detex.sed $@ > $@.tmp mv $@.tmp $@ citations.bbl: citations.aux detex.sed citations.aux: $(SRC) /bin/echo '\relax' > $@ /bin/echo '\bibstyle{plainhtml}' >> $@ /bin/echo "\bibdata{$(SRC)}" >> $@ grep '^@[a-z]*{' $^ | sed -e 's/.*{\(.*\),/\\citation{\1}/' >> $@ clean: rm citations.*