diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
commit | ad547a6b5986815fda458221149728d9d9ab1d87 (patch) | |
tree | 16296910eb3eca724371474ea9aea3994dc69614 /Build/extra/bibtex/Makefile | |
parent | 947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff) |
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/extra/bibtex/Makefile')
-rw-r--r-- | Build/extra/bibtex/Makefile | 67 |
1 files changed, 67 insertions, 0 deletions
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 |