Skip to content
Snippets Groups Projects
Commit c7d6ebd5 authored by Jan Wille's avatar Jan Wille
Browse files

Makefile gefixt

parent 9921303f
No related branches found
No related tags found
2 merge requests!6Development,!5Development
...@@ -4,18 +4,19 @@ LATEX = pdflatex ...@@ -4,18 +4,19 @@ LATEX = pdflatex
BIBTEX = biber BIBTEX = biber
SUBDIRS= img plt SUBDIRS= img plt
OUTDIR = build OUTDIR = test
TEX_FLAGS = -file-line-error -interaction=nonstopmode TEX_FLAGS = -file-line-error -interaction=nonstopmode
COM_FLAGS = -output-directory=build -quiet COM_FLAGS = -output-directory=$(OUTDIR) -quiet
GARBAGE_PATTERNS = *.aux *.bbl *.bcf *.blg *.idx *.ind *.lof *.lot *.log *.xml *.toc GARBAGE_PATTERNS = *.aux *.bbl *.bcf *.blg *.idx *.ind *.lof *.lot *.log *.xml *.toc
SUB_TEX_FILES = $(foreach D,$(SUBDIRS),$(wildcard $(D)/*.tex)) SUB_TEX_FILES = $(foreach D,$(SUBDIRS),$(wildcard $(D)/*.tex))
SUB_PDF_FILES = $(join $(dir $(SUB_TEX_FILES)),$(addprefix $(OUTDIR)/,$(notdir $(SUB_TEX_FILES:tex=pdf)))) SUB_PDF_FILES = $(join $(dir $(SUB_TEX_FILES)),$(addprefix $(OUTDIR)/,$(notdir $(SUB_TEX_FILES:tex=pdf))))
GARBAGE = $(foreach D,. $(SUBDIRS), $(wildcard $(addprefix $(D)/$(OUTDIR)/,$(GARBAGE_PATTERNS)))) GARBAGE = $(foreach D,. $(SUBDIRS), $(wildcard $(addprefix $(D)/$(OUTDIR)/,$(GARBAGE_PATTERNS))))
export TEXINPUTS:=$(CURDIR)\src export TEXINPUTS:=$(CURDIR)\src
std: all tidy
all: bib all: bib
$(LATEX) $(TEX_FLAGS) $(COM_FLAGS) $(NAME).tex $(LATEX) $(TEX_FLAGS) $(COM_FLAGS) $(NAME).tex
$(LATEX) -synctex=1 $(TEX_FLAGS) $(COM_FLAGS) $(NAME).tex $(LATEX) -synctex=1 $(TEX_FLAGS) $(COM_FLAGS) $(NAME).tex
...@@ -28,12 +29,13 @@ bib: pdf $(OUTDIR)\$(NAME).bcf ...@@ -28,12 +29,13 @@ bib: pdf $(OUTDIR)\$(NAME).bcf
$(BIBTEX) $(COM_FLAGS) $(NAME) $(BIBTEX) $(COM_FLAGS) $(NAME)
$(SUB_PDF_FILES): $(SUB_TEX_FILES) $(SUB_PDF_FILES): $(SUB_TEX_FILES)
cd $(subst build/,,$(dir $@)) && $(LATEX) $(TEX_FLAGS) $(COM_FLAGS) $(notdir $(@:pdf=tex)) cd $(subst $(OUTDIR)/,,$(dir $@)) && $(LATEX) $(TEX_FLAGS) $(COM_FLAGS) $(notdir $(@:pdf=tex))
clean: tidy clean: tidy
for %%a in ($(foreach D,. $(SUBDIRS), "$(D)\$(OUTDIR)")) do echo if exist %%~a rmdir /s /q %%~a for %%a in ($(foreach D,$(subst /,\,$(SUB_PDF_FILES)) $(subst .pdf,.synctex.gz,$(subst /,\,$(SUB_PDF_FILES))) $(OUTDIR)\$(NAME).pdf $(OUTDIR)\$(NAME).synctex.gz, "$(D)")) do if exist %%~a del /q %%~a
if exist $(NAME).pdf del $(NAME).pdf for %%a in ($(foreach D,. $(SUBDIRS),"$(D)\$(if $(subst .,,$(OUTDIR)),$(OUTDIR),build)")) do if exist %%~a rmdir /q %%~a
# if exist $(NAME).pdf del $(NAME).pdf
tidy: tidy:
if exist $(or $(word 1, $(subst /,\,$(GARBAGE))), false) del /q $(subst /,\,$(GARBAGE)) if exist $(or $(word 1, $(subst /,\,$(GARBAGE))), false) del /q $(subst /,\,$(GARBAGE))
\ No newline at end of file
...@@ -14,8 +14,6 @@ them with specifig configurations and presets as well as providing comonly neede ...@@ -14,8 +14,6 @@ them with specifig configurations and presets as well as providing comonly neede
# TODO: # TODO:
Makefile BREAKS when no output direcory given!!
custom commands for titalpage: custom commands for titalpage:
- Profs - Profs
- ImatNRs - ImatNRs
......
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment