summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile
index c4a3766..dd66df7 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,13 +1,17 @@
-SRC := $(shell find . -name '*.md')
-HTML = $(SRC:.md=.html)
+SRC = $(shell find . -name '*.md')
+HTML = $(patsubst ./%.md, %.html, $(SRC))
all: $(HTML)
%.html: %.md build-page
- mkdir -p out/$$(dirname $@)
- sh build-page $< > out/$@
+ sh build-page $< > $@
+
+output: $(HTML)
+ echo $? | xargs -n 1 dirname | xargs -I _ mkdir -p $@/_
+ echo $? | xargs -n 1 | xargs -I _ cp _ $@/_
+ cp favicon.ico style.css $@/
clean:
- rm -rf out/
+ rm -rf $(HTML) output/
-.PHONY: all clean
+.PHONY: all clean