From d4422f27c424cce84d8d0a1f40ab65ef07d8376e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sat, 20 Nov 2021 20:25:59 +0100 Subject: f31 naloga --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 \ -- cgit v1.2.3