2024-12-28 22:16:07 +01:00
|
|
|
PAGES = index.html pubkey.txt rainbow-quox/index.html \
|
|
|
|
dnd/index.html $(wildcard dnd/*/index.html)
|
2024-09-04 15:31:06 +02:00
|
|
|
MEDIA = \
|
2024-09-22 21:32:01 +02:00
|
|
|
$(wildcard media/*.png) $(wildcard media/*.gif) $(wildcard media/*.webp) \
|
2024-09-04 15:31:06 +02:00
|
|
|
$(wildcard media/flags/*) $(wildcard media/buttons/*) \
|
2024-12-03 03:40:16 +01:00
|
|
|
$(wildcard media/icons/*) $(wildcard media/bg/*) 8831.png 8831-quox.png \
|
2024-12-08 03:32:47 +01:00
|
|
|
$(wildcard rainbow-quox/front/*) $(wildcard rainbow-quox/back/*) \
|
2024-12-22 04:27:37 +01:00
|
|
|
$(wildcard rainbow-quox/*.svg) rainbow-quox/palette.svg \
|
2024-12-28 22:16:07 +01:00
|
|
|
$(wildcard dnd/*.png) $(wildcard dnd/*.webp) $(wildcard dnd/*/*.webp)
|
2024-12-09 22:15:42 +01:00
|
|
|
CSS = $(shell find fonts -type f) \
|
|
|
|
$(patsubst %.scss,%.css, \
|
2024-12-22 04:27:37 +01:00
|
|
|
$(wildcard rainbow-quox/style/*) $(wildcard style/*)) \
|
2024-12-28 22:16:07 +01:00
|
|
|
dnd/base.css dnd/bio.css dnd/index.css $(wildcard dnd/*/style.css)
|
2024-12-10 02:51:34 +01:00
|
|
|
SCRIPTS = $(patsubst %.ts,%.js,$(wildcard script/*.ts rainbow-quox/script/*.ts))
|
2024-08-24 20:46:17 +02:00
|
|
|
MISC = $(shell find .well-known -type f)
|
2024-09-04 15:31:06 +02:00
|
|
|
ALL = $(CSS) $(PAGES) $(MEDIA) $(SCRIPTS) $(MISC)
|
2020-06-30 16:25:01 +02:00
|
|
|
|
2024-12-03 03:23:07 +01:00
|
|
|
BUILDDIR ?= /srv/www/yummy
|
2020-06-30 19:33:54 +02:00
|
|
|
TMPDIR ?= _tmp
|
2020-06-30 16:25:01 +02:00
|
|
|
|
2020-06-30 19:34:20 +02:00
|
|
|
HOST ?= yummy.cricket
|
|
|
|
REMOTE_USER ?= www-data
|
2024-09-25 21:56:21 +02:00
|
|
|
REMOTE_DIR ?= yummy
|
2020-06-30 19:33:54 +02:00
|
|
|
|
|
|
|
all: build
|
|
|
|
|
2024-08-24 20:46:17 +02:00
|
|
|
build: $(patsubst %,$(BUILDDIR)/%,$(ALL))
|
2020-06-30 19:33:54 +02:00
|
|
|
|
2020-06-30 19:34:20 +02:00
|
|
|
upload: build
|
2021-05-24 11:41:49 +02:00
|
|
|
@rsync --recursive --partial --progress --copy-links \
|
2024-12-03 14:51:58 +01:00
|
|
|
--compress --human-readable --hard-links \
|
2021-05-24 11:41:49 +02:00
|
|
|
--delete --delete-after \
|
2024-12-03 03:23:07 +01:00
|
|
|
--rsh='ssh -l $(REMOTE_USER)' \
|
2021-05-24 11:41:49 +02:00
|
|
|
$(BUILDDIR)/ $(HOST):$(REMOTE_DIR)/
|
2020-06-30 19:34:20 +02:00
|
|
|
|
2020-06-30 19:33:54 +02:00
|
|
|
$(BUILDDIR)/%: %
|
2024-12-09 22:15:42 +01:00
|
|
|
@echo '[copy] ' $<
|
|
|
|
mkdir -p $(dir $@)
|
|
|
|
cp $< $@
|
2020-07-03 20:05:52 +02:00
|
|
|
|
2024-09-04 15:31:06 +02:00
|
|
|
$(BUILDDIR)/%.js: %.ts
|
2024-12-09 22:15:42 +01:00
|
|
|
@echo '[tsc] ' $<
|
2024-09-04 15:31:06 +02:00
|
|
|
tsc --strict --noUncheckedIndexedAccess --noEmitOnError \
|
2024-12-13 02:53:47 +01:00
|
|
|
--lib dom,es2023 --target es2022 \
|
2024-09-04 15:31:06 +02:00
|
|
|
--outDir $(dir $@) $^
|
|
|
|
|
2024-12-09 22:15:42 +01:00
|
|
|
$(BUILDDIR)/rainbow-quox/palette.svg: rainbow-quox/make-palette/*
|
|
|
|
@echo '[make-palette] rainbow-quox/palette.svg'
|
|
|
|
cd rainbow-quox/make-palette; \
|
|
|
|
cabal run -v0 -- make-palette $(abspath $@)
|
2024-12-08 03:32:47 +01:00
|
|
|
|
2024-12-09 22:15:42 +01:00
|
|
|
$(BUILDDIR)/%.css: %.scss $(wildcard $(dir %)/lib/*.scss)
|
|
|
|
@echo '[sass] ' $<
|
|
|
|
mkdir -p $(dir $@)
|
|
|
|
sass --no-source-map -I style $< $@ \
|
|
|
|
--silence-deprecation mixed-decls
|
2024-09-04 15:31:06 +02:00
|
|
|
|
2020-06-29 02:21:02 +02:00
|
|
|
clean:
|
2024-12-09 22:15:42 +01:00
|
|
|
@echo '[clean]'
|
2020-06-30 19:33:54 +02:00
|
|
|
$(RM) -r $(TMPDIR) $(BUILDDIR)
|
2020-06-29 02:21:02 +02:00
|
|
|
|
2020-06-30 19:34:20 +02:00
|
|
|
.PHONY: clean all build upload
|
2024-12-09 22:15:42 +01:00
|
|
|
|
|
|
|
.SILENT:
|