summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--BUGS2
-rw-r--r--GNUmakefile16
3 files changed, 12 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index e703167..f3f6456 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
install.mk
-out/
+output/
diff --git a/BUGS b/BUGS
index a5e31f4..a99ff5a 100644
--- a/BUGS
+++ b/BUGS
@@ -1,3 +1,3 @@
- lists on mobile view has no margin
-- Makefile html:md dependency is broken with the introduction of out/ directory
++ Makefile html:md dependency is broken with the introduction of out/ directory
- Non-markdown files are not placed in the site (CV, Archive files, etc.)
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