sharing parts of the Makefiles

This commit is contained in:
Michael Kohlhase 2017-12-04 13:32:26 +01:00
parent adeb856739
commit ce51805d93
7 changed files with 36 additions and 202 deletions

View File

@ -17,12 +17,12 @@ keeping information consistent.
In the simplest case, just clone the repository, and extend your `TEXINPUTS` In the simplest case, just clone the repository, and extend your `TEXINPUTS`
environment variable so that it can find it. On a UNIX system something like the following environment variable so that it can find it. On a UNIX system something like the following
should work. should work.
` ```
cd /path/to/your/setup cd /path/to/your/project
git clone https://github.com/KWARC/LaTeX-proposal git clone https://github.com/KWARC/LaTeX-proposal
echo 'export TEXINPUTS = "$(TEXINPUTS):/path/to/your/setup/LaTeX-proposal//:"' >> ~/.bashrc echo 'export TEXINPUTS = "$(TEXINPUTS):/path/to/your/project/LaTeX-proposal//:"' >> ~/.bashrc
` ```
Of course you will have to replace `/path/to/your/setup` with a path appropriate to Of course you will have to replace `/path/to/your/project` with a path appropriate to
your system. A simple `git pull` will update you to the newest version. your system. A simple `git pull` will update you to the newest version.
## Getting Started with a New Proposal ## Getting Started with a New Proposal
@ -33,6 +33,17 @@ the three variables in the upper section of the `Makefile` accordingly, if you w
(UNIX) `Makefile` automation (recommended). If you want to use the LaTeX proposal class in (UNIX) `Makefile` automation (recommended). If you want to use the LaTeX proposal class in
a revision control system for a larger group, read (far) below. a revision control system for a larger group, read (far) below.
Here is what you would do on a UNIX system after the initial steps above to prepare a DFG
proposal (or an EU proposal the same setup works as well, but with suitably adapted
paths).
```
cp examples/dfg/proposal .
sed -i .bak s/PROP.dir = ..\/..\/..\//Prop.dir = ./ proposal/Makefile
sed -i .bak s/BIB = ..\/lib/BIB = ./ proposal/Makefile
```
## Disclaimer ## Disclaimer
The LaTeX proposal class has been developed to "scratch my own itch" over many proposals The LaTeX proposal class has been developed to "scratch my own itch" over many proposals

View File

@ -1,73 +1,12 @@
########################################################################### ###########################################################################
# Automating proposal management by make. # Automating LaTeX-proposal management by make.
# The participants work on proposal.tex in "draft" mode, which gives a lot # The participants work on proposal.tex in "draft" mode, which gives a lot
# of information to the developers. Variants submit.tex and public.tex are # of information to the developers. Variants submit.tex and public.tex are
# used to prepare official versions (hiding development/private info). # used to prepare official versions (hiding development/private info).
########################################################################### ###########################################################################
# possibly customize the following variables to your setting # possibly customize the following variables to your setting
PROPOSAL = proposal.tex # the proposal PROPOSAL = proposal.tex# # the proposal
BIB = ../lib/dummy.bib # bibTeX databases BIB = ../lib# # bibTeX databases
PROP.dir = ../../.. PROP.dir = ../../..# # The LaTeX-proposal class directory
########################################################################### ###########################################################################
# the following are computed include $(PROP.dir)/lib/Makefile.dfgproposal
TARGET = $(PROPOSAL) # all pdflatex targets
TARGET.pdf = $(TARGET:%.tex=%.pdf) # PDFs to be produced
TARGET.aux = $(TARGET:%.tex=%.aux) # their aux files.
PDATA = $(PROPOSAL:%.tex=%.pdata) # the proposal project data
SRC = $(filter-out $(TARGET),$(shell ls *.tex)) # included files
PDFLATEX = pdflatex -interaction batchmode -file-line-error
BBL = $(PROPOSAL:%.tex=%.bbl)
PROPCLS.dir = $(PROP.dir)/base
PROPETC.dir = $(PROP.dir)/etc
DFGPROPCLS.dir = $(PROP.dir)/dfg
TEXINPUTS := .//:$(PROPCLS.dir)//:$(DFGPROPCLS.dir)//:$(PROPETC.dir)//:
BIBINPUTS := ../lib:$(BIBINPUTS)
PROPCLS.clssty = proposal.cls pdata.sty
PROPETC.sty = workaddress.sty metakeys.sty sref.sty
DFGPROPCLS.clssty = dfgproposal.cls dfgpdata.sty
PROPCLS = $(PROPCLS.clssty:%=$(PROPCLS.dir)/%) $(DFGPROPCLS.clssty:%=$(DFGPROPCLS.dir)/%) $(PROPETC.sty:%=$(PROPETC.dir)/%)
all: $(TARGET.pdf)
submit:
$(MAKE) -w PROPOSAL=submit.tex all
public:
$(MAKE) -w PROPOSAL=public.tex all
cd: # make cd will prepare CD for burning
mkdir CD;make $(TARGET.pdf); cp $(TARGET.pdf) CD
bbl: $(BBL)
$(BBL): %.bbl: %.aux
bibtex -min-crossrefs=100 -terse $<
$(PDATA): %.pdata: %.tex
$(PDFLATEX) $<
$(TARGET.aux): %.aux: %.tex
$(PDFLATEX) $<
$(TARGET.pdf): %.pdf: %.tex $(SRC) $(BIB) $(PROPCLS)
$(PDFLATEX) $< || $(RM) $@
# sort $(PROPOSAL:%.tex=%.delivs) > $(PROPOSAL:%.tex=%.deliverables)
@if (test -e $(patsubst %.tex, %.idx, $<));\
then makeindex $(patsubst %.tex, %.idx, $<); fi
# bbl is up to date $(MAKE) -$(MAKEFLAGS) $(BBL)
@if (grep "(re)run BibTeX" $(patsubst %.tex, %.log, $<)> /dev/null);\
then $(MAKE) -B $(BBL); fi
$(PDFLATEX) $< || $(RM) $@
@if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
then $(PDFLATEX) $< || $(RM) $@; fi
@if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
then $(PDFLATEX) $< || $(RM) $@; fi
clean:
rm -f *~ *.log *.ilg *.out *.glo *.idx *.ilg *.blg *.run.xml *.synctex.gz *.cut
distclean: clean
rm -f *.aux *.ind *.gls *.ps *.dvi *.thm *.out *.run.xml *.bbl *.toc *.deliv* *.pdata *-blx.bib
rm -Rf auto
echo:
@echo $(BIBINPUTS)

Binary file not shown.

View File

@ -1,67 +1,12 @@
# possibly customize the following variables to your setting
REPORT = finalreport.tex # the report
BIB = ../lib/dummy.bib # bibTeX databases
PROP.dir = ../../..
########################################################################### ###########################################################################
# the following are computed # Automating LaTeX-proposal management by make.
#CVP = $(shell ls CV_PubList*.tex) # CVs of the proposers # The participants work on proposal.tex in "draft" mode, which gives a lot
#TSIMP = letter_submission.tex # pdflatex Targets without bibTeX # of information to the developers. Variants submit.tex and public.tex are
#TSIMP.pdf = $(TSIMP:%.tex=%.pdf) # PDFs to be produced # used to prepare official versions (hiding development/private info).
TBIB = $(REPORT) #$(CVP) # pdflatex Targets with bibTeX ###########################################################################
TARGET = $(TSIMP) $(TBIB) # all pdflatex targets # possibly customize the following variables to your setting
TBIB.pdf = $(TBIB:%.tex=%.pdf) # PDFs to be produced REPORT = finalreport.tex# # the report
TBIB.aux = $(TBIB:%.tex=%.aux) # their aux files. BIB = ../lib/dummy.bib# # bibTeX databases
PDATA = $(REPORT:%.tex=%.pdata) # the proposal project data PROP.dir = ../../..#
SRC = $(filter-out $(TARGET),$(shell ls *.tex)) # included files ###########################################################################
PDFLATEX = pdflatex -interaction batchmode -file-line-error include $(PROP.dir)/lib/Makefile.dfgproposal
BBL = $(REPORT:%.tex=%.bbl)
PROPCLS.dir = $(PROP.dir)/base
PROPETC.dir = $(PROP.dir)/etc
DFGPROPCLS.dir = $(PROP.dir)/dfg
TEXINPUTS := .//:$(PROPCLS.dir)//:$(DFGPROPCLS.dir)//:$(PROPETC.dir)//:
BIBINPUTS := ../lib:$(BIBINPUTS)
PROPCLS.clssty = reporting.cls pdata.sty
PROPETC.sty = workaddress.sty metakeys.sty sref.sty
DFGPROPCLS.clssty = dfgreporting.cls dfgpdata.sty
PROPCLS = $(PROPCLS.clssty:%=$(PROPCLS.dir)/%) $(DFGPROPCLS.clssty:%=$(DFGPROPCLS.dir)/%) $(PROPETC.sty:%=$(PROPETC.dir)/%)
all: $(TBIB.pdf) $(TSIMP.pdf)
cd: # make cd will prepare CD for burning
mkdir CD;make $(TARGET.pdf); cp $(TARGET.pdf) CD
$(BBL): %.bbl: %.aux
bibtex -min-crossrefs=100 -terse $<
$(TSIMP.pdf): %.pdf: %.tex $(PROPCLS) $(PDATA)
$(PDFLATEX) $< || $(RM) $@
$(PDATA): %.pdata: %.tex
$(PDFLATEX) $<
$(TBIB.aux): %.aux: %.tex
$(PDFLATEX) $<
$(TBIB.pdf): %.pdf: %.tex $(SRC) $(BIB) $(PROPCLS)
$(PDFLATEX) $< || $(RM) $@
# sort $(REPORT:%.tex=%.delivs) > $(REPORT:%.tex=%.deliverables)
@if (test -e $(patsubst %.tex, %.idx, $<));\
then makeindex $(patsubst %.tex, %.idx, $<); fi
$(MAKE) -$(MAKEFLAGS) $(BBL)
@if (grep "(re)run BibTeX" $(patsubst %.tex, %.log, $<)> /dev/null);\
then $(MAKE) -B $(BBL); fi
$(PDFLATEX) $< || $(RM) $@
@if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
then $(PDFLATEX) $< || $(RM) $@; fi
@if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
then $(PDFLATEX) $< || $(RM) $@; fi
clean:
rm -f *~ *.log *.ilg *.out *.glo *.idx *.ilg *.blg *.run.xml *.synctex.gz *.cut
distclean: clean
rm -f *.aux *.ind *.gls *.ps *.dvi *.thm *.out *.run.xml *.bbl *.toc *.deliv* *.pdata *-blx.bib
rm -Rf auto
echo:
echo $(BIBINPUTS)

Binary file not shown.

View File

@ -1,73 +1,12 @@
########################################################################### ###########################################################################
# Automating proposal management by make. # Automating LaTeX-proposal management by make.
# The participants work on proposal.tex in "draft" mode, which gives a lot # The participants work on proposal.tex in "draft" mode, which gives a lot
# of information to the developers. Variants submit.tex and public.tex are # of information to the developers. Variants submit.tex and public.tex are
# used to prepare official versions (hiding development/private info). # used to prepare official versions (hiding development/private info).
########################################################################### ###########################################################################
# possibly customize the following variables to your setting # possibly customize the following variables to your setting
PROPOSAL = proposal.tex # the proposal PROPOSAL = proposal.tex# # the proposal
BIB = ../lib/dummy.bib # bibTeX databases BIB = ../lib/dummy.bib# # bibTeX databases
PROP.dir = ../../.. PROP.dir = ../../..
########################################################################### ###########################################################################
# the following are computed include $(PROP.dir)/lib/Makefile.dfgproposal
TARGET = $(PROPOSAL) # all pdflatex targets
TARGET.pdf = $(TARGET:%.tex=%.pdf) # PDFs to be produced
TARGET.aux = $(TARGET:%.tex=%.aux) # their aux files.
PDATA = $(PROPOSAL:%.tex=%.pdata) # the proposal project data
SRC = $(filter-out $(TARGET),$(shell ls *.tex)) # included files
PDFLATEX = pdflatex# -interaction batchmode -file-line-error
BBL = $(PROPOSAL:%.tex=%.bbl)
PROPCLS.dir = $(PROP.dir)/base
PROPETC.dir = $(PROP.dir)/etc
DFGPROPCLS.dir = $(PROP.dir)/dfg
TEXINPUTS := .//:$(PROPCLS.dir)//:$(DFGPROPCLS.dir)//:$(PROPETC.dir)//:
BIBINPUTS := ../lib:$(BIBINPUTS)
PROPCLS.clssty = proposal.cls pdata.sty
PROPETC.sty = workaddress.sty metakeys.sty sref.sty
DFGPROPCLS.clssty = dfgproposal.cls dfgpdata.sty
PROPCLS = $(PROPCLS.clssty:%=$(PROPCLS.dir)/%) $(DFGPROPCLS.clssty:%=$(DFGPROPCLS.dir)/%) $(PROPETC.sty:%=$(PROPETC.dir)/%)
all: $(TARGET.pdf)
submit:
$(MAKE) -w PROPOSAL=final.tex all
public:
$(MAKE) -w PROPOSAL=public.tex all
cd: # make cd will prepare CD for burning
mkdir CD;make $(TARGET.pdf); cp $(TARGET.pdf) CD
bbl: $(BBL)
$(BBL): %.bbl: %.aux
bibtex -min-crossrefs=100 -terse $<
$(PDATA): %.pdata: %.tex
$(PDFLATEX) $<
$(TARGET.aux): %.aux: %.tex
$(PDFLATEX) $<
$(TARGET.pdf): %.pdf: %.tex $(SRC) $(BIB) $(PROPCLS)
$(PDFLATEX) $< || $(RM) $@
# sort $(PROPOSAL:%.tex=%.delivs) > $(PROPOSAL:%.tex=%.deliverables)
@if (test -e $(patsubst %.tex, %.idx, $<));\
then makeindex $(patsubst %.tex, %.idx, $<); fi
$(MAKE) -$(MAKEFLAGS) $(BBL)
@if (grep "(re)run BibTeX" $(patsubst %.tex, %.log, $<)> /dev/null);\
then $(MAKE) -B $(BBL); fi
$(PDFLATEX) $< || $(RM) $@
@if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
then $(PDFLATEX) $< || $(RM) $@; fi
@if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
then $(PDFLATEX) $< || $(RM) $@; fi
clean:
rm -f *~ *.log *.ilg *.out *.glo *.idx *.ilg *.blg *.run.xml *.synctex.gz *.cut
distclean: clean
rm -f *.aux *.ind *.gls *.ps *.dvi *.thm *.out *.run.xml *.bbl *.toc *.deliv* *.pdata *-blx.bib
rm -Rf auto
echo:
@echo $(BIBINPUTS)