From cfbae34f3b65be6bd828f7a1bf9bab9ebebc413e Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Mon, 14 Apr 2025 13:43:55 +0200 Subject: [PATCH] makin' make-files! --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4ac7db2 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +fortune_directory = /usr/share/fortune + +dat_files = $(wildcard *.dat) + +fortune_files = $(patsubst %.dat, %, $(dat_files)) +fortune_files += $(dat_files) + +targets = $(patsubst %, $(fortune_directory)/%, $(fortune_files)) + +$(targets): $(fortune_directory)/%: % + install -pm644 $< $@ + +.PHONY: install +install: $(targets) + +clean: + $(RM) $(wildcard $(targets))