From bca217e69837e2ecb788511b786f4adc9a74769e Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Tue, 11 Apr 2023 17:08:06 -0400 Subject: Remove extraneous directory in doc --- docs/Makefile | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 docs/Makefile (limited to 'docs/Makefile') diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..c63e53f --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,70 @@ +PROJECTNAME=$(basename $(wildcard *.tex)) +LIBS=$(notdir $(wildcard libs/*)) +FIGS=$(notdir $(wildcard figs/*.fig)) + +PDFS=$(addsuffix .pdf, $(PROJECTNAME)) +SYNCTEXS=$(addsuffix .synctex.gz, $(PROJECTNAME)) + +all: $(PROJECTNAME) + +$(PROJECTNAME): $(LIBS) $(FIGS) + pdflatex -file-line-error $@.tex + pdflatex -file-line-error $@.tex + pdflatex -synctex=1 $@.tex + +$(PROJECTNAME).aux: $(LIBS) $(FIGS) + pdflatex -file-line-error -draftmode $(PROJECTNAME).tex + + +$(SYNCTEXS): $(LIBS) $(FIGS) + pdflatex -synctex=1 $(patsubst %.synctex.gz, %.tex, $@) + +install: $(PROJECTNAME) + cp $^.pdf $(INSTALLDIR)/ + +install-synctex: $(SYNCTEXS) + cp $^ $(INSTALLDIR)/ + +install-bibliography: bibliography/bibliography.tex + cp bibliography/bibliography.tex $(INSTALLDIR)/bibliography/ + + +libs: $(LIBS) + +$(LIBS): + ln -fs libs/$@ ./ + +bibliography/bibliography.tex: $(PROJECTNAME).aux + BBlog -c bibliography/conf.BBlog -d $(BIBLIOGRAPHY) -b bibliography/bibliography.tex + +figs: $(FIGS) + +$(FIGS): + make -C figs/$@ + ln -fs figs/$@/*.pdf ./ + + +clean-aux: clean-figs-aux + rm -f $(addsuffix .aux, $(PROJECTNAME)) + rm -f $(addsuffix .log, $(PROJECTNAME)) + rm -f $(addsuffix .out, $(PROJECTNAME)) + rm -f $(addsuffix .toc, $(PROJECTNAME)) + +clean-libs: + rm -f $(LIBS) + +clean-figs: + $(foreach fig,$(addprefix figs/, $(FIGS)), make -C $(fig) clean; ) + rm -f $(notdir $(wildcard figs/*.fig/*.pdf)) + +clean-figs-aux: + $(foreach fig,$(addprefix figs/, $(FIGS)), make -C $(fig) clean-aux; ) + + +clean-tex: + rm -f $(PDFS) $(SYNCTEXS) + +clean-bibliography: + rm -f bibliography/bibliography.tex + +clean: clean-aux clean-tex clean-libs clean-figs -- cgit v1.2.3-54-g00ecf