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/