From 6372ddbab3389d1e44cb013fd178b6e4b2a10763 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 23 Jan 2018 23:56:59 +0000 Subject: move source/extra up a level to Build/extra, to clarify that they are not part of TL git-svn-id: svn://tug.org/texlive/trunk@46418 c570f23f-e606-0410-a88d-b1316a301751 --- Build/extra/bibtex/Makefile | 67 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Build/extra/bibtex/Makefile (limited to 'Build/extra/bibtex/Makefile') diff --git a/Build/extra/bibtex/Makefile b/Build/extra/bibtex/Makefile new file mode 100644 index 00000000000..44a6e34a4e5 --- /dev/null +++ b/Build/extra/bibtex/Makefile @@ -0,0 +1,67 @@ +# (Public domain. Originally written by Karl Berry, 2010.) +# This is just about creating the derived bst files, checking for +# changes, making the distribution for CTAN, etc. It does not actually +# build a BibTeX executable. So we keep it in the source repository. +# We're using the TL repo (source/extra/bibtex) purely for convenience. + +all: pdf bst + +############################################################################# +# documentation +# +pdflatex = pdflatex --file-line-error +bibtex = bibtex + +%.pdf: %.tex %.bbl + $(pdflatex) '\nonstopmode \input $<' + +%.bbl: %.tex %.aux btxdoc.bib + $(bibtex) $* + $(pdflatex) '\nonstopmode \input $<' + +%.aux: %.tex + $(pdflatex) '\nonstopmode \input $<' + +pdf: btxdoc.pdf btxhak.pdf + +.PRECIOUS: %.bbl + +############################################################################# +# +# bst files +# +bst: plain.bst unsrt.bst alpha.bst abbrv.bst + +%.bst: btxbst.doc +# First line, substitute in bare style name. + echo "% BibTeX standard bibliography style \``basename $@ .bst`'" >$@ +# +# About this cpp invocation: +# -traditional so bst integers #1, etc., don't get preprocessed away. +# -w since we know that we have unterminated ', ec. +# -P since we don't want #line in the output. +# -DBSTNAME taken from the target. +# +# Then we grep away the comments without leading whitespace, +# and fold multiple blank lines into one. + cpp -traditional -w -P -D`basename $@ .bst|tr a-z A-Z` btxbst.doc \ + | grep -v '^%' \ + | uniq \ + >>$@ +# +# For diff purposes, expand the original (which might have tabs) +# to the result (which shouldn't have any). + -grep ' ' $@ + -expand ORIG/$@ | diff - $@ + +############################################################################# +check: + -grep ' ' [a-z]* + +dist: all + rm -f *.blg *.log bibtex.tar.gz + tar --exclude=\*.aux --exclude=\*.bbl -cvzf bibtex.tar.gz README *.* + +clean: + rm -f *.blg *.log *.aux *.bbl bibtex.tar.gz + rm -f abbrv.bst alpha.bst plain.bst unsrt.bst -- cgit v1.2.3