# Makefile.latexinit
# Copyright (c) Markus Kohm, 2002-2012
#
# This file is part of the LaTeX2e KOMA-Script bundle.
#
# This work may be distributed and/or modified under the conditions of
# the LaTeX Project Public License, version 1.3c of the license.
# The latest version of this license is in
#   http://www.latex-project.org/lppl.txt
# and version 1.3c or later is part of all distributions of LaTeX
# version 2005/12/01 or later and of this work.
#
# This work has the LPPL maintenance status "author-maintained".
#
# The Current Maintainer and author of this work is Markus Kohm.
#
# This work consists of all files listed in manifest.txt.
# ----------------------------------------------------------------------
# Makefile.latexinit
# Copyright (c) Markus Kohm, 2002-2012
#
# Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
# Version 1.3c, verteilt und/oder veraendert werden.
# Die neuste Version dieser Lizenz ist
#   http://www.latex-project.org/lppl.txt
# und Version 1.3c ist Teil aller Verteilungen von LaTeX
# Version 2005/12/01 oder spaeter und dieses Werks.
#
# Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
# (allein durch den Autor verwaltet).
#
# Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
#
# Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
# ======================================================================

# Read input first from basedir and doc dir
TEXINPUTS	:= ./:$(DOCDIR):$(BASEDIR):$(TEXINPUTS)

BIBINPUTS       = $(DOCDIR):$(shell kpsewhich -expand-var=\$$BIBINPUTS)
BSTINPUTS       = $(DOCDIR):$(shell kpsewhich -expand-var=\$$BSTINPUTS)
BIBTEX_SRC      = $(DOCDIR)guide.bib

MAKEINDEXSTYLE  = $(DOCDIR)scrguide.ist
MAKEINDEXOPT    = -r -s $(MAKEINDEXSTYLE) -o
MAKEINDEX	= makeindex $(MAKEINDEXOPT)

MAKECHANGESTYLE = $(DOCDIR)scrguide.gst
MAKECHANGEOPT   = -r -s $(MAKECHANGESTYLE) -o
MAKECHANGE      = makeindex $(MAKECHANGEOPT)

PDFLATEX	= $(LATEX) $(NONSTOPMODE) \
                           '\def\languagename{'$(LANGUAGELONG)'}' \
			   $(PDFOUTPUT)
INDEXPOSTOP     = $(DOCDIR)/bin/genindex.pl
GENHTMLINDEX    = $(DOCDIR)/bin/genhtmlidx.pl
#BIBTEX		= bibtex8
#BIBTEXNOERROR	= 1 # BibTeX8 returns 1 after warnings
BIBTEX		= bibtex
BIBTEXNOERROR   = 0 # BibTeX returns 0 on ok
BIBTEXFIX       = sed -i -e 's/\\btxurlfont[[:space:]]*$$/\\expandafter&/'

MPOST		= mpost -tex=latex -interaction=batchmode
MPTOPDF         = mptopdf

EPSTOPDF        = epstopdf

export TEXINPUTS BIBINPUTS BSTINPUTS
