Use an OUTPUT_DIR variable in the Makefile.

This commit is contained in:
Nicolás Ortega Froysa 2020-11-14 14:27:59 +01:00
parent 5e0cbb070b
commit c36c7abe00

View File

@ -1,15 +1,17 @@
OUTPUT_DIR=output
.PHONY: pages blog all clean .PHONY: pages blog all clean
pages: pages:
mkdir -p output mkdir -p $(OUTPUT_DIR)
find pages -type f -name '*.cfg' -print0 | sort -zr | xargs -0 saait find pages -type f -name '*.cfg' -print0 | sort -zr | xargs -0 saait -o $(OUTPUT_DIR)/
cp nicolas@ortegas.org_pub.asc style.css favicon.png output/ cp nicolas@ortegas.org_pub.asc style.css favicon.png $(OUTPUT_DIR)
blog: blog:
mkdir -p output/blog mkdir -p $(OUTPUT_DIR)/blog
find blog/posts -type f -name '*.cfg' -print0 | sort -zr | xargs -0 saait -o output/blog/ -t blog/templates/ find blog/posts -type f -name '*.cfg' -print0 | sort -zr | xargs -0 saait -o $(OUTPUT_DIR)/blog/ -t blog/templates/
all: pages blog all: pages blog
clean: clean:
rm -rf output rm -rf $(OUTPUT_DIR)