From 8249a6a5e69e100b5b8f2bfda9291f07b862b7fc Mon Sep 17 00:00:00 2001 From: Ayush Agarwal Date: Sat, 11 Mar 2023 17:24:10 +0530 Subject: [PATCH] make: remove redundant variables The GNU make manual advises not to use variables for commands like `rm` which are widely available on all Linux and UNIX-like platforms. --- Makefile | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 8bdd652..3d078de 100644 --- a/Makefile +++ b/Makefile @@ -7,26 +7,24 @@ BASHCOMPDIR ?= ${DATAROOTDIR}/bash-completion/completions FISHCOMPDIR ?= ${DATAROOTDIR}/fish/vendor_completions.d PROG ?= tessen -RM := rm -ECHO := @echo SCDOC := scdoc INSTALL := install .PHONY: all install minimal bashcomp fishcomp clean uninstall all: - ${ECHO} "${PROG} is a shell script and doesn't need to be compiled" - ${ECHO} "To install it, enter \"make install\"" + @echo "${PROG} is a shell script and doesn't need to be compiled" + @echo "To install it, enter \"make install\"" install: man bashcomp fishcomp ${INSTALL} -Dm 0755 ${PROG} -t ${DESTDIR}${BINDIR} - ${ECHO} "" - ${ECHO} "${PROG} has been installed succesfully" + @echo "" + @echo "${PROG} has been installed succesfully" minimal: ${INSTALL} -Dm 0755 ${PROG} -t ${DESTDIR}${BINDIR} - ${ECHO} "" - ${ECHO} "${PROG} has been installed succesfully" + @echo "" + @echo "${PROG} has been installed succesfully" man: man/${PROG}.1 man/${PROG}.5 ${INSTALL} -Dm 0644 man/${PROG}.1 -t ${DESTDIR}${MANDIR}/man1 @@ -42,12 +40,12 @@ fishcomp: ${INSTALL} -Dm 0644 completion/${PROG}.fish-completion ${DESTDIR}${FISHCOMPDIR}/${PROG}.fish clean: - ${RM} -f man/${PROG}.1 - ${RM} -f man/${PROG}.5 + rm -f man/${PROG}.1 + rm -f man/${PROG}.5 uninstall: - ${RM} -f "${DESTDIR}${BINDIR}/${PROG}" - ${RM} -f "${DESTDIR}${MANDIR}/man1/${PROG}.1" - ${RM} -f "${DESTDIR}${MANDIR}/man5/${PROG}.5" - ${RM} -f "${DESTDIR}${BASHCOMPDIR}/${PROG}" - ${RM} -f "${DESTDIR}${FISHCOMPDIR}/${PROG}.fish" + rm -f "${DESTDIR}${BINDIR}/${PROG}" + rm -f "${DESTDIR}${MANDIR}/man1/${PROG}.1" + rm -f "${DESTDIR}${MANDIR}/man5/${PROG}.5" + rm -f "${DESTDIR}${BASHCOMPDIR}/${PROG}" + rm -f "${DESTDIR}${FISHCOMPDIR}/${PROG}.fish"