mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
prep for calc version 2.14.1.4
Updated COPYING file to indicate that these files are now covered under "The Unlicense" (see https://unlicense.org): sha1.c sha1.h cal/dotest.cal cal/screen.cal Updated help/credit to match the above changes to COPYING. Updated CONTRIB-CODE and calc.man to refer to using GitHub pull requests for contributing to calc (instead of using Email). Updated BUGS and calc.man to refer to using GitHub issues for reporting calc bugs (instead of using Email). Updated QUESTIONS and calc.man to refer to using GitHub issues for asking calc questions (instead of using Email). Fixed Makefile.local command example to refer to overriding the Makefile variable DEBUG (instead of CDEBUG). Fixed all make chk ASAN warnings under macOS 13.2.1 when calc is compiled with the following uncommented lines in Makefile.local: DEBUG:= -O0 -g CFLAGS+= -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined LDFLAGS+= -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1 Improved how pointers to functions are declared for the builtins array in func.c to avoid function declarations without a prototype that is now deprecated in C. Improved how pointers to functions are declared for the opcodes array in opcodes.c to avoid function declarations without a prototype Replaced use of egrep with grep -E in Makefiles. Fixed cases where variables were set but not used in symbol.c, calc.c, and the main function in func.c as used by funclist.c. Added rule name to "DO NOT EDIT -- generated by the Makefile" lines in constructed files. Test if <sys/vfs.h> exists and set HAVE_SYS_VFS_H accordingly in have_sys_vfs.h. Added HAVE_SYS_VFS_H to allow one to force this value. Test if <sys/param.h> exists and set HAVE_SYS_PARAM_H accordingly in have_sys_param.h. Added HAVE_SYS_PARAM_H to allow one to force this value. Test if <sys/mount.h> exists and set HAVE_SYS_MOUNT_H accordingly in have_sys_mount.h. Added HAVE_SYS_MOUNT_H to allow one to force this value. Test if the system as the statfs() system call and set HAVE_STATFS accordingly in have_statfs.h. Added HAVE_STATFS to allow one to force this value. The pseudo_seed() function will also try to call statfs() if possible and permitted by the HAVE_STATFS value.
This commit is contained in:
310
Makefile
310
Makefile
@@ -490,6 +490,62 @@ HAVE_MEMMOVE=
|
||||
HAVE_USTAT=
|
||||
#HAVE_USTAT= -DHAVE_NO_USTAT
|
||||
|
||||
# Determine if we have statfs()
|
||||
#
|
||||
# If HAVE_STATFS is empty, this Makefile will run the have_statfs program
|
||||
# to determine if statfs() is supported. If HAVE_STATFS is set to
|
||||
# -DHAVE_NO_STATFS, then calc will use internal functions to simulate
|
||||
# the statfs() function that gets file system statistics.
|
||||
#
|
||||
# Select HAVE_STATFS= -DHAVE_NO_STATFS for DJGPP.
|
||||
#
|
||||
# If in doubt, leave HAVE_STATFS empty and this Makefile will figure it out.
|
||||
#
|
||||
HAVE_STATFS=
|
||||
#HAVE_STATFS= -DHAVE_NO_STATFS
|
||||
|
||||
# Determine if we have the <sys/vfs.h> include file.
|
||||
#
|
||||
# HAVE_SYS_VFS_H= let the Makefile look for the include file
|
||||
# HAVE_SYS_VFS_H= YES assume that the include file exists
|
||||
# HAVE_SYS_VFS_H= NO assume that the include file does not exist
|
||||
#
|
||||
# Select HAVE_SYS_VFS_H= NO for DJGPP.
|
||||
#
|
||||
# When in doubt, leave HAVE_SYS_VFS_H empty.
|
||||
#
|
||||
HAVE_SYS_VFS_H=
|
||||
#HAVE_SYS_VFS_H= YES
|
||||
#HAVE_SYS_VFS_H= NO
|
||||
|
||||
# Determine if we have the <sys/param.h> include file.
|
||||
#
|
||||
# HAVE_SYS_PARAM_H= let the Makefile look for the include file
|
||||
# HAVE_SYS_PARAM_H= YES assume that the include file exists
|
||||
# HAVE_SYS_PARAM_H= NO assume that the include file does not exist
|
||||
#
|
||||
# Select HAVE_SYS_PARAM_H= NO for DJGPP.
|
||||
#
|
||||
# When in doubt, leave HAVE_SYS_PARAM_H empty.
|
||||
#
|
||||
HAVE_SYS_PARAM_H=
|
||||
#HAVE_SYS_PARAM_H= YES
|
||||
#HAVE_SYS_PARAM_H= NO
|
||||
|
||||
# Determine if we have the <sys/mount.h> include file.
|
||||
#
|
||||
# HAVE_SYS_MOUNT_H= let the Makefile look for the include file
|
||||
# HAVE_SYS_MOUNT_H= YES assume that the include file exists
|
||||
# HAVE_SYS_MOUNT_H= NO assume that the include file does not exist
|
||||
#
|
||||
# Select HAVE_SYS_MOUNT_H= NO for DJGPP.
|
||||
#
|
||||
# When in doubt, leave HAVE_SYS_MOUNT_H empty.
|
||||
#
|
||||
HAVE_SYS_MOUNT_H=
|
||||
#HAVE_SYS_MOUNT_H= YES
|
||||
#HAVE_SYS_MOUNT_H= NO
|
||||
|
||||
# Determine if we have getsid()
|
||||
#
|
||||
# If HAVE_GETSID is empty, this Makefile will run the have_getsid program
|
||||
@@ -1332,7 +1388,7 @@ CTAGS= ctags
|
||||
DATE= date
|
||||
DIFF= diff
|
||||
FMT= fmt
|
||||
GREP= egrep
|
||||
GREP= grep
|
||||
HOSTNAME= hostname
|
||||
LANG= C
|
||||
LDCONFIG= ldconfig
|
||||
@@ -2086,7 +2142,8 @@ BUILD_H_SRC= align32.h args.h calcerr.h conf.h endian_calc.h \
|
||||
have_string.h have_strlcat.h have_strlcpy.h have_times.h \
|
||||
have_uid_t.h have_unistd.h have_unused.h have_urandom.h \
|
||||
have_ustat.h longbits.h terminal.h have_environ.h \
|
||||
have_arc4random.h have_limits.h charbit.h
|
||||
have_arc4random.h have_limits.h charbit.h have_sys_vfs.h \
|
||||
have_sys_param.h have_sys_mount.h have_statfs.h
|
||||
|
||||
# we build these .c files during the make
|
||||
#
|
||||
@@ -2102,7 +2159,7 @@ UTIL_C_SRC= align32.c endian.c longbits.c have_newstr.c have_uid_t.c \
|
||||
have_ustat.c have_getsid.c have_getpgid.c have_environ.c \
|
||||
have_gettime.c have_getprid.c have_rusage.c have_strdup.c \
|
||||
have_unused.c have_ban_pragma.c have_strlcpy.c have_strlcat.c \
|
||||
have_arc4random.c charbit.c
|
||||
have_arc4random.c charbit.c have_statfs.c
|
||||
|
||||
# these awk and sed tools are used in the process of building BUILD_H_SRC
|
||||
# and BUILD_C_SRC
|
||||
@@ -2120,7 +2177,7 @@ UTIL_OBJS= endian.o longbits.o have_newstr.o have_uid_t.o \
|
||||
have_ustat.o have_getsid.o have_getpgid.o have_environ.o \
|
||||
have_gettime.o have_getprid.o ver_calc.o have_rusage.o have_strdup.o \
|
||||
have_unused.o have_ban_pragma.o have_strlcpy.o have_strlcat.o \
|
||||
have_arc4random.o charbit.o
|
||||
have_arc4random.o charbit.o have_statfs.o
|
||||
|
||||
# these temp files may be created (and removed) during the build of BUILD_C_SRC
|
||||
#
|
||||
@@ -2139,7 +2196,7 @@ UTIL_PROGS= align32${EXT} fposval${EXT} have_uid_t${EXT} have_const${EXT} \
|
||||
have_unused${EXT} have_fpos${EXT} have_fpos_pos${EXT} \
|
||||
have_offscl${EXT} have_rusage${EXT} have_ban_pragma${EXT} \
|
||||
have_strlcpy${EXT} have_strlcat${EXT} have_arc4random${EXT} \
|
||||
charbit${EXT}
|
||||
charbit${EXT} have_statfs${ENT}
|
||||
|
||||
# these utility files and scripts may be created in the process of building
|
||||
# the BUILD_H_SRC file set
|
||||
@@ -2660,7 +2717,7 @@ calc.usage: calc.1 ${MAKE_FILE} ${LOC_MKF}
|
||||
LESSCHARSET=iso8859 ${CALCPAGER} calc.1; \
|
||||
else \
|
||||
${NROFF} -man calc.1; \
|
||||
fi 2>&1 | ${GREP} -v 'cannot adjust line' | ${COL} -b > $@
|
||||
fi 2>&1 | ${GREP} -E -v 'cannot adjust line' | ${COL} -b > $@
|
||||
${Q} echo calc.usage formed
|
||||
|
||||
|
||||
@@ -2723,7 +2780,7 @@ conf.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -2808,7 +2865,7 @@ endian_calc.h: endian.c have_stdlib.h have_unistd.h \
|
||||
${Q} ${RM} -f endian.o endian${EXT} $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -2860,7 +2917,7 @@ charbit.h: charbit.c have_limits.h \
|
||||
${Q} ${RM} -f charbit.o charbit${EXT} $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -2896,7 +2953,7 @@ longbits.h: longbits.c charbit.h have_unistd.h have_stdlib.h \
|
||||
${Q} ${RM} -f longbits.o longbits${EXT} $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -2926,7 +2983,7 @@ have_times.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -2992,7 +3049,7 @@ have_stdlib.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3028,7 +3085,7 @@ have_unistd.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3064,7 +3121,7 @@ have_limits.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3100,7 +3157,7 @@ have_string.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3136,7 +3193,7 @@ terminal.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3190,7 +3247,7 @@ have_fgetsetpos.h: have_fgetsetpos.c banned.h have_ban_pragma.h ${MAKE_FILE} ${L
|
||||
${Q} ${RM} -f fpos_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3233,7 +3290,7 @@ have_fpos_pos.h: have_fpos_pos.c have_fgetsetpos.h have_posscl.h have_string.h \
|
||||
${Q} ${RM} -f fpos_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3279,7 +3336,7 @@ fposval.h: fposval.c have_fgetsetpos.h have_fpos_pos.h have_offscl.h have_posscl
|
||||
${Q} ${RM} -f fposval_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3321,7 +3378,7 @@ have_const.h: have_const.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f have_const const_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3364,7 +3421,7 @@ have_offscl.h: have_offscl.c have_unistd.h \
|
||||
${Q} ${RM} -f offscl_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3405,7 +3462,7 @@ have_posscl.h: have_posscl.c have_fgetsetpos.h have_unistd.h \
|
||||
${Q} ${RM} -f have_posscl have_posscl.o posscl_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3446,7 +3503,7 @@ align32.h: align32.c longbits.h have_unistd.h \
|
||||
${Q} ${RM} -f align32 align32_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3501,7 +3558,7 @@ have_uid_t.h: have_uid_t.c have_unistd.h \
|
||||
${Q} ${RM} -f have_uid_t uid_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3542,7 +3599,7 @@ have_environ.h: have_environ.c \
|
||||
${Q} ${RM} -f have_environ environ_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3583,7 +3640,7 @@ have_arc4random.h: have_arc4random.c have_stdlib.h \
|
||||
${Q} ${RM} -f have_arc4random arc4random_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3624,7 +3681,7 @@ have_newstr.h: have_newstr.c banned.h have_ban_pragma.h have_string.h ${MAKE_FIL
|
||||
${Q} ${RM} -f newstr_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3664,7 +3721,7 @@ have_memmv.h: have_memmv.c banned.h have_ban_pragma.h have_string.h ${MAKE_FILE}
|
||||
${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3704,7 +3761,7 @@ have_ustat.h: have_ustat.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f ustat_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3739,12 +3796,161 @@ have_ustat.h: have_ustat.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
|
||||
${TRUE}; \
|
||||
fi
|
||||
|
||||
have_statfs.h: have_statfs.c banned.h have_ban_pragma.h have_sys_vfs.h have_sys_param.h \
|
||||
have_sys_mount.h ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f statfs_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '#if !defined(CALC_HAVE_STATFS_H)' >> $@
|
||||
${Q} echo '#define CALC_HAVE_STATFS_H' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '/* do we have or want statfs()? */' >> $@
|
||||
${Q} ${RM} -f have_statfs.o have_statfs${EXT}
|
||||
-${Q} ${LCC} ${ICFLAGS} ${HAVE_STATFS} have_statfs.c -c ${S} \
|
||||
|| ${TRUE}
|
||||
-${Q} ${LCC} ${ILDFLAGS} have_statfs.o -o have_statfs ${S} \
|
||||
|| ${TRUE}
|
||||
-${Q} ./have_statfs${EXT} > statfs_tmp ${E} \
|
||||
|| ${TRUE}
|
||||
-${Q} if [ -s statfs_tmp ]; then \
|
||||
${CAT} statfs_tmp >> $@; \
|
||||
else \
|
||||
echo '#undef HAVE_STATFS /* no */' >> $@; \
|
||||
fi
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '#endif /* !CALC_HAVE_STATFS_H */' >> $@
|
||||
${Q} ${RM} -f have_statfs${EXT} have_statfs.o statfs_tmp
|
||||
${H} echo '$@ formed'
|
||||
-@if [ -z "${Q}" ]; then \
|
||||
echo ''; \
|
||||
echo '=-=-= start of $@ =-=-='; \
|
||||
${CAT} $@; \
|
||||
echo '=-=-= end of $@ =-=-='; \
|
||||
echo ''; \
|
||||
else \
|
||||
${TRUE}; \
|
||||
fi
|
||||
|
||||
have_sys_vfs.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '#if !defined(CALC_HAVE_SYS_VFS_H)' >> $@
|
||||
${Q} echo '#define CALC_HAVE_SYS_VFS_H' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '/* do we have <sys/vfs.h>? */' >> $@
|
||||
-${Q} if [ X"${HAVE_SYS_VFS_H}" = X"YES" ]; then \
|
||||
echo '#define HAVE_SYS_VFS_H /* yes */' >> $@; \
|
||||
elif [ X"${HAVE_SYS_VFS_H}" = X"NO" ]; then \
|
||||
echo '#undef HAVE_SYS_VFS_H /* no */' >> $@; \
|
||||
elif echo '#include <sys/vfs.h>' | ${CC} -E - ${S}; then \
|
||||
echo '#define HAVE_SYS_VFS_H /* yes */' >> $@; \
|
||||
else \
|
||||
echo '#undef HAVE_SYS_VFS_H /* no */' >> $@; \
|
||||
fi
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '#endif /* !CALC_HAVE_SYS_VFS_H */' >> $@
|
||||
${H} echo '$@ formed'
|
||||
-@if [ -z "${Q}" ]; then \
|
||||
echo ''; \
|
||||
echo '=-=-= start of $@ =-=-='; \
|
||||
${CAT} $@; \
|
||||
echo '=-=-= end of $@ =-=-='; \
|
||||
echo ''; \
|
||||
else \
|
||||
${TRUE}; \
|
||||
fi
|
||||
|
||||
have_sys_param.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '#if !defined(CALC_HAVE_SYS_PARAM_H)' >> $@
|
||||
${Q} echo '#define CALC_HAVE_SYS_PARAM_H' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '/* do we have <sys/param.h>? */' >> $@
|
||||
-${Q} if [ X"${HAVE_SYS_PARAM_H}" = X"YES" ]; then \
|
||||
echo '#define HAVE_SYS_PARAM_H /* yes */' >> $@; \
|
||||
elif [ X"${HAVE_SYS_PARAM_H}" = X"NO" ]; then \
|
||||
echo '#undef HAVE_SYS_PARAM_H /* no */' >> $@; \
|
||||
elif echo '#include <sys/param.h>' | ${CC} -E - ${S}; then \
|
||||
echo '#define HAVE_SYS_PARAM_H /* yes */' >> $@; \
|
||||
else \
|
||||
echo '#undef HAVE_SYS_PARAM_H /* no */' >> $@; \
|
||||
fi
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '#endif /* !CALC_HAVE_SYS_PARAM_H */' >> $@
|
||||
${H} echo '$@ formed'
|
||||
-@if [ -z "${Q}" ]; then \
|
||||
echo ''; \
|
||||
echo '=-=-= start of $@ =-=-='; \
|
||||
${CAT} $@; \
|
||||
echo '=-=-= end of $@ =-=-='; \
|
||||
echo ''; \
|
||||
else \
|
||||
${TRUE}; \
|
||||
fi
|
||||
|
||||
have_sys_mount.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '#if !defined(CALC_HAVE_SYS_MOUNT_H)' >> $@
|
||||
${Q} echo '#define CALC_HAVE_SYS_MOUNT_H' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '/* do we have <sys/param.h>? */' >> $@
|
||||
-${Q} if [ X"${HAVE_SYS_MOUNT_H}" = X"YES" ]; then \
|
||||
echo '#define HAVE_SYS_MOUNT_H /* yes */' >> $@; \
|
||||
elif [ X"${HAVE_SYS_MOUNT_H}" = X"NO" ]; then \
|
||||
echo '#undef HAVE_SYS_MOUNT_H /* no */' >> $@; \
|
||||
elif echo '#include <sys/param.h>' | ${CC} -E - ${S}; then \
|
||||
echo '#define HAVE_SYS_MOUNT_H /* yes */' >> $@; \
|
||||
else \
|
||||
echo '#undef HAVE_SYS_MOUNT_H /* no */' >> $@; \
|
||||
fi
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '#endif /* !CALC_HAVE_SYS_MOUNT_H */' >> $@
|
||||
${H} echo '$@ formed'
|
||||
-@if [ -z "${Q}" ]; then \
|
||||
echo ''; \
|
||||
echo '=-=-= start of $@ =-=-='; \
|
||||
${CAT} $@; \
|
||||
echo '=-=-= end of $@ =-=-='; \
|
||||
echo ''; \
|
||||
else \
|
||||
${TRUE}; \
|
||||
fi
|
||||
|
||||
have_getsid.h: have_getsid.c have_unistd.h \
|
||||
banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f getsid_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3785,7 +3991,7 @@ have_getpgid.h: have_getpgid.c have_unistd.h \
|
||||
${Q} ${RM} -f getpgid_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3826,7 +4032,7 @@ have_gettime.h: have_gettime.c banned.h have_ban_pragma.h \
|
||||
${Q} ${RM} -f gettime_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3867,7 +4073,7 @@ have_getprid.h: have_getprid.c have_unistd.h \
|
||||
${Q} ${RM} -f getprid_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3907,7 +4113,7 @@ have_urandom.h: ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3943,7 +4149,7 @@ have_rusage.h: have_rusage.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f rusage_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -3983,7 +4189,7 @@ have_strdup.h: have_strdup.c banned.h have_ban_pragma.h have_string.h ${MAKE_FIL
|
||||
${Q} ${RM} -f strdup_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -4024,7 +4230,7 @@ args.h: have_stdvs.c have_varvs.c have_string.h have_unistd.h \
|
||||
${Q} ${RM} -f $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -4137,7 +4343,7 @@ have_unused.h: have_unused.c have_stdlib.h have_ban_pragma.h \
|
||||
${Q} ${RM} -f unused_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -4179,7 +4385,7 @@ have_ban_pragma.h: have_ban_pragma.c banned.h ${MAKE_FILE} ${LOC_MKF}
|
||||
${Q} ${RM} -f unused_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -4222,7 +4428,7 @@ have_strlcpy.h: have_strlcpy.c banned.h have_ban_pragma.h have_string.h \
|
||||
${Q} ${RM} -f unused_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -4264,7 +4470,7 @@ have_strlcat.h: have_strlcat.c banned.h have_ban_pragma.h have_string.h \
|
||||
${Q} ${RM} -f unused_tmp $@
|
||||
${H} echo 'forming $@'
|
||||
${Q} echo '/*' > $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
|
||||
${Q} echo ' * DO NOT EDIT -- generated by the Makefile rule $@' >> $@
|
||||
${Q} echo ' */' >> $@
|
||||
${Q} echo '' >> $@
|
||||
${Q} echo '' >> $@
|
||||
@@ -4480,7 +4686,7 @@ depend: hsrc custom/Makefile
|
||||
${Q} ${MKDIR} -p skel
|
||||
-${Q} for i in ${C_SRC} ${BUILD_C_SRC}; do \
|
||||
${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" | \
|
||||
${GREP} -v '\.\./getopt/getopt\.h' > "skel/$$i"; \
|
||||
${GREP} -E -v '\.\./getopt/getopt\.h' > "skel/$$i"; \
|
||||
done
|
||||
${Q} ${MKDIR} -p skel/custom
|
||||
-${Q} for i in ${H_SRC} ${BUILD_H_SRC} custom.h /dev/null; do \
|
||||
@@ -4524,7 +4730,7 @@ depend: hsrc custom/Makefile
|
||||
${Q} ${MV} ${MAKE_FILE} ${MAKE_FILE}.bak
|
||||
${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' \
|
||||
${MAKE_FILE}.bak > ${MAKE_FILE}
|
||||
${Q} ${GREP} -v '^#' skel/makedep.out >> ${MAKE_FILE}
|
||||
${Q} ${GREP} -E -v '^#' skel/makedep.out >> ${MAKE_FILE}
|
||||
${Q} echo removing top level skel
|
||||
${Q} ${RM} -rf skel
|
||||
-${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \
|
||||
@@ -4848,13 +5054,17 @@ env:
|
||||
@echo 'HAVE_OFFSCL=${HAVE_OFFSCL}'; echo ''
|
||||
@echo 'HAVE_POSSCL=${HAVE_POSSCL}'; echo ''
|
||||
@echo 'HAVE_PRAGMA_GCC_POSION=${HAVE_PRAGMA_GCC_POSION}'; echo ''
|
||||
@echo 'HAVE_STATFS=${HAVE_STATFS}'; echo ''
|
||||
@echo 'HAVE_STDLIB_H=${HAVE_STDLIB_H}'; echo ''
|
||||
@echo 'HAVE_STRDUP=${HAVE_STRDUP}'; echo ''
|
||||
@echo 'HAVE_STRING_H=${HAVE_STRING_H}'; echo ''
|
||||
@echo 'HAVE_STRLCAT=${HAVE_STRLCAT}'; echo ''
|
||||
@echo 'HAVE_STRLCPY=${HAVE_STRLCPY}'; echo ''
|
||||
@echo 'HAVE_SYS_MOUNT_H=${HAVE_SYS_MOUNT_H}'; echo ''
|
||||
@echo 'HAVE_SYS_PARAM_H=${HAVE_SYS_PARAM_H}'; echo ''
|
||||
@echo 'HAVE_SYS_TIMES_H=${HAVE_SYS_TIMES_H}'; echo ''
|
||||
@echo 'HAVE_SYS_TIME_H=${HAVE_SYS_TIME_H}'; echo ''
|
||||
@echo 'HAVE_SYS_VFS_H=${HAVE_SYS_VFS_H}'; echo ''
|
||||
@echo 'HAVE_TIMES_H=${HAVE_TIMES_H}'; echo ''
|
||||
@echo 'HAVE_TIME_H=${HAVE_TIME_H}'; echo ''
|
||||
@echo 'HAVE_UID_T=${HAVE_UID_T}'; echo ''
|
||||
@@ -4894,18 +5104,18 @@ env:
|
||||
@echo 'MANEXT=${MANEXT}'; echo ''
|
||||
@echo 'MANMAKE=${MANMAKE}'; echo ''
|
||||
@echo 'MANMODE=${MANMODE}'; echo ''
|
||||
@echo 'MKDIR=${MKDIR}'; echo ''
|
||||
@echo 'MINGW=${MINGW}'; echo ''
|
||||
@echo 'MKDIR=${MKDIR}'; echo ''
|
||||
@echo 'MV=${MV}'; echo ''
|
||||
@echo 'NROFF=${NROFF}'; echo ''
|
||||
@echo 'NROFF_ARG=${NROFF_ARG}'; echo ''
|
||||
@echo 'OBJS=${OBJS}'; echo ''
|
||||
@echo 'OFF_T_BITS=${OFF_T_BITS}'; echo ''
|
||||
@echo 'PREFIX=${PREFIX}'; echo ''
|
||||
@echo 'PURIFY=${PURIFY}'; echo ''
|
||||
@echo 'PWD=${PWD}'; echo ''
|
||||
@echo 'PWDCMD=${PWDCMD}'; echo ''
|
||||
@echo 'Q=${Q}'; echo ''
|
||||
@echo 'PREFIX=${PREFIX}'; echo ''
|
||||
@echo 'RANLIB=${RANLIB}'; echo ''
|
||||
@echo 'READLINE_EXTRAS=${READLINE_EXTRAS}'; echo ''
|
||||
@echo 'READLINE_INCLUDE=${READLINE_INCLUDE}'; echo ''
|
||||
@@ -5096,16 +5306,16 @@ inst_files: ${MAKE_FILE} ${LOC_MKF} help/Makefile cal/Makefile \
|
||||
${Q} echo ${BINDIR}/calc${EXT} > inst_files
|
||||
${Q} cd help; LANG=C \
|
||||
${MAKE} -f Makefile ${HELP_PASSDOWN} echo_inst_files | \
|
||||
${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||
${GREP} -E '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||
${Q} cd cal; LANG=C \
|
||||
${MAKE} -f Makefile ${CAL_PASSDOWN} echo_inst_files | \
|
||||
${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||
${GREP} -E '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||
${Q} cd custom; LANG=C \
|
||||
${MAKE} -f Makefile ${CUSTOM_PASSDOWN} echo_inst_files | \
|
||||
${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||
${GREP} -E '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||
${Q} cd cscript; LANG=C \
|
||||
${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} echo_inst_files | \
|
||||
${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||
${GREP} -E '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||
${Q} echo ${LIBDIR}/libcalc.a >> inst_files
|
||||
${Q} for i in ${LIB_H_SRC} ${BUILD_H_SRC} /dev/null; do \
|
||||
if [ X"$$i" != X"/dev/null" ]; then \
|
||||
@@ -5157,7 +5367,7 @@ olduninstall:
|
||||
|
||||
tags: ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} ${MAKE_FILE}
|
||||
-${CTAGS} ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} 2>&1 | \
|
||||
${GREP} -v 'Duplicate entry|Second entry ignored'
|
||||
${GREP} -E -v 'Duplicate entry|Second entry ignored'
|
||||
|
||||
clean:
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
|
Reference in New Issue
Block a user