From a28f76e394626e40c041f03dc1a52b688dd0df71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Wed, 4 Oct 2017 15:50:07 +0200 Subject: [PATCH] =?UTF-8?q?horribelt=20og=20ul=C3=A6seligt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0335b77..ba50674 100644 --- a/Makefile +++ b/Makefile @@ -7,15 +7,19 @@ files := $(wildcard org/*.org) all: org html pdf tex org html pdf tex : $(wildcard org/*.org) - GOALS=`echo $(files) | sed 's/\.org/.$@/g' | sed 's/org\//out\//g'`; \ + GOALS=`echo $(foreach file,$(files),out/$(basename $(notdir $(file)))/$(notdir $(file))) | sed 's/\.org/.$@/g'`; \ $(MAKE) $$GOALS; out tmp : mkdir $@ .SECONDEXPANSION: -out/%.org out/%.tex out/%.pdf out/%.html : $$(subst out,tmp,$$@) | out - cp $< out/ +out/%.org out/%.tex out/%.pdf out/%.html : tmp/$$(notdir $$@) | out + mkdir -p $(@D) + echo $@ + echo out/$(basename $(notdir $@)) + echo $(notdir $@) out/$(basename $(notdir $<)) $< + cp $< out/$(basename $(notdir $<)) tmp/%.org : org/%.org | tmp cp $< tmp/ @@ -38,4 +42,4 @@ upload: scp -P 35284 out/* christoffer@users.guava.space:public_html/holdets_time/ publish: - cp out/* ~/public_html/holdets_time/ + cp -r out/* ~/public_html/holdets_time/