about summary refs log tree commit diff
path: root/system.mk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--system.mk27
1 files changed, 27 insertions, 0 deletions
diff --git a/system.mk b/system.mk
new file mode 100644
index 0000000..7ab5aba
--- /dev/null
+++ b/system.mk
@@ -0,0 +1,27 @@
+PREFIX ?= /usr/local
+SHAREDIR ?= ${PREFIX}/share
+EXMANDIR ?= ${SHAREDIR}/exman
+
+CURL ?= curl
+TAR ?= tar
+ALLOW_FAILURE ?= false
+
+all: ${DISTFILES}
+
+.PRECIOUS: ${DISTFILES}
+
+${DISTFILES}:
+	${CURL} -O ${MIRROR}/${.TARGET}
+
+clean:
+	rm -f ${DISTFILES}
+
+install: ${DISTFILES}
+	install -d ${EXMANDIR}/${SYSTEM}
+.for distfile in ${DISTFILES}
+	${TAR} -x -f ${distfile} -C ${EXMANDIR}/${SYSTEM} \
+		--strip-components=${STRIP} '${FILES}' || ${ALLOW_FAILURE}
+.endfor
+
+uninstall:
+	rm -fr ${EXMANDIR}/${SYSTEM}