summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2025-02-13 00:46:31 +0400
committerSuleyman Farajli <suleyman@farajli.net>2025-02-13 00:46:31 +0400
commitdf719f8ecb135fafa13db27fb9a825019b22b71f (patch)
tree5f22e6056732fb6690ee053cc9f5a67e09680322 /GNUmakefile
parent3e564a8f8343801b04672fc0502d0f02d4ff5610 (diff)
output html files style.css and favicon.ico into output/
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