mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Use ${ECHON} for when /bin/echo -n is needed
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -25,7 +25,8 @@ The following are the changes from calc version 2.12.8.1 to date:
|
|||||||
Fixed Makefile dependenies for the args.h rule.
|
Fixed Makefile dependenies for the args.h rule.
|
||||||
|
|
||||||
Fixed Makefile cases where echo with -n is used. On some systems,
|
Fixed Makefile cases where echo with -n is used. On some systems,
|
||||||
/bin/sh does not use -n, so we must call /bin/echo -n instead.
|
/bin/sh does not use -n, so we must call /bin/echo -n instead
|
||||||
|
via the ${ECHON} Makefile variable.
|
||||||
|
|
||||||
Add missing standard tools to sub-Makefiles to make them
|
Add missing standard tools to sub-Makefiles to make them
|
||||||
easier to invoke directly.
|
easier to invoke directly.
|
||||||
|
@@ -1100,6 +1100,11 @@ TRUE= true
|
|||||||
UNAME= uname
|
UNAME= uname
|
||||||
XARGS= xargs
|
XARGS= xargs
|
||||||
|
|
||||||
|
# NOTE: On some shells, echo is a builtin that does
|
||||||
|
# not understand -n, so we call /bin/echo -n
|
||||||
|
# directly to get around such shells.
|
||||||
|
ECHON= /bin/echo -n
|
||||||
|
|
||||||
# assume the X11 makedepend tool for the depend rule
|
# assume the X11 makedepend tool for the depend rule
|
||||||
MAKEDEPEND= makedepend
|
MAKEDEPEND= makedepend
|
||||||
STRIP= strip
|
STRIP= strip
|
||||||
@@ -3511,7 +3516,8 @@ have_strdup.h: have_strdup.c ${MAKE_FILE}
|
|||||||
${TRUE}; \
|
${TRUE}; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
args.h: have_stdvs.c have_varvs.c have_string.h have_unistd.h have_string.h have_stdlib.h
|
args.h: have_stdvs.c have_varvs.c have_string.h have_unistd.h have_string.h \
|
||||||
|
have_stdlib.h
|
||||||
${Q} ${RM} -f args.h
|
${Q} ${RM} -f args.h
|
||||||
${Q} echo 'forming args.h'
|
${Q} echo 'forming args.h'
|
||||||
${Q} echo '/*' > args.h
|
${Q} echo '/*' > args.h
|
||||||
@@ -4301,7 +4307,7 @@ debug: calcinfo env
|
|||||||
@${MAKE} -f Makefile Q= V=@ ver_calc${EXT}
|
@${MAKE} -f Makefile Q= V=@ ver_calc${EXT}
|
||||||
-@./ver_calc${EXT}
|
-@./ver_calc${EXT}
|
||||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||||
@/bin/echo -n '=-=-=-= Print #defile values if custom functions '
|
@${ECHON} '=-=-=-= Print #defile values if custom functions '
|
||||||
@echo 'are allowed =-=-=-='
|
@echo 'are allowed =-=-=-='
|
||||||
-@${CALC_ENV} ./calc${EXT} -e -q -C 'print custom("sysinfo", 2);'
|
-@${CALC_ENV} ./calc${EXT} -e -q -C 'print custom("sysinfo", 2);'
|
||||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||||
@@ -4903,7 +4909,7 @@ uninstall: custom/Makefile
|
|||||||
-${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}" ]; then \
|
-${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}" ]; then \
|
||||||
${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
|
${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
|
||||||
if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}" ]; then \
|
if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}" ]; then \
|
||||||
/bin/echo -n "cannot uninstall " \
|
${ECHON} "cannot uninstall " \
|
||||||
echo "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
|
echo "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
|
||||||
else \
|
else \
|
||||||
echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
|
echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
|
||||||
@@ -5025,7 +5031,7 @@ calc-symlink:
|
|||||||
if [ ! -L "${CATDIR}/calc.${CATEXT}" -a \
|
if [ ! -L "${CATDIR}/calc.${CATEXT}" -a \
|
||||||
"${T}${CATDIR}/calc.${CATEXT}" -ef \
|
"${T}${CATDIR}/calc.${CATEXT}" -ef \
|
||||||
"${CATDIR}/calc.${CATEXT}" ]; then \
|
"${CATDIR}/calc.${CATEXT}" ]; then \
|
||||||
/bin/echo -n "ERROR: ${T}${CATDIR}/calc.${CATEXT}" 2>&1; \
|
${ECHON} "ERROR: ${T}${CATDIR}/calc.${CATEXT}" 2>&1; \
|
||||||
echo "is the same as ${CATDIR}/calc.${CATEXT}" 1>&2; \
|
echo "is the same as ${CATDIR}/calc.${CATEXT}" 1>&2; \
|
||||||
else \
|
else \
|
||||||
if [ -e "${CATDIR}/calc.${CATEXT}" ]; then \
|
if [ -e "${CATDIR}/calc.${CATEXT}" ]; then \
|
||||||
|
@@ -180,6 +180,11 @@ SORT= sort
|
|||||||
TOUCH= touch
|
TOUCH= touch
|
||||||
TRUE= true
|
TRUE= true
|
||||||
|
|
||||||
|
# NOTE: On some shells, echo is a builtin that does
|
||||||
|
# not understand -n, so we call /bin/echo -n
|
||||||
|
# directly to get around such shells.
|
||||||
|
ECHON= /bin/echo -n
|
||||||
|
|
||||||
# The ${SCRIPT} list is the list of calc shell script files (without the .calc
|
# The ${SCRIPT} list is the list of calc shell script files (without the .calc
|
||||||
# extension) which will be installed.
|
# extension) which will be installed.
|
||||||
#
|
#
|
||||||
@@ -313,7 +318,7 @@ depend:
|
|||||||
if [ X"$$i" != X"/dev/null" ]; then \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo "$$i: $$i.calc"; \
|
echo "$$i: $$i.calc"; \
|
||||||
echo ' @$${RM} -f $$@'; \
|
echo ' @$${RM} -f $$@'; \
|
||||||
/bin/echo -n ' @$${SED} -e "1s:^#!/usr/local/src/bin/'; \
|
${ECHON} ' @$${SED} -e "1s:^#!/usr/local/src/bin/'; \
|
||||||
echo 'calc/calc:#!$${BINDIR}/calc:" $$?>$$@'; \
|
echo 'calc/calc:#!$${BINDIR}/calc:" $$?>$$@'; \
|
||||||
echo ' @$${CHMOD} +x $$@'; \
|
echo ' @$${CHMOD} +x $$@'; \
|
||||||
fi; \
|
fi; \
|
||||||
|
Reference in New Issue
Block a user