avoid non-portable echo -e

Since -e is not in POSIX, not all shells support it, so some just
show output like:
	$ make all
	-e ==== Use 'make dev' to keep debug symbols
	-e .....

Use portable printf which works in all shells, and can display these
messages easily in one call rather than 3 separate shells.
This commit is contained in:
Mike Frysinger 2021-12-23 00:52:00 -05:00
parent c4a76314b8
commit 1f24b85fb4

View File

@ -13,9 +13,10 @@ LDFLAGS+=-L${CURDIR}/bin
OBJS=$(addprefix ${OBJDIR}/,$(subst .cpp,.o,${CXXFILES})) OBJS=$(addprefix ${OBJDIR}/,$(subst .cpp,.o,${CXXFILES}))
all: ${CURDIR}/bin/samrewritten all: ${CURDIR}/bin/samrewritten
@echo -e "==== Use '\033[1mmake dev\033[0m' to keep debug symbols" @printf "==== %b\n" \
@echo -e "==== Use '\033[1mmake clean\033[0m' to remove object files" "Use '\033[1mmake dev\033[0m' to keep debug symbols" \
@echo -e "==== Nothing left to do." "Use '\033[1mmake clean\033[0m' to remove object files" \
"Nothing left to do."
dev: CXXFLAGS += -g -DDEBUG_CERR dev: CXXFLAGS += -g -DDEBUG_CERR
dev: ${CURDIR}/bin/samrewritten dev: ${CURDIR}/bin/samrewritten