mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.11.0t9.4.3
This commit is contained in:
140
Makefile
140
Makefile
@@ -302,39 +302,6 @@ HAVE_STRDUP=
|
||||
ALIGN32= -DMUST_ALIGN32
|
||||
#ALIGN32= -UMUST_ALIGN32
|
||||
|
||||
# On most machines: errno sys_errlist and sys_nerr are declared
|
||||
# by either <stdio.h> and/or <errno.h>. But some systems declare
|
||||
# them somewhere else or do not declare them at all!
|
||||
#
|
||||
# If the system were doing a proper job in headers, this should declare them:
|
||||
#
|
||||
# #include <stdio.h>
|
||||
# #include <errno.h>
|
||||
#
|
||||
# But one some systems one must explicitly declare them as:
|
||||
#
|
||||
# extern int errno;
|
||||
# extern const char *const sys_errlist[];
|
||||
# extern int sys_nerr;
|
||||
#
|
||||
# and on some old systems they must be explicitly and incorrectly declared as:
|
||||
#
|
||||
# extern int errno;
|
||||
# extern char *sys_errlist[];
|
||||
# extern int sys_nerr;
|
||||
#
|
||||
# ERRNO_DECL= let calc_errno.c determine how to declare them
|
||||
# ERRNO_DECL= -DERRNO_NO_DECL headers declare them correctly
|
||||
# ERRNO_DECL= -DERRNO_STD_DECL one must explicitly declare then
|
||||
# ERRNO_DECL= -DERRNO_OLD_DECL one must explicitly & incorrectly declare them
|
||||
#
|
||||
# When in doubt, be safe leave ERRNO_DECL empty.
|
||||
#
|
||||
ERRNO_DECL=
|
||||
#ERRNO_DECL= -DERRNO_NO_DECL
|
||||
#ERRNO_DECL= -DERRNO_STD_DECL
|
||||
#ERRNO_DECL= -DERRNO_OLD_DECL
|
||||
|
||||
# where to install binary files
|
||||
#
|
||||
BINDIR= /usr/local/bin
|
||||
@@ -942,7 +909,7 @@ BUILD_H_SRC= align32.h args.h calcerr.h conf.h endian_calc.h \
|
||||
fposval.h have_const.h have_fpos.h have_malloc.h \
|
||||
have_memmv.h have_newstr.h have_offscl.h have_posscl.h \
|
||||
have_stdlib.h have_string.h have_times.h have_uid_t.h \
|
||||
have_unistd.h longbits.h longlong.h terminal.h calc_errno.h \
|
||||
have_unistd.h longbits.h longlong.h terminal.h \
|
||||
have_ustat.h have_getsid.h have_getpgid.h \
|
||||
have_gettime.h have_getprid.h have_urandom.h have_rusage.h \
|
||||
have_strdup.h
|
||||
@@ -957,7 +924,7 @@ BUILD_C_SRC= calcerr.c
|
||||
#
|
||||
UTIL_C_SRC= align32.c endian.c longbits.c have_newstr.c have_uid_t.c \
|
||||
have_const.c have_stdvs.c have_varvs.c fposval.c have_fpos.c \
|
||||
longlong.c have_offscl.c have_posscl.c have_memmv.c calc_errno.c \
|
||||
longlong.c have_offscl.c have_posscl.c have_memmv.c \
|
||||
have_ustat.c have_getsid.c have_getpgid.c \
|
||||
have_gettime.c have_getprid.c have_rusage.c have_strdup.c
|
||||
|
||||
@@ -973,20 +940,20 @@ UTIL_MISC_SRC= calcerr_h.sed calcerr_h.awk calcerr_c.sed calcerr_c.awk \
|
||||
#
|
||||
UTIL_OBJS= endian.o longbits.o have_newstr.o have_uid_t.o \
|
||||
have_const.o fposval.o have_fpos.o longlong.o try_strarg.o \
|
||||
have_stdvs.o have_varvs.o have_posscl.o have_memmv.o calc_errno.o \
|
||||
have_stdvs.o have_varvs.o have_posscl.o have_memmv.o \
|
||||
have_ustat.o have_getsid.o have_getpgid.o \
|
||||
have_gettime.o have_getprid.o ver_calc.o have_rusage.o have_strdup.o
|
||||
|
||||
# these temp files may be created (and removed) during the build of BUILD_C_SRC
|
||||
#
|
||||
UTIL_TMP= ll_tmp fpos_tmp fposv_tmp const_tmp uid_tmp newstr_tmp vs_tmp \
|
||||
calc_errno_tmp memmv_tmp offscl_tmp posscl_tmp newstr_tmp \
|
||||
memmv_tmp offscl_tmp posscl_tmp newstr_tmp \
|
||||
getsid_tmp gettime_tmp getprid_tmp rusage_tmp strdup_tmp
|
||||
|
||||
# these utility progs may be used in the process of building BUILD_H_SRC
|
||||
#
|
||||
UTIL_PROGS= align32 fposval have_uid_t longlong have_const \
|
||||
endian longbits have_newstr have_stdvs have_varvs calc_errno \
|
||||
endian longbits have_newstr have_stdvs have_varvs \
|
||||
have_ustat have_getsid have_getpgid \
|
||||
have_gettime have_getprid ver_calc have_strdup
|
||||
|
||||
@@ -2288,98 +2255,6 @@ args.h: have_stdvs.c have_varvs.c have_string.h have_unistd.h have_string.h
|
||||
true; \
|
||||
fi
|
||||
|
||||
calc_errno.h: calc_errno.c ${MAKE_FILE}
|
||||
-${Q}rm -f calc_errno.h calc_errno calc_errno_tmp
|
||||
${Q}echo 'forming calc_errno.h'
|
||||
${Q}echo '/*' > calc_errno.h
|
||||
${Q}echo ' * DO NOT EDIT -- generated by the Makefile' >> calc_errno.h
|
||||
${Q}echo ' */' >> calc_errno.h
|
||||
${Q}echo '' >> calc_errno.h
|
||||
${Q}echo '' >> calc_errno.h
|
||||
${Q}echo '#if !defined(__CALC_ERRNO_H__)' >> calc_errno.h
|
||||
${Q}echo '#define __CALC_ERRNO_H__' >> calc_errno.h
|
||||
${Q}echo '' >> calc_errno.h
|
||||
${Q}echo '' >> calc_errno.h
|
||||
-${Q}if [ X"${ERRNO_DECL}" = X"-DERRNO_NO_DECL" ]; then \
|
||||
echo '/*' >> calc_errno.h; \
|
||||
echo ' * The calc Makefile explicitly told us' >> calc_errno.h; \
|
||||
echo ' * how to declare errno and friends.' >> calc_errno.h; \
|
||||
echo ' */' >> calc_errno.h; \
|
||||
echo '' >> calc_errno.h; \
|
||||
echo '#include <stdio.h>' >> calc_errno.h; \
|
||||
echo '#include <errno.h>' >> calc_errno.h; \
|
||||
elif [ X"${ERRNO_DECL}" = X"-DERRNO_STD_DECL" ]; then \
|
||||
echo '/*' >> calc_errno.h; \
|
||||
echo ' * The calc Makefile explicitly told us' >> calc_errno.h; \
|
||||
echo ' * how to declare errno and friends.' >> calc_errno.h; \
|
||||
echo ' */' >> calc_errno.h; \
|
||||
echo '' >> calc_errno.h; \
|
||||
echo 'extern int errno; ' \
|
||||
'/* last system error */' >> calc_errno.h; \
|
||||
echo 'extern const char *const sys_errlist[];' \
|
||||
' /* system error messages*/' >> calc_errno.h; \
|
||||
echo 'extern int sys_nerr; ' \
|
||||
'/* number of system errors */' >> calc_errno.h; \
|
||||
elif [ X"${ERRNO_DECL}" = X"-DERRNO_OLD_DECL" ]; then \
|
||||
echo '/*' >> calc_errno.h; \
|
||||
echo ' * The calc Makefile explicitly told us' >> calc_errno.h; \
|
||||
echo ' * how to declare errno and friends.' >> calc_errno.h; \
|
||||
echo ' */' >> calc_errno.h; \
|
||||
echo '' >> calc_errno.h; \
|
||||
echo 'extern int errno; ' \
|
||||
'/* last system error */' >> calc_errno.h; \
|
||||
echo 'extern char *sys_errlist[];' \
|
||||
' /* system error messages*/' >> calc_errno.h; \
|
||||
echo 'extern int sys_nerr; ' \
|
||||
'/* number of system errors */' >> calc_errno.h; \
|
||||
else \
|
||||
${LCC} ${ICFLAGS} -DTRY_ERRNO_NO_DECL \
|
||||
calc_errno.c -o calc_errno 2>calc_errno_tmp; \
|
||||
if [ -x ./calc_errno ]; then \
|
||||
./calc_errno >> calc_errno.h; \
|
||||
else \
|
||||
${LCC} ${ICFLAGS} -DTRY_ERRNO_STD_DECL \
|
||||
calc_errno.c -o calc_errno 2>calc_errno_tmp; \
|
||||
if [ -x ./calc_errno ]; then \
|
||||
./calc_errno >> calc_errno.h; \
|
||||
else \
|
||||
${LCC} ${ICFLAGS} -DTRY_ERRNO_OLD_DECL \
|
||||
calc_errno.c -o calc_errno 2>calc_errno_tmp; \
|
||||
if [ -x ./calc_errno ]; then \
|
||||
./calc_errno >> calc_errno.h; \
|
||||
else \
|
||||
echo '/*' >> calc_errno.h; \
|
||||
echo ' * We were unable to to determine' >> calc_errno.h; \
|
||||
echo ' * how to declare errno and friends.' >> calc_errno.h; \
|
||||
echo ' * So we will guess this will work' >> calc_errno.h; \
|
||||
echo ' * and hope for the best.' >> calc_errno.h; \
|
||||
echo ' */' >> calc_errno.h; \
|
||||
echo '' >> calc_errno.h; \
|
||||
echo 'extern int errno; ' \
|
||||
'/* last system error */' >> calc_errno.h; \
|
||||
echo 'extern const char *const sys_errlist[];' \
|
||||
' /* system error messages*/' >> calc_errno.h; \
|
||||
echo 'extern int sys_nerr; ' \
|
||||
'/* number of system errors */' >> calc_errno.h; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi
|
||||
${Q}echo '' >> calc_errno.h
|
||||
${Q}echo '' >> calc_errno.h
|
||||
${Q}echo '#endif /* !__CALC_ERRNO_H__ */' >> calc_errno.h
|
||||
-${Q}rm -f calc_errno calc_errno_tmp
|
||||
${Q}echo 'calc_errno.h formed'
|
||||
-@if [ -z "${Q}" ]; then \
|
||||
echo ''; \
|
||||
echo '=-=-= start of $@ =-=-='; \
|
||||
cat $@; \
|
||||
echo '=-=-= end of $@ =-=-='; \
|
||||
echo ''; \
|
||||
else \
|
||||
true; \
|
||||
fi
|
||||
|
||||
calcerr.h: calcerr.tbl calcerr_h.sed calcerr_h.awk ${MAKE_FILE}
|
||||
-${Q}rm -f calerr.h
|
||||
${Q}echo 'forming calcerr.h'
|
||||
@@ -2755,7 +2630,6 @@ env:
|
||||
@echo "HAVE_GETPRID=${HAVE_GETPRID}"; echo ""
|
||||
@echo "HAVE_URANDOM=${HAVE_URANDOM}"; echo ""
|
||||
@echo "ALIGN32=${ALIGN32}"; echo ""
|
||||
@echo "ERRNO_DECL=${ERRNO_DECL}"; echo ""
|
||||
@echo "BINDIR=${BINDIR}"; echo ""
|
||||
@echo "TOPDIR=${TOPDIR}"; echo ""
|
||||
@echo "LIBDIR=${LIBDIR}"; echo ""
|
||||
@@ -3082,6 +2956,8 @@ install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1
|
||||
-rm -f ${LIBDIR}/stdarg.h stdarg.h
|
||||
-rm -f ${LIBDIR}/prototype.h prototype.h
|
||||
-rm -f ${LIBDIR}/libcalcerr.a libcalcerr.a
|
||||
-rm -f ${LIBDIR}/calc_errno.h calc_errno.h ${INCDIRCALC}/calc_errno.h
|
||||
-rm -f calc_errno.c calc_errno.o calc_errno
|
||||
${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-='
|
||||
|
||||
##
|
||||
@@ -3249,7 +3125,6 @@ calc.o: symbol.h
|
||||
calc.o: token.h
|
||||
calc.o: value.h
|
||||
calc.o: zmath.h
|
||||
calc_errno.o: calc_errno.c
|
||||
calcerr.o: calcerr.c
|
||||
calcerr.o: calcerr.h
|
||||
calcerr.o: have_const.h
|
||||
@@ -3430,7 +3305,6 @@ func.o: alloc.h
|
||||
func.o: block.h
|
||||
func.o: byteswap.h
|
||||
func.o: calc.h
|
||||
func.o: calc_errno.h
|
||||
func.o: calcerr.h
|
||||
func.o: cmath.h
|
||||
func.o: config.h
|
||||
|
Reference in New Issue
Block a user