summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2022-08-27 17:41:07 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2022-08-27 17:41:07 +0300
commit0c0bee4482d4fbfa675b97ca30405fdc77655936 (patch)
treee64fea245325d60a5a4bc474ee1842f125d351f4
parentca48896865778df2c79bc1d13f03b5f56136304c (diff)
downloadmeli-0c0bee4482d4fbfa675b97ca30405fdc77655936.zip
Makefile: add missing .PHONY targets, fix missing tab indentation
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 6327f4ae..17bc8c36 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,8 @@
#
# You should have received a copy of the GNU General Public License
# along with meli. If not, see <http://www.gnu.org/licenses/>.
+.POSIX:
+.SUFFIXES:
# Options
PREFIX ?= /usr/local
@@ -46,11 +48,11 @@ CARGO_COLOR ?= `[ -z $${NO_COLOR+x} ] && echo "" || echo "--color=never "`
RED ?= `[ -z $${NO_COLOR+x} ] && ([ -z $${TERM} ] && echo "" || tput setaf 1) || echo ""`
GREEN ?= `[ -z $${NO_COLOR+x} ] && ([ -z $${TERM} ] && echo "" || tput setaf 2) || echo ""`
-.POSIX:
-.SUFFIXES:
+.PHONY: meli
meli: check-deps
@${CARGO_BIN} build ${CARGO_ARGS} ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" ${FEATURES} --release
+.PHONY: help
help:
@echo "For a quick start, build and install locally:\n ${BOLD}${GREEN}PREFIX=~/.local make install${ANSI_RESET}\n"
@echo "Available subcommands:"
@@ -126,9 +128,9 @@ install-doc:
MANPAGEPATH=${DESTDIR}${MANDIR}/man$${SECTION}/$${MANPAGE}.gz; \
echo " * installing $${MANPAGE} → ${GREEN}$${MANPAGEPATH}${ANSI_RESET}"; \
gzip -n < ${DOCS_SUBDIR}$${MANPAGE} > $${MANPAGEPATH} \
- ; done ; \
+ ; done ; \
(case ":${MANPATHS}:" in \
- *:${DESTDIR}${MANDIR}:*) echo -n "";; \
+ *:${DESTDIR}${MANDIR}:*) echo -n "";; \
*) echo "\n${RED}${BOLD}WARNING${ANSI_RESET}: ${UNDERLINE}Path ${DESTDIR}${MANDIR} is not contained in your MANPATH variable or the output of \`manpath\` command.${ANSI_RESET} \`man\` might fail finding the installed manpages. Consider adding it if necessary.\nMANPATH variable / output of \`manpath\`: ${MANPATHS}" ;; \
esac) ; \
else echo "NO_MAN is defined, so no documentation is going to be installed." ; fi)
@@ -138,7 +140,7 @@ install-bin: meli
@mkdir -p $(DESTDIR)${BINDIR}
@echo " - ${BOLD}Installing binary to ${ANSI_RESET}${GREEN}${DESTDIR}${BINDIR}/meli${ANSI_RESET}"
@case ":${PATH}:" in \
- *:${DESTDIR}${BINDIR}:*) echo -n "";; \
+ *:${DESTDIR}${BINDIR}:*) echo -n "";; \
*) echo "\n${RED}${BOLD}WARNING${ANSI_RESET}: ${UNDERLINE}Path ${DESTDIR}${BINDIR} is not contained in your PATH variable.${ANSI_RESET} Consider adding it if necessary.\nPATH variable: ${PATH}";; \
esac
@mkdir -p $(DESTDIR)${BINDIR}