summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-08-05 02:10:53 -0400
committerJohn Turner <jturner.usa@gmail.com>2025-08-05 02:10:53 -0400
commitdaa0086eff780285f273cc4af527a091133eef72 (patch)
treec3e44f5cc600409482b0a137613d6848b779cfca
parent69e832af275eca9adf34c90ba5273e653cc26d30 (diff)
downloadwebsite-daa0086eff780285f273cc4af527a091133eef72.tar.gz
setup makefile to install the website files
-rw-r--r--makefile15
1 files 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