From 6e77e0358abff4fe1997a9da882fae35c44a277a Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Tue, 24 Jun 2025 19:46:28 +0400 Subject: init: first commit --- GNUmakefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 GNUmakefile (limited to 'GNUmakefile') 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 -- cgit v1.2.3