summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2025-06-24 19:46:28 +0400
committerSuleyman Farajli <suleyman@farajli.net>2025-06-24 19:48:08 +0400
commit6e77e0358abff4fe1997a9da882fae35c44a277a (patch)
tree336e795eeec04cf5e4a415c8fbddf22d74202352 /GNUmakefile
init: first commit
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..0d49d96
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,25 @@
+MD = $(shell find content/ -name '*.md')
+PROPERMD = $(shell scripts/filter_proper_md $(MD))
+HTML = $(patsubst content/%.md, public/%.html, $(PROPERMD))
+STATICASSETS = $(shell find static -type f)
+PUBLICASSETS = $(patsubst static/%, public/%, $(STATICASSETS))
+
+# Calling make is used for making sure that index pages are build first
+all:
+ $(MAKE) -f index_pages.mk
+ $(MAKE) pages
+
+pages: $(HTML) $(PUBLICASSETS)
+
+public/%.html: content/%.md
+ mkdir -p $$(dirname $@)
+ scripts/build_page $< > $@
+
+$(PUBLICASSETS): public/%: static/%
+ mkdir -p $$(dirname $@)
+ cp $< $@
+
+clean:
+ rm -rf public
+
+.PHONY: all clean pages