about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorAlan Pearce2023-09-05 21:34:28 +0200
committerAlan Pearce2023-09-05 21:34:28 +0200
commitbfd9de8db4cf32a8ba71402deb113a30a4e9b739 (patch)
tree74695db3d63adb63dfd4d62d2bbaf9d1285378bc /Makefile
parenta4024d05c9f3a6807b212a4570381274e7a88b70 (diff)
downloadwebsite-bfd9de8db4cf32a8ba71402deb113a30a4e9b739.tar.lz
website-bfd9de8db4cf32a8ba71402deb113a30a4e9b739.tar.zst
website-bfd9de8db4cf32a8ba71402deb113a30a4e9b739.zip
Beautify make output
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 294b75e..0d658d4 100644
--- a/Makefile
+++ b/Makefile
@@ -5,9 +5,10 @@
 PREFIX ?= public
 
 md_files := $(shell fd . content --type=file -e md)
-brotli := brotli --force --no-copy-stat
-gzip := gzip --best --keep --force
-zstd := zstd --force --no-pass-through -19 --quiet --stdout
+brotli := @brotli --force --no-copy-stat
+gzip := @gzip --best --keep --force
+zstd := @zstd --force --no-pass-through -19 --quiet --stdout
+pr   := @printf "%4s %s\n"
 
 build: $(PREFIX)/index.html
 
@@ -17,7 +18,8 @@ $(PREFIX)/index.html: config.toml $(md_files)
 format: .formatstamp
 
 .formatstamp: $(PREFIX)/index.html
-	prettier --write --parser html --print-width 200 "$(PREFIX)/**/*.html"
+	@echo "Formatting HTML..."
+	@prettier --write --parser html --print-width 200 "$(PREFIX)/**/*.html" > /dev/null
 	@touch .formatstamp
 
 clean:
@@ -30,44 +32,56 @@ gzip_files := $(patsubst %, %.gz, $(to_compress))
 zstd_files := $(patsubst %, %.zst, $(to_compress))
 
 %.html.br: %.html
+	@echo $@
 	$(brotli) $<
 
 %.xml.br: %.xml
+	@echo $@
 	$(brotli) $<
 
 %.txt.br: %.txt
+	@echo $@
 	$(brotli) $<
 
 %.asc.br: %.asc
+	@echo $@
 	$(brotli) $<
 
 %.html.gz: %.html
+	@echo $@
 	$(gzip) $<
 
 %.xml.gz: %.xml
 	$(gzip) $<
 
 %.txt.gz: %.txt
+	@echo $@
 	$(gzip) $<
 
 %.asc.gz: %.asc
+	@echo $@
 	$(gzip) $<
 
 %.html.zst: %.html
+	@echo $@
 	$(zstd) $< > $@
 
 %.xml.zst: %.xml
+	@echo $@
 	$(zstd) $< > $@
 
 %.txt.zst: %.txt
+	@echo $@
 	$(zstd) $< > $@
 
 %.asc.zst: %.asc
+	@echo $@
 	$(zstd) $< > $@
 
 compress: .compressstamp
 
 .compressstamp: .formatstamp $(brotli_files) $(gzip_files) $(zstd_files)
+	@echo "Compressing output files..."
 	@touch .compressstamp
 
 deploy: .deploystamp