diff options
| author | Xiao Pan <gky44px1999@gmail.com> | 2024-01-09 06:08:34 -0800 | 
|---|---|---|
| committer | Xiao Pan <gky44px1999@gmail.com> | 2024-01-09 06:08:34 -0800 | 
| commit | 368c1b9352c09419b82c468b381f3ecc27fd2195 (patch) | |
| tree | 995872a0557d14a25973b808bf89d2caca098f10 | |
| parent | 5b1174378430fec60eb4021b55ba35f7d43bf7c9 (diff) | |
add makefile
| -rw-r--r-- | Makefile | 23 | 
1 files changed, 23 insertions, 0 deletions
| diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3a32c29 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +# Inspired from +# `info make` +# MIT https://git.suckless.org/dwm +# GPL-2.0-or-later https://git.joeyh.name/index.cgi/moreutils.git/tree/Makefile + +# For a comment inside a Makefile recipe not to echo itself on terminal, put # at very first character +# For a command not to echo itself, prefix @ to the command +# https://unix.stackexchange.com/a/740226/459013 + +SH = alarm backlight bell ccgsl cfg chmodef curlqb dateft dirnameall gita gitfork gitmetap gitmetar gitpu grrc il lastarg loop lsp mll mmi mpra mpva mpvy mvln mvtr mvtu news o orgext pa pq px qg qw rate reco rfp sbar ta time-uuid topa vinfo wh wtr xmq +PREFIX = /usr/local + +install: +	mkdir -p ${DESTDIR}${PREFIX}/bin +#	Another way would be define and use INSTALL INSTALL_PROGRAM INSTALL_DATA instead of use `cp -f` or `install` directly, see `info make` +	cp -f ${SH} ${DESTDIR}${PREFIX}/bin + +uninstall: +	for i in ${SH}; do rm -f ${DESTDIR}${PREFIX}/bin/$$i; done +#	RM is default to `rm -f`, see `info make` +#	for i in ${SH}; do ${RM} ${DESTDIR}${PREFIX}/bin/$$i; done + +.PHONY: install uninstall | 
