From daa0086eff780285f273cc4af527a091133eef72 Mon Sep 17 00:00:00 2001 From: John Turner Date: Tue, 5 Aug 2025 02:10:53 -0400 Subject: setup makefile to install the website files --- makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/makefile b/makefile index d5dbd38..5f87773 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,9 @@ -EMACS = emacs +SITE ?= jturnerusa.dev + +PREFIX ?= / +DESTDIR ?= /var/www + +EMACS ?= emacs ARGS = -batch -e "org-html-export-to-html" all: index.html blog/index.html blog/gentoo-on-gcloud.html @@ -12,9 +17,9 @@ blog/index.html: blog/index.org blog/gentoo-on-gcloud.html: blog/gentoo-on-gcloud.org $(EMACS) $< $(ARGS) -install: - mkdir srv srv/blog - cp -r *.html blog srv +install: all + install --mode 644 -D *.html --target-directory $(PREFIX)/$(DESTDIR)/$(SITE)/ + install --mode 644 -D blog/*.html --target-directory $(PREFIX)/$(DESTDIR)/$(SITE)/blog/ clean: - rm -rf *.html blog/*.html srv + rm *.html blog/*.html -- cgit v1.2.3