summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8bf8275..c356e47 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
+SHELL := /bin/bash
dirs := $(subst . , ,$(subst /Makefile,,$(shell find -name Makefile)))
pdfs := $(subst .md,.pdf,$(shell find -name *.md))
-texs := $(subst .tex,.pdf,$(shell find -name dokument.tex))
+texs := $(subst .tex,.pdf,$(shell find -name *.tex))
.PHONY: clean default
default: $(dirs) $(pdfs) $(texs)
$(dirs):
@@ -9,7 +10,7 @@ $(dirs):
pandoc -V geometry:margin=1cm $< -o $@
%.pdf: %.tex
@echo za tole rabiš moje magične skripte
- cd $(subst dokument.pdf,,$@) && ~/projects/doc/f5ff.sh dokument && biber dokument && ~/projects/doc/f5ff.sh dokument
+ n=`rev <<< $@ | cut -d/ -f1 | cut -d. -f2- | rev` && cd `rev <<< $@ | cut -d/ -f2- | rev` && ~/projects/doc/f5ff.sh $$n && (test -e `rev <<< $@ | cut -d. -f2- | rev`.bib && biber $$n ||:) && ~/projects/doc/f5ff.sh $$n
clean:
@echo cleaning $(dirs)
for dir in $(dirs); do \