From df719f8ecb135fafa13db27fb9a825019b22b71f Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Thu, 13 Feb 2025 00:46:31 +0400 Subject: output html files style.css and favicon.ico into output/ --- .gitignore | 2 +- BUGS | 2 +- GNUmakefile | 16 ++++++++++------ 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 -- cgit v1.2.3