Compare commits

...

4 Commits

Author SHA1 Message Date
Landon Curt Noll
4e92927183 Release calc version 2.12.1.5 2017-05-21 15:38:48 -07:00
Landon Curt Noll
fb4a03c1f1 Release calc version 2.12.1.4 2017-05-21 15:38:48 -07:00
Landon Curt Noll
81a523043e Release calc version 2.12.1.3 2017-05-21 15:38:48 -07:00
Landon Curt Noll
2c0d0bbc1b Release calc version 2.12.1.2 2017-05-21 15:38:48 -07:00
14 changed files with 1357 additions and 1202 deletions

21
CHANGES
View File

@@ -4,7 +4,22 @@ The following are the changes from calc version 2.12.1 to date:
Made minor formatting changes as well. Made minor formatting changes as well.
Changed use of ${Q} in the Makefile to avoid an make "feature" Changed use of ${Q} in the Makefile to avoid an make "feature"
related to OpenBSD. related to OpenBSD. Added ${RM} make variable for make tools that
do not have builtin defined terms.
Removed the ECHO_PROG Makefile variable. Also removed it from
the sysinfo() custom function.
Improved the support for cross-compiled environmens by using
make symbols for all non-shell commands executed by Makefiles.
Fixed a problem with the make chk awk script which failed under
OS X 10.4.7.
Fixed a few minor variables that were not set to default values in
lower level Makefiles.
Fixed a reference to a non-existent make variable in HOWTO.INSTALL.
The following are the changes from calc version 2.12.0 to 2.12.0.8: The following are the changes from calc version 2.12.0 to 2.12.0.8:
@@ -6201,8 +6216,8 @@ Following is a list of visible changes to calc from version 1.24.7 to 1.26.1:
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.87 $ ## @(#) $Revision: 29.90 $
## @(#) $Id: CHANGES,v 29.87 2006/09/17 23:50:45 chongo Exp $ ## @(#) $Id: CHANGES,v 29.90 2006/09/18 13:14:03 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/RCS/CHANGES,v $ ## @(#) $Source: /usr/local/src/cmd/calc/RCS/CHANGES,v $
## ##
## Under source code control: 1993/06/02 18:12:57 ## Under source code control: 1993/06/02 18:12:57

View File

@@ -52,14 +52,14 @@ Installing calc from the gziped tarball in 4 easy steps:
CALC_INCDIR where the calc include files are installed CALC_INCDIR where the calc include files are installed
CUSTOMCALDIR where custom *.cal files are installed CUSTOMCALDIR where custom *.cal files are installed
CUSTOMHELPDIR where custom help files are installed CUSTOMHELPDIR where custom help files are installed
CUSTOMINCPDIR where custom .h files are installed CUSTOMINCDIR where custom .h files are installed
SCRIPTDIR where calc shell scripts are installed SCRIPTDIR where calc shell scripts are installed
If you want to install calc files under a top level directory, If you want to install calc files under a top level directory,
then set the T value: then set the T value:
The calc install is performed under $T, the calc build is The calc install is performed under ${T}, the calc build is
performed under /. The purpose for $T is to allow someone performed under /. The purpose for ${T} is to allow someone
to install calc somewhere other than into the system area. to install calc somewhere other than into the system area.
For example, if: For example, if:
@@ -79,10 +79,10 @@ Installing calc from the gziped tarball in 4 easy steps:
calc help, .cal ...: /var/tmp/testing/usr/share/calc calc help, .cal ...: /var/tmp/testing/usr/share/calc
... etc ... /var/tmp/testing/... ... etc ... /var/tmp/testing/...
If $T is empty, calc is installed under /, which is the same If ${T} is empty, calc is installed under /, which is the same
top of tree for which it was built. If $T is non-empty, then top of tree for which it was built. If ${T} is non-empty, then
calc is installed under $T, as if one had to chroot under calc is installed under ${T}, as if one had to chroot under
$T for calc to operate. ${T} for calc to operate.
Look for the section that starts: Look for the section that starts:
@@ -162,8 +162,8 @@ the calc help subsystem. See the README file for details.
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.7 $ ## @(#) $Revision: 29.9 $
## @(#) $Id: HOWTO.INSTALL,v 29.7 2003/04/15 03:38:34 chongo Exp $ ## @(#) $Id: HOWTO.INSTALL,v 29.9 2006/09/18 13:11:57 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/RCS/HOWTO.INSTALL,v $ ## @(#) $Source: /usr/local/src/cmd/calc/RCS/HOWTO.INSTALL,v $
## ##
## Under source code control: 1999/09/27 20:48:44 ## Under source code control: 1999/09/27 20:48:44

1105
Makefile

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
# #
# cal - makefile for calc standard resource files # cal - makefile for calc standard resource files
# #
# Copyright (C) 1999 Landon Curt Noll # Copyright (C) 1999-2006 Landon Curt Noll
# #
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
@@ -18,8 +18,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc. # received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# #
# @(#) $Revision: 29.21 $ # @(#) $Revision: 29.24 $
# @(#) $Id: Makefile,v 29.21 2006/06/26 05:46:06 chongo Exp $ # @(#) $Id: Makefile,v 29.24 2006/09/18 13:13:25 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/Makefile,v $ # @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/Makefile,v $
# #
# Under source code control: 1991/07/21 05:00:54 # Under source code control: 1991/07/21 05:00:54
@@ -33,8 +33,8 @@
# required vars # required vars
# #
SHELL = /bin/sh SHELL= /bin/sh
MAKE_FILE = Makefile MAKE_FILE= Makefile
#### ####
# Normally, the upper level makefile will set these values. We provide # Normally, the upper level makefile will set these values. We provide
@@ -62,9 +62,9 @@ INCDIR= /usr/include
# ${LIBDIR} where calc link library (*.a) files are installed # ${LIBDIR} where calc link library (*.a) files are installed
# ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files # ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files
# #
# NOTE: The install rule prepends installation paths with $T, which # NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If $T is non-empty, then installation # by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the $T directory. # locations will be relative to the ${T} directory.
# #
# For DJGPP, select: # For DJGPP, select:
# #
@@ -96,12 +96,12 @@ CALC_SHAREDIR= /usr/share/calc
# ${CALC_INCDIR} where the calc include files are installed # ${CALC_INCDIR} where the calc include files are installed
# ${CUSTOMCALDIR} where custom *.cal files are installed # ${CUSTOMCALDIR} where custom *.cal files are installed
# ${CUSTOMHELPDIR} where custom help files are installed # ${CUSTOMHELPDIR} where custom help files are installed
# ${CUSTOMINCPDIR} where custom .h files are installed # ${CUSTOMINCDIR} where custom .h files are installed
# ${SCRIPTDIR} where calc shell scripts are installed # ${SCRIPTDIR} where calc shell scripts are installed
# #
# NOTE: The install rule prepends installation paths with $T, which # NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If $T is non-empty, then installation # by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the $T directory. # locations will be relative to the ${T} directory.
# #
# If in doubt, set: # If in doubt, set:
# #
@@ -121,8 +121,8 @@ SCRIPTDIR= ${BINDIR}/cscript
# T - top level directory under which calc will be installed # T - top level directory under which calc will be installed
# #
# The calc install is performed under $T, the calc build is # The calc install is performed under ${T}, the calc build is
# performed under /. The purpose for $T is to allow someone # performed under /. The purpose for ${T} is to allow someone
# to install calc somewhere other than into the system area. # to install calc somewhere other than into the system area.
# #
# For example, if: # For example, if:
@@ -142,10 +142,10 @@ SCRIPTDIR= ${BINDIR}/cscript
# calc help, .cal ...: /var/tmp/testing/usr/share/calc # calc help, .cal ...: /var/tmp/testing/usr/share/calc
# ... etc ... /var/tmp/testing/... # ... etc ... /var/tmp/testing/...
# #
# If $T is empty, calc is installed under /, which is the same # If ${T} is empty, calc is installed under /, which is the same
# top of tree for which it was built. If $T is non-empty, then # top of tree for which it was built. If ${T} is non-empty, then
# calc is installed under $T, as if one had to chroot under # calc is installed under ${T}, as if one had to chroot under
# $T for calc to operate. # ${T} for calc to operate.
# #
# If in doubt, use T= # If in doubt, use T=
# #
@@ -163,6 +163,14 @@ Q=@
# #
CHMOD= chmod CHMOD= chmod
CMP= cmp CMP= cmp
RM= rm
MKDIR= mkdir
RMDIR= rmdir
CP= cp
MV= mv
CO= co
TRUE= true
TOUCH= touch
# The calc files to install # The calc files to install
# #
@@ -192,8 +200,8 @@ all: ${CALC_FILES} ${MAKE_FILE} .all
# used by the upper level Makefile to determine of we have done all # used by the upper level Makefile to determine of we have done all
# #
.all: .all:
rm -f .all ${RM} -f .all
touch .all ${TOUCH} .all
## ##
# #
@@ -209,17 +217,17 @@ all: ${CALC_FILES} ${MAKE_FILE} .all
## ##
distlist: ${DISTLIST} distlist: ${DISTLIST}
${Q}for i in ${DISTLIST} /dev/null; do \ ${Q} for i in ${DISTLIST} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo cal/$$i; \ echo cal/$$i; \
fi; \ fi; \
done done
distdir: distdir:
${Q}echo cal ${Q} echo cal
calcliblist: calcliblist:
${Q}for i in ${CALCLIBLIST} /dev/null; do \ ${Q} for i in ${CALCLIBLIST} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo cal/$$i; \ echo cal/$$i; \
fi; \ fi; \
@@ -232,7 +240,7 @@ calcliblist:
## ##
echo_inst_files: echo_inst_files:
${Q}for i in ${CALC_FILES} /dev/null; do \ ${Q} for i in ${CALC_FILES} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo __file__ ${CALC_SHAREDIR}/$$i; \ echo __file__ ${CALC_SHAREDIR}/$$i; \
fi; \ fi; \
@@ -247,37 +255,37 @@ echo_inst_files:
clean: clean:
clobber: clobber:
rm -f .all ${RM} -f .all
# install everything # install everything
# #
# NOTE: Keep the uninstall rule in reverse order to the install rule # NOTE: Keep the uninstall rule in reverse order to the install rule
# #
install: all install: all
-${Q}if [ ! -d $T${CALC_SHAREDIR} ]; then \ -${Q} if [ ! -d ${T}${CALC_SHAREDIR} ]; then \
echo mkdir $T${CALC_SHAREDIR}; \ echo ${MKDIR} ${T}${CALC_SHAREDIR}; \
mkdir $T${CALC_SHAREDIR}; \ ${MKDIR} ${T}${CALC_SHAREDIR}; \
if [ ! -d "$T${CALC_SHAREDIR}" ]; then \ if [ ! -d "${T}${CALC_SHAREDIR}" ]; then \
echo mkdir -p "$T${CALC_SHAREDIR}"; \ echo ${MKDIR} -p "${T}${CALC_SHAREDIR}"; \
mkdir -p "$T${CALC_SHAREDIR}"; \ ${MKDIR} -p "${T}${CALC_SHAREDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${CALC_SHAREDIR}; \ echo ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \
${CHMOD} 0755 $T${CALC_SHAREDIR}; \ ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
${Q}for i in ${CALC_FILES} /dev/null; do \ ${Q} for i in ${CALC_FILES} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if ${CMP} -s $$i $T${CALC_SHAREDIR}/$$i; then \ if ${CMP} -s $$i ${T}${CALC_SHAREDIR}/$$i; then \
true; \ ${TRUE}; \
else \ else \
rm -f $T${CALC_SHAREDIR}/$$i.new; \ ${RM} -f ${T}${CALC_SHAREDIR}/$$i.new; \
cp -f $$i $T${CALC_SHAREDIR}/$$i.new; \ ${CP} -f $$i ${T}${CALC_SHAREDIR}/$$i.new; \
${CHMOD} 0444 $T${CALC_SHAREDIR}/$$i.new; \ ${CHMOD} 0444 ${T}${CALC_SHAREDIR}/$$i.new; \
mv -f $T${CALC_SHAREDIR}/$$i.new $T${CALC_SHAREDIR}/$$i; \ ${MV} -f ${T}${CALC_SHAREDIR}/$$i.new ${T}${CALC_SHAREDIR}/$$i; \
echo "installed $T${CALC_SHAREDIR}/$$i"; \ echo "installed ${T}${CALC_SHAREDIR}/$$i"; \
fi; \ fi; \
done done
@@ -286,22 +294,22 @@ install: all
# NOTE: Keep the uninstall rule in reverse order to the install rule # NOTE: Keep the uninstall rule in reverse order to the install rule
# #
uninstall: uninstall:
-${Q}for i in ${CALC_FILES} /dev/null; do \ -${Q} for i in ${CALC_FILES} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if [ -f "$T${CALC_SHAREDIR}/$$i" ]; then \ if [ -f "${T}${CALC_SHAREDIR}/$$i" ]; then \
rm -f "$T${CALC_SHAREDIR}/$$i"; \ ${RM} -f "${T}${CALC_SHAREDIR}/$$i"; \
if [ -f "$T${CALC_SHAREDIR}/$$i" ]; then \ if [ -f "${T}${CALC_SHAREDIR}/$$i" ]; then \
echo "cannot uninstall $T${CALC_SHAREDIR}/$$i"; \ echo "cannot uninstall ${T}${CALC_SHAREDIR}/$$i"; \
else \ else \
echo "uninstalled $T${CALC_SHAREDIR}/$$i"; \ echo "uninstalled ${T}${CALC_SHAREDIR}/$$i"; \
fi; \ fi; \
fi; \ fi; \
done done
-${Q}for i in ${CALC_SHAREDIR}; do \ -${Q} for i in ${CALC_SHAREDIR}; do \
if [ -d "$T$$i" ]; then \ if [ -d "${T}$$i" ]; then \
rmdir "$T$$i" 2>/dev/null; \ ${RMDIR} "${T}$$i" 2>/dev/null; \
echo "cleaned up $T$$i"; \ echo "cleaned up ${T}$$i"; \
fi; \ fi; \
done done

View File

@@ -18,8 +18,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc. # received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# #
# @(#) $Revision: 29.4 $ # @(#) $Revision: 29.5 $
# @(#) $Id: check.awk,v 29.4 2006/08/20 16:16:31 chongo Exp $ # @(#) $Id: check.awk,v 29.5 2006/09/18 08:01:13 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/RCS/check.awk,v $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/check.awk,v $
# #
# Under source code control: 1996/05/25 22:07:58 # Under source code control: 1996/05/25 22:07:58
@@ -64,7 +64,7 @@ NF == 0 {
end_seen = 1; end_seen = 1;
} }
$1 ~ /^[0-9]+:/ || $1 ~ /^[0-9]+-[0-9]*:/ || $1 ~ /^"))$/ { $1 ~ /^[0-9]+:/ || $1 ~ /^[0-9]+-[0-9]*:/ || $1 ~ /^"\)\)$/ {
if (error > 0) { if (error > 0) {
if (havebuf2) { if (havebuf2) {
print buf2; print buf2;

View File

@@ -1,7 +1,7 @@
# #
# cscript - makefile for calc shell script files # cscript - makefile for calc shell script files
# #
# Copyright (C) 1999 Landon Curt Noll # Copyright (C) 1999-2006 Landon Curt Noll
# #
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
@@ -17,8 +17,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc. # received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# #
# @(#) $Revision: 29.24 $ # @(#) $Revision: 29.28 $
# @(#) $Id: Makefile,v 29.24 2006/06/26 05:46:06 chongo Exp $ # @(#) $Id: Makefile,v 29.28 2006/09/18 13:13:25 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/Makefile,v $ # @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/Makefile,v $
# #
# Under source code control: 1999/11/29 11:10:26 # Under source code control: 1999/11/29 11:10:26
@@ -34,7 +34,7 @@
# required vars # required vars
# #
SHELL= /bin/sh SHELL= /bin/sh
MAKE_FILE = Makefile MAKE_FILE= Makefile
#### ####
# Normally, the upper level makefile will set these values. We provide # Normally, the upper level makefile will set these values. We provide
@@ -62,9 +62,9 @@ INCDIR= /usr/include
# ${LIBDIR} where calc link library (*.a) files are installed # ${LIBDIR} where calc link library (*.a) files are installed
# ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files # ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files
# #
# NOTE: The install rule prepends installation paths with $T, which # NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If $T is non-empty, then installation # by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the $T directory. # locations will be relative to the ${T} directory.
# #
# For DJGPP, select: # For DJGPP, select:
# #
@@ -96,12 +96,12 @@ CALC_SHAREDIR= /usr/share/calc
# ${CALC_INCDIR} where the calc include files are installed # ${CALC_INCDIR} where the calc include files are installed
# ${CUSTOMCALDIR} where custom *.cal files are installed # ${CUSTOMCALDIR} where custom *.cal files are installed
# ${CUSTOMHELPDIR} where custom help files are installed # ${CUSTOMHELPDIR} where custom help files are installed
# ${CUSTOMINCPDIR} where custom .h files are installed # ${CUSTOMINCDIR} where custom .h files are installed
# ${SCRIPTDIR} where calc shell scripts are installed # ${SCRIPTDIR} where calc shell scripts are installed
# #
# NOTE: The install rule prepends installation paths with $T, which # NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If $T is non-empty, then installation # by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the $T directory. # locations will be relative to the ${T} directory.
# #
# If in doubt, set: # If in doubt, set:
# #
@@ -121,8 +121,8 @@ SCRIPTDIR= ${BINDIR}/cscript
# T - top level directory under which calc will be installed # T - top level directory under which calc will be installed
# #
# The calc install is performed under $T, the calc build is # The calc install is performed under ${T}, the calc build is
# performed under /. The purpose for $T is to allow someone # performed under /. The purpose for ${T} is to allow someone
# to install calc somewhere other than into the system area. # to install calc somewhere other than into the system area.
# #
# For example, if: # For example, if:
@@ -142,10 +142,10 @@ SCRIPTDIR= ${BINDIR}/cscript
# calc help, .cal ...: /var/tmp/testing/usr/share/calc # calc help, .cal ...: /var/tmp/testing/usr/share/calc
# ... etc ... /var/tmp/testing/... # ... etc ... /var/tmp/testing/...
# #
# If $T is empty, calc is installed under /, which is the same # If ${T} is empty, calc is installed under /, which is the same
# top of tree for which it was built. If $T is non-empty, then # top of tree for which it was built. If ${T} is non-empty, then
# calc is installed under $T, as if one had to chroot under # calc is installed under ${T}, as if one had to chroot under
# $T for calc to operate. # ${T} for calc to operate.
# #
# If in doubt, use T= # If in doubt, use T=
# #
@@ -166,6 +166,14 @@ SED= sed
SORT= sort SORT= sort
FMT= fmt FMT= fmt
CMP= cmp CMP= cmp
MKDIR= mkdir
RMDIR= rmdir
RM= rm
TOUCH= touch
MV= mv
CP= cp
CO= co
TRUE= true
# 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.
@@ -199,7 +207,7 @@ CALCLIBLIST=
# complete list of targets # complete list of targets
# #
# NOTE: This list MUST be co-ordinated with the ${CSCRIPT_TARGETS} variable # NOTE: This list MUST be coordinated with the ${CSCRIPT_TARGETS} variable
# in the upper level ../Makefile # in the upper level ../Makefile
# #
CSCRIPT_TARGETS= ${SCRIPT} CSCRIPT_TARGETS= ${SCRIPT}
@@ -215,8 +223,8 @@ all: ${TARGETS} .all
# a non-empty else clause for every if condition. *sigh* # a non-empty else clause for every if condition. *sigh*
# #
.all: .all:
rm -f .all ${RM} -f .all
touch .all ${TOUCH} .all
## ##
# #
@@ -229,21 +237,22 @@ all: ${TARGETS} .all
## ##
distlist: ${DISTLIST} distlist: ${DISTLIST}
${Q}for i in ${DISTLIST} /dev/null; do \ ${Q} for i in ${DISTLIST} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo cscript/$$i; \ echo cscript/$$i; \
fi; \ fi; \
done | LANG=C ${SORT} done | LANG=C ${SORT}
distdir: distdir:
${Q}echo cscript ${Q} echo cscript
calcliblist: calcliblist:
# These next rule help me form the ${DETAIL_HELP} makefile variables above. # These next rule help me form the ${SCRIPT} and ${SCRIPT_SRC} makefile
# variables above.
# #
detaillist: detaillist:
${Q}-(echo "xxxxxxx"; \ ${Q} -(echo "xxxxxxx"; \
for i in ${SCRIPT} /dev/null; do \ for i in ${SCRIPT} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
if [ ! -f RCS/$$i.calc,v ]; then \ if [ ! -f RCS/$$i.calc,v ]; then \
@@ -255,9 +264,9 @@ detaillist:
done | LANG=C ${SORT}) | ${FMT} -70 | \ done | LANG=C ${SORT}) | ${FMT} -70 | \
${SED} -e '1s/xxxxxxx/SCRIPT=/' -e '2,$$s/^/ /' \ ${SED} -e '1s/xxxxxxx/SCRIPT=/' -e '2,$$s/^/ /' \
-e 's/$$/ \\/' -e '$$s/ \\$$//' -e 's/$$/ \\/' -e '$$s/ \\$$//'
${Q}echo ${Q} echo
${Q}-(echo "xxxxxxxxxxx"; \ ${Q} -(echo "xxxxxxxxxxx"; \
for i in ${SCRIPT} /dev/null; do \ for i in ${SCRIPT} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
if [ ! -f RCS/$$i.calc,v ]; then \ if [ ! -f RCS/$$i.calc,v ]; then \
echo "WARNING: $$i.calc not under RCS control" 1>&2; \ echo "WARNING: $$i.calc not under RCS control" 1>&2; \
@@ -282,46 +291,46 @@ detaillist:
## ##
depend: depend:
${Q}if [ -f Makefile.bak ]; then \ ${Q} if [ -f Makefile.bak ]; then \
echo "Makefile.bak exists, remove or move it out of the way"; \ echo "Makefile.bak exists, remove or move it out of the way"; \
exit 1; \ exit 1; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}rm -f makedep.out -${Q} ${RM} -f makedep.out
${Q}echo forming cscript dependency list ${Q} echo forming cscript dependency list
${Q}echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \ ${Q} echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \
makedep.out makedep.out
${Q}echo "" >> makedep.out ${Q} echo "" >> makedep.out
${Q}for i in ${SCRIPT} /dev/null; do \ ${Q} for i in ${SCRIPT} /dev/null; do \
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 $$@'; \
echo ' @$${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!$${BINDIR}/calc:" $$?>$$@'; \ echo ' @$${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!$${BINDIR}/calc:" $$?>$$@'; \
echo ' @$${CHMOD} +x $$@'; \ echo ' @$${CHMOD} +x $$@'; \
fi; \ fi; \
done >> makedep.out done >> makedep.out
${Q}echo sample dependency list formed ${Q} echo sample dependency list formed
${Q}echo forming new cscript/Makefile ${Q} echo forming new cscript/Makefile
-${Q}rm -f Makefile.bak -${Q} ${RM} -f Makefile.bak
${Q}mv Makefile Makefile.bak ${Q} ${MV} Makefile Makefile.bak
${Q}${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile
${Q}echo "" >> Makefile ${Q} echo "" >> Makefile
${Q}${SED} -n '3,$$p' makedep.out >> Makefile ${Q} ${SED} -n '3,$$p' makedep.out >> Makefile
-${Q}rm -f makedep.out -${Q} ${RM} -f makedep.out
-${Q}if ${CMP} -s Makefile.bak Makefile; then \ -${Q} if ${CMP} -s Makefile.bak Makefile; then \
echo 'sample Makefile was already up to date'; \ echo 'sample Makefile was already up to date'; \
mv -f Makefile.bak Makefile; \ ${MV} -f Makefile.bak Makefile; \
else \ else \
rm -f Makefile.tmp; \ ${RM} -f Makefile.tmp; \
mv Makefile Makefile.tmp; \ ${MV} Makefile Makefile.tmp; \
if [ -d RCS ]; then \ if [ -d RCS ]; then \
co -l Makefile; \ ${CO} -l Makefile; \
fi; \ fi; \
mv Makefile.tmp Makefile; \ ${MV} Makefile.tmp Makefile; \
if [ -d RCS ]; then \ if [ -d RCS ]; then \
echo new sample Makefile formed, you need to check it in; \ echo new sample Makefile formed, you need to check it in; \
fi; \ fi; \
fi fi
## ##
@@ -331,7 +340,7 @@ depend:
## ##
echo_inst_files: echo_inst_files:
${Q}for i in ${SCRIPT} /dev/null; do \ ${Q} for i in ${SCRIPT} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo __file__ ${SCRIPTDIR}/$$i; \ echo __file__ ${SCRIPTDIR}/$$i; \
fi; \ fi; \
@@ -344,52 +353,52 @@ echo_inst_files:
## ##
clean: clean:
-rm -f makedep.out -${RM} -f makedep.out
clobber: clobber:
-rm -f ${TARGETS} -${RM} -f ${TARGETS}
# install everything # install everything
# #
# NOTE: Keep the uninstall rule in reverse order to the install rule # NOTE: Keep the uninstall rule in reverse order to the install rule
# #
install: all install: all
-${Q}if [ ! -d $T${BINDIR} ]; then \ -${Q} if [ ! -d ${T}${BINDIR} ]; then \
echo mkdir $T${BINDIR}; \ echo ${MKDIR} ${T}${BINDIR}; \
mkdir $T${BINDIR}; \ ${MKDIR} ${T}${BINDIR}; \
if [ ! -d "$T${BINDIR}" ]; then \ if [ ! -d "${T}${BINDIR}" ]; then \
echo mkdir -p "$T${BINDIR}"; \ echo ${MKDIR} -p "${T}${BINDIR}"; \
mkdir -p "$T${BINDIR}"; \ ${MKDIR} -p "${T}${BINDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${BINDIR}; \ echo ${CHMOD} 0755 ${T}${BINDIR}; \
${CHMOD} 0755 $T${BINDIR}; \ ${CHMOD} 0755 ${T}${BINDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}if [ ! -d $T${SCRIPTDIR} ]; then \ -${Q} if [ ! -d ${T}${SCRIPTDIR} ]; then \
echo mkdir $T${SCRIPTDIR}; \ echo ${MKDIR} ${T}${SCRIPTDIR}; \
mkdir $T${SCRIPTDIR}; \ ${MKDIR} ${T}${SCRIPTDIR}; \
if [ ! -d "$T${SCRIPTDIR}" ]; then \ if [ ! -d "${T}${SCRIPTDIR}" ]; then \
echo mkdir -p "$T${SCRIPTDIR}"; \ echo ${MKDIR} -p "${T}${SCRIPTDIR}"; \
mkdir -p "$T${SCRIPTDIR}"; \ ${MKDIR} -p "${T}${SCRIPTDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${SCRIPTDIR}; \ echo ${CHMOD} 0755 ${T}${SCRIPTDIR}; \
${CHMOD} 0755 $T${SCRIPTDIR}; \ ${CHMOD} 0755 ${T}${SCRIPTDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
${Q}for i in ${SCRIPT} /dev/null; do \ ${Q} for i in ${SCRIPT} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if ${CMP} -s $$i $T${SCRIPTDIR}/$$i; then \ if ${CMP} -s $$i ${T}${SCRIPTDIR}/$$i; then \
true; \ ${TRUE}; \
else \ else \
rm -f $T${SCRIPTDIR}/$$i.new; \ ${RM} -f ${T}${SCRIPTDIR}/$$i.new; \
cp -f $$i $T${SCRIPTDIR}/$$i.new; \ ${CP} -f $$i ${T}${SCRIPTDIR}/$$i.new; \
${CHMOD} 0555 $T${SCRIPTDIR}/$$i.new; \ ${CHMOD} 0555 ${T}${SCRIPTDIR}/$$i.new; \
mv -f $T${SCRIPTDIR}/$$i.new $T${SCRIPTDIR}/$$i; \ ${MV} -f ${T}${SCRIPTDIR}/$$i.new ${T}${SCRIPTDIR}/$$i; \
echo "installed $T${SCRIPTDIR}/$$i"; \ echo "installed ${T}${SCRIPTDIR}/$$i"; \
fi; \ fi; \
done done
@@ -398,57 +407,57 @@ install: all
# NOTE: Keep the uninstall rule in reverse order to the install rule # NOTE: Keep the uninstall rule in reverse order to the install rule
# #
uninstall: uninstall:
-${Q}for i in ${SCRIPT} /dev/null; do \ -${Q} for i in ${SCRIPT} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if [ -f "$T${SCRIPTDIR}/$$i" ]; then \ if [ -f "${T}${SCRIPTDIR}/$$i" ]; then \
rm -f "$T${SCRIPTDIR}/$$i"; \ ${RM} -f "${T}${SCRIPTDIR}/$$i"; \
if [ -f "$T${SCRIPTDIR}/$$i" ]; then \ if [ -f "${T}${SCRIPTDIR}/$$i" ]; then \
echo "cannot uninstall $T${SCRIPTDIR}/$$i"; \ echo "cannot uninstall ${T}${SCRIPTDIR}/$$i"; \
else \ else \
echo "uninstalled $T${SCRIPTDIR}/$$i"; \ echo "uninstalled ${T}${SCRIPTDIR}/$$i"; \
fi; \ fi; \
fi; \ fi; \
done done
-${Q}for i in ${SCRIPTDIR} ${BINDIR}; do \ -${Q} for i in ${SCRIPTDIR} ${BINDIR}; do \
if [ -d "$T$$i" ]; then \ if [ -d "${T}$$i" ]; then \
rmdir "$T$$i" 2>/dev/null; \ ${RMDIR} "${T}$$i" 2>/dev/null; \
echo "cleaned up $T$$i"; \ echo "cleaned up ${T}$$i"; \
fi; \ fi; \
done done
# DO NOT DELETE THIS LINE -- make depend depends on it. # DO NOT DELETE THIS LINE -- make depend depends on it.
4dsphere: 4dsphere.calc 4dsphere: 4dsphere.calc
@rm -f $@ @${RM} -f $@
@${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@ @${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@
@${CHMOD} +x $@ @${CHMOD} +x $@
fproduct: fproduct.calc fproduct: fproduct.calc
@rm -f $@ @${RM} -f $@
@${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@ @${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@
@${CHMOD} +x $@ @${CHMOD} +x $@
mersenne: mersenne.calc mersenne: mersenne.calc
@rm -f $@ @${RM} -f $@
@${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@ @${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@
@${CHMOD} +x $@ @${CHMOD} +x $@
piforever: piforever.calc piforever: piforever.calc
@rm -f $@ @${RM} -f $@
@${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@ @${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@
@${CHMOD} +x $@ @${CHMOD} +x $@
plus: plus.calc plus: plus.calc
@rm -f $@ @${RM} -f $@
@${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@ @${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@
@${CHMOD} +x $@ @${CHMOD} +x $@
powerterm: powerterm.calc powerterm: powerterm.calc
@rm -f $@ @${RM} -f $@
@${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@ @${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@
@${CHMOD} +x $@ @${CHMOD} +x $@
simple: simple.calc simple: simple.calc
@rm -f $@ @${RM} -f $@
@${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@ @${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@
@${CHMOD} +x $@ @${CHMOD} +x $@
square: square.calc square: square.calc
@rm -f $@ @${RM} -f $@
@${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@ @${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!${BINDIR}/calc:" $?>$@
@${CHMOD} +x $@ @${CHMOD} +x $@

View File

@@ -2,7 +2,7 @@
# #
# custom - makefile for calc custom routines # custom - makefile for calc custom routines
# #
# Copyright (C) 1999,2004 Landon Curt Noll # Copyright (C) 1999-2006 Landon Curt Noll
# #
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
@@ -18,8 +18,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc. # received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# #
# @(#) $Revision: 29.25 $ # @(#) $Revision: 29.29 $
# @(#) $Id: Makefile,v 29.25 2006/06/26 05:46:06 chongo Exp $ # @(#) $Id: Makefile,v 29.29 2006/09/18 13:13:25 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile,v $ # @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile,v $
# #
# Under source code control: 1997/03/09 02:28:54 # Under source code control: 1997/03/09 02:28:54
@@ -114,9 +114,9 @@ INCDIR= /usr/include
# ${LIBDIR} where calc link library (*.a) files are installed # ${LIBDIR} where calc link library (*.a) files are installed
# ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files # ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files
# #
# NOTE: The install rule prepends installation paths with $T, which # NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If $T is non-empty, then installation # by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the $T directory. # locations will be relative to the ${T} directory.
# #
# For DJGPP, select: # For DJGPP, select:
# #
@@ -148,12 +148,12 @@ CALC_SHAREDIR= /usr/share/calc
# ${CALC_INCDIR} where the calc include files are installed # ${CALC_INCDIR} where the calc include files are installed
# ${CUSTOMCALDIR} where custom *.cal files are installed # ${CUSTOMCALDIR} where custom *.cal files are installed
# ${CUSTOMHELPDIR} where custom help files are installed # ${CUSTOMHELPDIR} where custom help files are installed
# ${CUSTOMINCPDIR} where custom .h files are installed # ${CUSTOMINCDIR} where custom .h files are installed
# ${SCRIPTDIR} where calc shell scripts are installed # ${SCRIPTDIR} where calc shell scripts are installed
# #
# NOTE: The install rule prepends installation paths with $T, which # NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If $T is non-empty, then installation # by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the $T directory. # locations will be relative to the ${T} directory.
# #
# If in doubt, set: # If in doubt, set:
# #
@@ -173,8 +173,8 @@ SCRIPTDIR= ${BINDIR}/cscript
# T - top level directory under which calc will be installed # T - top level directory under which calc will be installed
# #
# The calc install is performed under $T, the calc build is # The calc install is performed under ${T}, the calc build is
# performed under /. The purpose for $T is to allow someone # performed under /. The purpose for ${T} is to allow someone
# to install calc somewhere other than into the system area. # to install calc somewhere other than into the system area.
# #
# For example, if: # For example, if:
@@ -194,10 +194,10 @@ SCRIPTDIR= ${BINDIR}/cscript
# calc help, .cal ...: /var/tmp/testing/usr/share/calc # calc help, .cal ...: /var/tmp/testing/usr/share/calc
# ... etc ... /var/tmp/testing/... # ... etc ... /var/tmp/testing/...
# #
# If $T is empty, calc is installed under /, which is the same # If ${T} is empty, calc is installed under /, which is the same
# top of tree for which it was built. If $T is non-empty, then # top of tree for which it was built. If ${T} is non-empty, then
# calc is installed under $T, as if one had to chroot under # calc is installed under ${T}, as if one had to chroot under
# $T for calc to operate. # ${T} for calc to operate.
# #
# If in doubt, use T= # If in doubt, use T=
# #
@@ -249,6 +249,20 @@ NO_SHARED=
#NO_SHARED= -dn #NO_SHARED= -dn
#NO_SHARED= -non_shared #NO_SHARED= -non_shared
# On some systems where you are disabling dynamic shared link libs, you may
# need to pass a special flag to ${CC} and ${LCC} during linking stage.
#
# System type NO_SHARED recommendation
#
# IRIX with NO_SHARED= -non_shared LD_NO_SHARED= -Wl,-rdata_shared
# IRIX with NO_SHARED= LD_NO_SHARED=
# others LD_NO_SHARED=
#
# If in doubt, use LD_NO_SHARED=
#
LD_NO_SHARED=
#LD_NO_SHARED= -Wl,-rdata_shared
# Normally, the upper level makefile will set these values. We provide # Normally, the upper level makefile will set these values. We provide
# a default here just in case you want to build from this directory. # a default here just in case you want to build from this directory.
# #
@@ -275,12 +289,13 @@ MAKE_FILE= Makefile
# Normally, the upper level makefile will set these values. We provide # Normally, the upper level makefile will set these values. We provide
# a default here just in case you want to build from this directory. # a default here just in case you want to build from this directory.
# #
# If you do not wish to use purify, leave PURIFY commented out. # If you do not wish to use purify, set PURIFY to an empty string.
# #
# If in doubt, leave PURIFY commented out. # If in doubt, use PURIFY=
# #
#PURIFY= purify -logfile=pure.out #PURIFY= purify -logfile=pure.out
#PURIFY= purify #PURIFY= purify
PURIFY=
# Normally, the upper level makefile will set these values. We provide # Normally, the upper level makefile will set these values. We provide
# a default here just in case you want to build from this directory. # a default here just in case you want to build from this directory.
@@ -402,6 +417,16 @@ MAKEDEPEND= makedepend
CHMOD= chmod CHMOD= chmod
SORT= sort SORT= sort
CMP= cmp CMP= cmp
AR= ar
RM= rm
TOUCH= touch
MKDIR= mkdir
RMDIR= rmdir
MV= mv
CP= cp
CO= co
TRUE= true
MAKE= make
## ##
# #
@@ -413,8 +438,8 @@ all: ${TARGETS} ${INSTALL_H_SRC} ${CUSTOM_CALC_FILES} \
${CUSTOM_HELP} ${MAKE_FILE} .all ${CUSTOM_HELP} ${MAKE_FILE} .all
libcustcalc.a: ${CUSTCALC_OBJ} ${MAKE_FILE} ../${MAKE_FILE} libcustcalc.a: ${CUSTCALC_OBJ} ${MAKE_FILE} ../${MAKE_FILE}
-rm -f libcustcalc.a -${RM} -f libcustcalc.a
ar qc libcustcalc.a ${CUSTCALC_OBJ} ${AR} qc libcustcalc.a ${CUSTCALC_OBJ}
${RANLIB} libcustcalc.a ${RANLIB} libcustcalc.a
## ##
@@ -435,8 +460,8 @@ c_sysinfo.o: c_sysinfo.c ${MAKE_FILE}
# to determine of we have done all # to determine of we have done all
# #
.all: .all:
rm -f .all ${RM} -f .all
touch .all ${TOUCH} .all
## ##
# #
@@ -452,17 +477,17 @@ c_sysinfo.o: c_sysinfo.c ${MAKE_FILE}
## ##
distlist: ${DISTLIST} distlist: ${DISTLIST}
${Q}for i in ${DISTLIST} /dev/null; do \ ${Q} for i in ${DISTLIST} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo custom/$$i; \ echo custom/$$i; \
fi; \ fi; \
done done
distdir: distdir:
${Q}echo custom ${Q} echo custom
calcliblist: ${CALCLIBLIST} calcliblist: ${CALCLIBLIST}
${Q}for i in ${CALCLIBLIST} /dev/null; do \ ${Q} for i in ${CALCLIBLIST} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo custom/$$i; \ echo custom/$$i; \
fi; \ fi; \
@@ -481,81 +506,81 @@ calcliblist: ${CALCLIBLIST}
## ##
depend: depend:
${Q}if [ -f Makefile.bak ]; then \ ${Q} if [ -f Makefile.bak ]; then \
echo "Makefile.bak exists, remove or move it out of the way"; \ echo "Makefile.bak exists, remove or move it out of the way"; \
exit 1; \ exit 1; \
else \ else \
true; \ ${TRUE}; \
fi fi
${Q}echo forming custom/skel ${Q} echo forming custom/skel
-${Q}rm -rf skel -${Q} ${RM} -rf skel
${Q}mkdir skel ${Q} ${MKDIR} skel
${Q}mkdir skel/custom ${Q} ${MKDIR} skel/custom
-${Q}for i in ${C_SRC} /dev/null; do \ -${Q} for i in ${C_SRC} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
${SED} -n '/^#[ ]*include[ ]*"/p' \ ${SED} -n '/^#[ ]*include[ ]*"/p' \
"$$i" > "skel/custom/$$i"; \ "$$i" > "skel/custom/$$i"; \
fi; \ fi; \
done done
-${Q}for i in ${H_SRC} /dev/null; do \ -${Q} for i in ${H_SRC} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
echo "#if !defined($$tag)" > "skel/custom/$$i"; \ echo "#if !defined($$tag)" > "skel/custom/$$i"; \
echo "#define $$tag" >> "skel/custom/$$i"; \ echo "#define $$tag" >> "skel/custom/$$i"; \
${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" \ ${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" \
>> "skel/custom/$$i"; \ >> "skel/custom/$$i"; \
echo '#endif /* '"$$tag"' */' >> "skel/custom/$$i"; \ echo '#endif /* '"$$tag"' */' >> "skel/custom/$$i"; \
done done
${Q}(cd ..; ${MAKE} hsrc) ${Q} (cd ..; $(MAKE) hsrc)
${Q}for i in `cd ..; ${MAKE} h_list 2>&1 | \ ${Q} for i in `cd ..; $(MAKE) h_list 2>&1 | \
${SED} -e '/Entering directory/d' \ ${SED} -e '/Entering directory/d' \
-e '/Nothing to be done/d' \ -e '/Nothing to be done/d' \
-e '/Leaving directory/d'` /dev/null; do \ -e '/Leaving directory/d'` /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
echo "#if !defined($$tag)" > "skel/$$i"; \ echo "#if !defined($$tag)" > "skel/$$i"; \
echo "#define $$tag" >> "skel/$$i"; \ echo "#define $$tag" >> "skel/$$i"; \
${SED} -n '/^#[ ]*include[ ]*"/p' "../$$i" \ ${SED} -n '/^#[ ]*include[ ]*"/p' "../$$i" \
>> "skel/$$i"; \ >> "skel/$$i"; \
echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \
done done
-${Q}rm -f skel/custom/makedep.out -${Q} ${RM} -f skel/custom/makedep.out
${Q}echo custom/skel formed ${Q} echo custom/skel formed
${Q}echo forming custom dependency list ${Q} echo forming custom dependency list
${Q}echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \ ${Q} echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \
skel/custom/makedep.out skel/custom/makedep.out
${Q}cd skel/custom; ${MAKEDEPEND} -w 1 -f makedep.out ${C_SRC} ${Q} cd skel/custom; ${MAKEDEPEND} -w 1 -f makedep.out ${C_SRC}
-${Q}for i in ${C_SRC} /dev/null; do \ -${Q} for i in ${C_SRC} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \ echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \
fi; \ fi; \
done >> skel/custom/makedep.out done >> skel/custom/makedep.out
${Q}echo custom dependency list formed ${Q} echo custom dependency list formed
${Q}echo forming new custom/Makefile ${Q} echo forming new custom/Makefile
-${Q}rm -f Makefile.bak -${Q} ${RM} -f Makefile.bak
${Q}mv Makefile Makefile.bak ${Q} ${MV} Makefile Makefile.bak
${Q}${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile
${Q}echo "" >> Makefile ${Q} echo "" >> Makefile
${Q}${SED} -n '3,$$p' skel/custom/makedep.out | \ ${Q} ${SED} -n '3,$$p' skel/custom/makedep.out | \
LANG=C ${SORT} -u >> Makefile LANG=C ${SORT} -u >> Makefile
-${Q}rm -rf skel -${Q} ${RM} -rf skel
-${Q}if ${CMP} -s Makefile.bak Makefile; then \ -${Q} if ${CMP} -s Makefile.bak Makefile; then \
echo 'custom Makefile was already up to date'; \ echo 'custom Makefile was already up to date'; \
mv -f Makefile.bak Makefile; \ ${MV} -f Makefile.bak Makefile; \
else \ else \
rm -f Makefile.tmp; \ ${RM} -f Makefile.tmp; \
mv Makefile Makefile.tmp; \ ${MV} Makefile Makefile.tmp; \
if [ -d RCS ]; then \ if [ -d RCS ]; then \
co -l Makefile; \ ${CO} -l Makefile; \
fi ;\ fi ;\
mv Makefile.tmp Makefile; \ ${MV} Makefile.tmp Makefile; \
if [ -d RCS ]; then \ if [ -d RCS ]; then \
echo 'new custom Makefile formed -- you need to check it in'; \ echo 'new custom Makefile formed -- you need to check it in'; \
fi; \ fi; \
fi fi
## ##
@@ -565,22 +590,22 @@ depend:
## ##
echo_inst_files: echo_inst_files:
${Q}for i in ${INSTALL_H_SRC} /dev/null; do \ ${Q} for i in ${INSTALL_H_SRC} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo __file__ ${CUSTOMINCDIR}/$$i; \ echo __file__ ${CUSTOMINCDIR}/$$i; \
fi; \ fi; \
done done
${Q}for i in ${CUSTOM_HELP} /dev/null; do \ ${Q} for i in ${CUSTOM_HELP} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo __file__ ${CUSTOMHELPDIR}/$$i; \ echo __file__ ${CUSTOMHELPDIR}/$$i; \
fi; \ fi; \
done done
${Q}for i in ${CUSTOM_CALC_FILES} /dev/null; do \ ${Q} for i in ${CUSTOM_CALC_FILES} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo __file__ ${CUSTOMCALDIR}/$$i; \ echo __file__ ${CUSTOMCALDIR}/$$i; \
fi; \ fi; \
done done
${Q}for i in ${CALC_LIBCUSTOM} /dev/null; do \ ${Q} for i in ${CALC_LIBCUSTOM} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo __file__ ${CUSTOMCALDIR}/$$i; \ echo __file__ ${CUSTOMCALDIR}/$$i; \
fi; \ fi; \
@@ -593,154 +618,154 @@ echo_inst_files:
## ##
clean: clean:
-rm -f ${CUSTCALC_OBJ} -${RM} -f ${CUSTCALC_OBJ}
clobber: clobber:
-rm -f ${TARGETS} -${RM} -f ${TARGETS}
rm -f .all Makefile.tmp Makefile.bak ${RM} -f .all Makefile.tmp Makefile.bak
# install everything # install everything
# #
# NOTE: Keep the uninstall rule in reverse order to the install rule # NOTE: Keep the uninstall rule in reverse order to the install rule
# #
install: all install: all
-${Q}if [ ! -d $T${INCDIR} ]; then \ -${Q} if [ ! -d ${T}${INCDIR} ]; then \
echo mkdir $T${INCDIR}; \ echo ${MKDIR} ${T}${INCDIR}; \
mkdir $T${INCDIR}; \ ${MKDIR} ${T}${INCDIR}; \
if [ ! -d "$T${INCDIR}" ]; then \ if [ ! -d "${T}${INCDIR}" ]; then \
echo mkdir -p "$T${INCDIR}"; \ echo ${MKDIR} -p "${T}${INCDIR}"; \
mkdir -p "$T${INCDIR}"; \ ${MKDIR} -p "${T}${INCDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${INCDIR}; \ echo ${CHMOD} 0755 ${T}${INCDIR}; \
${CHMOD} 0755 $T${INCDIR}; \ ${CHMOD} 0755 ${T}${INCDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}if [ ! -d $T${CALC_SHAREDIR} ]; then \ -${Q} if [ ! -d ${T}${CALC_SHAREDIR} ]; then \
echo mkdir $T${CALC_SHAREDIR}; \ echo ${MKDIR} ${T}${CALC_SHAREDIR}; \
mkdir $T${CALC_SHAREDIR}; \ ${MKDIR} ${T}${CALC_SHAREDIR}; \
if [ ! -d "$T${CALC_SHAREDIR}" ]; then \ if [ ! -d "${T}${CALC_SHAREDIR}" ]; then \
echo mkdir -p "$T${CALC_SHAREDIR}"; \ echo ${MKDIR} -p "${T}${CALC_SHAREDIR}"; \
mkdir -p "$T${CALC_SHAREDIR}"; \ ${MKDIR} -p "${T}${CALC_SHAREDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${CALC_SHAREDIR}; \ echo ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \
${CHMOD} 0755 $T${CALC_SHAREDIR}; \ ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}if [ ! -d $T${CALC_INCDIR} ]; then \ -${Q} if [ ! -d ${T}${CALC_INCDIR} ]; then \
echo mkdir $T${CALC_INCDIR}; \ echo ${MKDIR} ${T}${CALC_INCDIR}; \
mkdir $T${CALC_INCDIR}; \ ${MKDIR} ${T}${CALC_INCDIR}; \
if [ ! -d "$T${CALC_INCDIR}" ]; then \ if [ ! -d "${T}${CALC_INCDIR}" ]; then \
echo mkdir -p "$T${CALC_INCDIR}"; \ echo ${MKDIR} -p "${T}${CALC_INCDIR}"; \
mkdir -p "$T${CALC_INCDIR}"; \ ${MKDIR} -p "${T}${CALC_INCDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${CALC_INCDIR}; \ echo ${CHMOD} 0755 ${T}${CALC_INCDIR}; \
${CHMOD} 0755 $T${CALC_INCDIR}; \ ${CHMOD} 0755 ${T}${CALC_INCDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}if [ ! -d $T${HELPDIR} ]; then \ -${Q} if [ ! -d ${T}${HELPDIR} ]; then \
echo mkdir $T${HELPDIR}; \ echo ${MKDIR} ${T}${HELPDIR}; \
mkdir $T${HELPDIR}; \ ${MKDIR} ${T}${HELPDIR}; \
if [ ! -d "$T${HELPDIR}" ]; then \ if [ ! -d "${T}${HELPDIR}" ]; then \
echo mkdir -p "$T${HELPDIR}"; \ echo ${MKDIR} -p "${T}${HELPDIR}"; \
mkdir -p "$T${HELPDIR}"; \ ${MKDIR} -p "${T}${HELPDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${HELPDIR}; \ echo ${CHMOD} 0755 ${T}${HELPDIR}; \
${CHMOD} 0755 $T${HELPDIR}; \ ${CHMOD} 0755 ${T}${HELPDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}if [ ! -d $T${CUSTOMCALDIR} ]; then \ -${Q} if [ ! -d ${T}${CUSTOMCALDIR} ]; then \
echo mkdir $T${CUSTOMCALDIR}; \ echo ${MKDIR} ${T}${CUSTOMCALDIR}; \
mkdir $T${CUSTOMCALDIR}; \ ${MKDIR} ${T}${CUSTOMCALDIR}; \
if [ ! -d "$T${CUSTOMCALDIR}" ]; then \ if [ ! -d "${T}${CUSTOMCALDIR}" ]; then \
echo mkdir -p "$T${CUSTOMCALDIR}"; \ echo ${MKDIR} -p "${T}${CUSTOMCALDIR}"; \
mkdir -p "$T${CUSTOMCALDIR}"; \ ${MKDIR} -p "${T}${CUSTOMCALDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${CUSTOMCALDIR}; \ echo ${CHMOD} 0755 ${T}${CUSTOMCALDIR}; \
${CHMOD} 0755 $T${CUSTOMCALDIR}; \ ${CHMOD} 0755 ${T}${CUSTOMCALDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}if [ ! -d $T${CUSTOMHELPDIR} ]; then \ -${Q} if [ ! -d ${T}${CUSTOMHELPDIR} ]; then \
echo mkdir $T${CUSTOMHELPDIR}; \ echo ${MKDIR} ${T}${CUSTOMHELPDIR}; \
mkdir $T${CUSTOMHELPDIR}; \ ${MKDIR} ${T}${CUSTOMHELPDIR}; \
if [ ! -d "$T${CUSTOMHELPDIR}" ]; then \ if [ ! -d "${T}${CUSTOMHELPDIR}" ]; then \
echo mkdir -p "$T${CUSTOMHELPDIR}"; \ echo ${MKDIR} -p "${T}${CUSTOMHELPDIR}"; \
mkdir -p "$T${CUSTOMHELPDIR}"; \ ${MKDIR} -p "${T}${CUSTOMHELPDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${CUSTOMHELPDIR}; \ echo ${CHMOD} 0755 ${T}${CUSTOMHELPDIR}; \
${CHMOD} 0755 $T${CUSTOMHELPDIR}; \ ${CHMOD} 0755 ${T}${CUSTOMHELPDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}if [ ! -d $T${CUSTOMINCDIR} ]; then \ -${Q} if [ ! -d ${T}${CUSTOMINCDIR} ]; then \
echo mkdir $T${CUSTOMINCDIR}; \ echo ${MKDIR} ${T}${CUSTOMINCDIR}; \
mkdir $T${CUSTOMINCDIR}; \ ${MKDIR} ${T}${CUSTOMINCDIR}; \
if [ ! -d "$T${CUSTOMINCDIR}" ]; then \ if [ ! -d "${T}${CUSTOMINCDIR}" ]; then \
echo mkdir -p "$T${CUSTOMINCDIR}"; \ echo ${MKDIR} -p "${T}${CUSTOMINCDIR}"; \
mkdir -p "$T${CUSTOMINCDIR}"; \ ${MKDIR} -p "${T}${CUSTOMINCDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${CUSTOMINCDIR}; \ echo ${CHMOD} 0755 ${T}${CUSTOMINCDIR}; \
${CHMOD} 0755 $T${CUSTOMINCDIR}; \ ${CHMOD} 0755 ${T}${CUSTOMINCDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}for i in ${INSTALL_H_SRC} /dev/null; do \ -${Q} for i in ${INSTALL_H_SRC} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if ${CMP} -s "$$i" $T${CUSTOMINCDIR}/$$i; then \ if ${CMP} -s "$$i" ${T}${CUSTOMINCDIR}/$$i; then \
true; \ ${TRUE}; \
else \ else \
rm -f $T${CUSTOMINCDIR}/$$i.new; \ ${RM} -f ${T}${CUSTOMINCDIR}/$$i.new; \
cp -f $$i $T${CUSTOMINCDIR}/$$i.new; \ ${CP} -f $$i ${T}${CUSTOMINCDIR}/$$i.new; \
${CHMOD} 0444 $T${CUSTOMINCDIR}/$$i.new; \ ${CHMOD} 0444 ${T}${CUSTOMINCDIR}/$$i.new; \
mv -f $T${CUSTOMINCDIR}/$$i.new $T${CUSTOMINCDIR}/$$i; \ ${MV} -f ${T}${CUSTOMINCDIR}/$$i.new ${T}${CUSTOMINCDIR}/$$i; \
echo "installed $T${CUSTOMINCDIR}/$$i"; \ echo "installed ${T}${CUSTOMINCDIR}/$$i"; \
fi; \ fi; \
done done
-${Q}for i in ${CUSTOM_CALC_FILES} /dev/null; do \ -${Q} for i in ${CUSTOM_CALC_FILES} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if ${CMP} -s $$i $T${CUSTOMCALDIR}/$$i; then \ if ${CMP} -s $$i ${T}${CUSTOMCALDIR}/$$i; then \
true; \ ${TRUE}; \
else \ else \
rm -f $T${CUSTOMCALDIR}/$$i.new; \ ${RM} -f ${T}${CUSTOMCALDIR}/$$i.new; \
cp -f $$i $T${CUSTOMCALDIR}/$$i.new; \ ${CP} -f $$i ${T}${CUSTOMCALDIR}/$$i.new; \
${CHMOD} 0444 $T${CUSTOMCALDIR}/$$i.new; \ ${CHMOD} 0444 ${T}${CUSTOMCALDIR}/$$i.new; \
mv -f $T${CUSTOMCALDIR}/$$i.new $T${CUSTOMCALDIR}/$$i; \ ${MV} -f ${T}${CUSTOMCALDIR}/$$i.new ${T}${CUSTOMCALDIR}/$$i; \
echo "installed $T${CUSTOMCALDIR}/$$i"; \ echo "installed ${T}${CUSTOMCALDIR}/$$i"; \
fi; \ fi; \
done done
-${Q}for i in ${CUSTOM_HELP} /dev/null; do \ -${Q} for i in ${CUSTOM_HELP} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if ${CMP} -s $$i $T${CUSTOMHELPDIR}/$$i; then \ if ${CMP} -s $$i ${T}${CUSTOMHELPDIR}/$$i; then \
true; \ ${TRUE}; \
else \ else \
rm -f $T${CUSTOMHELPDIR}/$$i.new; \ ${RM} -f ${T}${CUSTOMHELPDIR}/$$i.new; \
cp -f $$i $T${CUSTOMHELPDIR}/$$i.new; \ ${CP} -f $$i ${T}${CUSTOMHELPDIR}/$$i.new; \
${CHMOD} 0444 $T${CUSTOMHELPDIR}/$$i.new; \ ${CHMOD} 0444 ${T}${CUSTOMHELPDIR}/$$i.new; \
mv -f $T${CUSTOMHELPDIR}/$$i.new $T${CUSTOMHELPDIR}/$$i; \ ${MV} -f ${T}${CUSTOMHELPDIR}/$$i.new ${T}${CUSTOMHELPDIR}/$$i; \
echo "installed $T${CUSTOMHELPDIR}/$$i"; \ echo "installed ${T}${CUSTOMHELPDIR}/$$i"; \
fi; \ fi; \
done done
-${Q}if [ ! -z ${ALLOW_CUSTOM} ]; then \ -${Q} if [ ! -z ${ALLOW_CUSTOM} ]; then \
if ${CMP} -s libcustcalc.a $T${CUSTOMCALDIR}/libcustcalc.a; then \ if ${CMP} -s libcustcalc.a ${T}${CUSTOMCALDIR}/libcustcalc.a; then \
true; \ ${TRUE}; \
else \ else \
rm -f $T${CUSTOMCALDIR}/libcustcalc.a.new; \ ${RM} -f ${T}${CUSTOMCALDIR}/libcustcalc.a.new; \
cp -f libcustcalc.a $T${CUSTOMCALDIR}/libcustcalc.a.new; \ ${CP} -f libcustcalc.a ${T}${CUSTOMCALDIR}/libcustcalc.a.new; \
${CHMOD} 0644 $T${CUSTOMCALDIR}/libcustcalc.a.new; \ ${CHMOD} 0644 ${T}${CUSTOMCALDIR}/libcustcalc.a.new; \
mv -f $T${CUSTOMCALDIR}/libcustcalc.a.new \ ${MV} -f ${T}${CUSTOMCALDIR}/libcustcalc.a.new \
$T${CUSTOMCALDIR}/libcustcalc.a; \ ${T}${CUSTOMCALDIR}/libcustcalc.a; \
${RANLIB} $T${CUSTOMCALDIR}/libcustcalc.a; \ ${RANLIB} ${T}${CUSTOMCALDIR}/libcustcalc.a; \
echo "installed $T${CUSTOMCALDIR}/libcustcalc.a"; \ echo "installed ${T}${CUSTOMCALDIR}/libcustcalc.a"; \
fi; \ fi; \
fi fi
@@ -749,58 +774,58 @@ install: all
# NOTE: Keep the uninstall rule in reverse order to the install rule # NOTE: Keep the uninstall rule in reverse order to the install rule
# #
uninstall: uninstall:
-${Q}if [ -f "$T${CUSTOMCALDIR}/libcustcalc.a" ]; then \ -${Q} if [ -f "${T}${CUSTOMCALDIR}/libcustcalc.a" ]; then \
rm -f "$T${CUSTOMCALDIR}/libcustcalc.a"; \ ${RM} -f "${T}${CUSTOMCALDIR}/libcustcalc.a"; \
if [ -f "$T${CUSTOMCALDIR}/libcustcalc.a" ]; then \ if [ -f "${T}${CUSTOMCALDIR}/libcustcalc.a" ]; then \
echo "cannot uninstall $T${CUSTOMCALDIR}/libcustcalc.a"; \ echo "cannot uninstall ${T}${CUSTOMCALDIR}/libcustcalc.a"; \
else \ else \
echo "uninstalled $T${CUSTOMCALDIR}/libcustcalc.a"; \ echo "uninstalled ${T}${CUSTOMCALDIR}/libcustcalc.a"; \
fi; \ fi; \
fi fi
-${Q}for i in ${CUSTOM_HELP} /dev/null; do \ -${Q} for i in ${CUSTOM_HELP} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if [ -f "$T${CUSTOMHELPDIR}/$$i" ]; then \ if [ -f "${T}${CUSTOMHELPDIR}/$$i" ]; then \
rm -f "$T${CUSTOMHELPDIR}/$$i"; \ ${RM} -f "${T}${CUSTOMHELPDIR}/$$i"; \
if [ -f "$T${CUSTOMHELPDIR}/$$i" ]; then \ if [ -f "${T}${CUSTOMHELPDIR}/$$i" ]; then \
echo "cannot uninstall $T${CUSTOMHELPDIR}/$$i"; \ echo "cannot uninstall ${T}${CUSTOMHELPDIR}/$$i"; \
else \ else \
echo "uninstalled $T${CUSTOMHELPDIR}/$$i"; \ echo "uninstalled ${T}${CUSTOMHELPDIR}/$$i"; \
fi; \ fi; \
fi; \ fi; \
done done
-${Q}for i in ${CUSTOM_CALC_FILES} /dev/null; do \ -${Q} for i in ${CUSTOM_CALC_FILES} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if [ -f "$T${CUSTOMCALDIR}/$$i" ]; then \ if [ -f "${T}${CUSTOMCALDIR}/$$i" ]; then \
rm -f "$T${CUSTOMCALDIR}/$$i"; \ ${RM} -f "${T}${CUSTOMCALDIR}/$$i"; \
if [ -f "$T${CUSTOMCALDIR}/$$i" ]; then \ if [ -f "${T}${CUSTOMCALDIR}/$$i" ]; then \
echo "cannot uninstall $T${CUSTOMCALDIR}/$$i"; \ echo "cannot uninstall ${T}${CUSTOMCALDIR}/$$i"; \
else \ else \
echo "uninstalled $T${CUSTOMCALDIR}/$$i"; \ echo "uninstalled ${T}${CUSTOMCALDIR}/$$i"; \
fi; \ fi; \
fi; \ fi; \
done done
-${Q}for i in ${INSTALL_H_SRC} /dev/null; do \ -${Q} for i in ${INSTALL_H_SRC} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if [ -f "$T${CUSTOMINCDIR}/$$i" ]; then \ if [ -f "${T}${CUSTOMINCDIR}/$$i" ]; then \
rm -f "$T${CUSTOMINCDIR}/$$i"; \ ${RM} -f "${T}${CUSTOMINCDIR}/$$i"; \
if [ -f "$T${CUSTOMINCDIR}/$$i" ]; then \ if [ -f "${T}${CUSTOMINCDIR}/$$i" ]; then \
echo "cannot uninstall $T${CUSTOMINCDIR}/$$i"; \ echo "cannot uninstall ${T}${CUSTOMINCDIR}/$$i"; \
else \ else \
echo "uninstalled $T${CUSTOMINCDIR}/$$i"; \ echo "uninstalled ${T}${CUSTOMINCDIR}/$$i"; \
fi; \ fi; \
fi; \ fi; \
done done
-${Q}for i in ${CUSTOMINCDIR} ${CUSTOMHELPDIR} ${CUSTOMCALDIR} \ -${Q} for i in ${CUSTOMINCDIR} ${CUSTOMHELPDIR} ${CUSTOMCALDIR} \
${HELPDIR} ${CALC_INCDIR} ${CALC_SHAREDIR} ${INCDIR}; do \ ${HELPDIR} ${CALC_INCDIR} ${CALC_SHAREDIR} ${INCDIR}; do \
if [ -d "$T$$i" ]; then \ if [ -d "${T}$$i" ]; then \
rmdir "$T$$i" 2>/dev/null; \ ${RMDIR} "${T}$$i" 2>/dev/null; \
echo "cleaned up $T$$i"; \ echo "cleaned up ${T}$$i"; \
fi; \ fi; \
done done

View File

@@ -17,8 +17,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc. * received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
* *
* @(#) $Revision: 29.11 $ * @(#) $Revision: 29.12 $
* @(#) $Id: c_sysinfo.c,v 29.11 2006/05/22 19:04:45 chongo Exp $ * @(#) $Id: c_sysinfo.c,v 29.12 2006/09/18 06:28:47 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_sysinfo.c,v $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_sysinfo.c,v $
* *
* Under source code control: 1997/03/09 23:14:40 * Under source code control: 1997/03/09 23:14:40
@@ -85,7 +85,6 @@ static struct infoname sys_info[] = {
{"DEFAULTSHELL", "default shell to use", DEFAULTSHELL, (FULL)0}, {"DEFAULTSHELL", "default shell to use", DEFAULTSHELL, (FULL)0},
{"DEV_BITS", "device number size in bits", NULL, (FULL)DEV_BITS}, {"DEV_BITS", "device number size in bits", NULL, (FULL)DEV_BITS},
{"DISPLAY_DEFAULT", "default digits for float display", NULL, (FULL)DISPLAY_DEFAULT}, {"DISPLAY_DEFAULT", "default digits for float display", NULL, (FULL)DISPLAY_DEFAULT},
{"ECHO_PROG", "where the echo command is located", ECHO_PROG, (FULL)0},
{"EPSILONPREC_DEFAULT", "2^-EPSILON_DEFAULT <= EPSILON_DEFAULT", NULL, (FULL)EPSILONPREC_DEFAULT}, {"EPSILONPREC_DEFAULT", "2^-EPSILON_DEFAULT <= EPSILON_DEFAULT", NULL, (FULL)EPSILONPREC_DEFAULT},
{"EPSILON_DEFAULT", "allowed error for float calculations", EPSILON_DEFAULT, (FULL)0}, {"EPSILON_DEFAULT", "allowed error for float calculations", EPSILON_DEFAULT, (FULL)0},
{"ERRMAX", "default errmax value", NULL, (FULL)ERRMAX}, {"ERRMAX", "default errmax value", NULL, (FULL)ERRMAX},

View File

@@ -2,7 +2,7 @@
# #
# help - makefile for calc help files # help - makefile for calc help files
# #
# Copyright (C) 1999-2002 Landon Curt Noll # Copyright (C) 1999-2006 Landon Curt Noll
# #
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
@@ -18,8 +18,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc. # received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# #
# @(#) $Revision: 29.30 $ # @(#) $Revision: 29.34 $
# @(#) $Id: Makefile,v 29.30 2006/08/20 15:01:57 chongo Exp $ # @(#) $Id: Makefile,v 29.34 2006/09/18 13:13:25 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/help/RCS/Makefile,v $ # @(#) $Source: /usr/local/src/cmd/calc/help/RCS/Makefile,v $
# #
# Under source code control: 1991/07/23 06:47:57 # Under source code control: 1991/07/23 06:47:57
@@ -34,7 +34,7 @@
# required vars # required vars
# #
SHELL= /bin/sh SHELL= /bin/sh
MAKE_FILE = Makefile MAKE_FILE= Makefile
#### ####
# Normally, the upper level makefile will set these values. We provide # Normally, the upper level makefile will set these values. We provide
@@ -62,9 +62,9 @@ INCDIR= /usr/include
# ${LIBDIR} where calc link library (*.a) files are installed # ${LIBDIR} where calc link library (*.a) files are installed
# ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files # ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files
# #
# NOTE: The install rule prepends installation paths with $T, which # NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If $T is non-empty, then installation # by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the $T directory. # locations will be relative to the ${T} directory.
# #
# For DJGPP, select: # For DJGPP, select:
# #
@@ -99,9 +99,9 @@ CALC_SHAREDIR= /usr/share/calc
# ${CUSTOMINCPDIR} where custom .h files are installed # ${CUSTOMINCPDIR} where custom .h files are installed
# ${SCRIPTDIR} where calc shell scripts are installed # ${SCRIPTDIR} where calc shell scripts are installed
# #
# NOTE: The install rule prepends installation paths with $T, which # NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If $T is non-empty, then installation # by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the $T directory. # locations will be relative to the ${T} directory.
# #
# If in doubt, set: # If in doubt, set:
# #
@@ -121,8 +121,8 @@ SCRIPTDIR= ${BINDIR}/cscript
# T - top level directory under which calc will be installed # T - top level directory under which calc will be installed
# #
# The calc install is performed under $T, the calc build is # The calc install is performed under ${T}, the calc build is
# performed under /. The purpose for $T is to allow someone # performed under /. The purpose for ${T} is to allow someone
# to install calc somewhere other than into the system area. # to install calc somewhere other than into the system area.
# #
# For example, if: # For example, if:
@@ -142,10 +142,10 @@ SCRIPTDIR= ${BINDIR}/cscript
# calc help, .cal ...: /var/tmp/testing/usr/share/calc # calc help, .cal ...: /var/tmp/testing/usr/share/calc
# ... etc ... /var/tmp/testing/... # ... etc ... /var/tmp/testing/...
# #
# If $T is empty, calc is installed under /, which is the same # If ${T} is empty, calc is installed under /, which is the same
# top of tree for which it was built. If $T is non-empty, then # top of tree for which it was built. If ${T} is non-empty, then
# calc is installed under $T, as if one had to chroot under # calc is installed under ${T}, as if one had to chroot under
# $T for calc to operate. # ${T} for calc to operate.
# #
# If in doubt, use T= # If in doubt, use T=
# #
@@ -169,6 +169,14 @@ SED= sed
SORT= sort SORT= sort
FMT= fmt FMT= fmt
CMP= cmp CMP= cmp
CP= cm
MV= mv
TRUE= true
RM= rm
MKDIR= mkdir
RMDIR= rmdir
TOUCH= touch
CAT= cat
# Some out of date operating systems require / want an executable to # Some out of date operating systems require / want an executable to
# end with a certain file extension. Some compile systems such as # end with a certain file extension. Some compile systems such as
@@ -269,7 +277,7 @@ DETAIL_HELP= abs access acos acosh acot acoth acsc acsch address agd append \
appr arg argv arrow asec asech asin asinh assign atan atan2 atanh \ appr arg argv arrow asec asech asin asinh assign atan atan2 atanh \
avg base base2 bernoulli bit blk blkcpy blkfree blocks bround \ avg base base2 bernoulli bit blk blkcpy blkfree blocks bround \
btrunc calc_tty calclevel catalan ceil cfappr cfsim char cmdbuf \ btrunc calc_tty calclevel catalan ceil cfappr cfsim char cmdbuf \
cmp comb conj cos cosh cot coth count cp csc csch ctime delete den \ cmp comb conj cos cosh cot coth count ${CP} csc csch ctime delete den \
dereference det digit digits display dp epsilon errcount errmax \ dereference det digit digits display dp epsilon errcount errmax \
errno error estr euler eval exp fact factor fclose fcnt feof ferror \ errno error estr euler eval exp fact factor fclose fcnt feof ferror \
fflush fgetc fgetfield fgetfile fgetline fgets fgetstr fib files \ fflush fgetc fgetfield fgetfile fgetline fgets fgetstr fib files \
@@ -287,7 +295,7 @@ DETAIL_HELP= abs access acos acosh acot acoth acsc acsch address agd append \
param perm pfact pi pix places pmod polar poly pop popcnt power \ param perm pfact pi pix places pmod polar poly pop popcnt power \
prevcand prevprime printf prompt protect ptest push putenv quo \ prevcand prevprime printf prompt protect ptest push putenv quo \
quomod rand randbit random randombit randperm rcin rcmul rcout \ quomod rand randbit random randombit randperm rcin rcmul rcout \
rcpow rcsq re remove reverse rewind rm root round rsearch runtime \ rcpow rcsq re remove reverse rewind ${RM} root round rsearch runtime \
saveval scale scan scanf search sec sech seed segment select sgn \ saveval scale scan scanf search sec sech seed segment select sgn \
sha sha1 sin sinh size sizeof sleep sort sqrt srand srandom ssq \ sha sha1 sin sinh size sizeof sleep sort sqrt srand srandom ssq \
str strcat strcmp strcpy strerror strlen strncmp strncpy strpos \ str strcat strcmp strcpy strerror strlen strncmp strncpy strpos \
@@ -325,175 +333,175 @@ all: ${FULL_HELP_FILES} full ${DETAIL_HELP} ${DETAIL_CLONE} \
# an non-emoty else clause for every if condition. *sigh* # an non-emoty else clause for every if condition. *sigh*
# #
.all: .all:
rm -f .all ${RM} -f .all
touch .all ${TOUCH} .all
bindings: ../cal/bindings bindings: ../cal/bindings
rm -f $@ ${RM} -f $@
cp ../cal/bindings $@ ${CP} ../cal/bindings $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
resource: ../cal/README resource: ../cal/README
rm -f $@ ${RM} -f $@
cp ../cal/README $@ ${CP} ../cal/README $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
changes: ../CHANGES changes: ../CHANGES
rm -f $@ ${RM} -f $@
cp ../CHANGES $@ ${CP} ../CHANGES $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
libcalc: ../LIBRARY libcalc: ../LIBRARY
rm -f $@ ${RM} -f $@
${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' \ ${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' \
-e 's:$${CALC_INCDIR}:${CALC_INCDIR}:g' < ../LIBRARY > $@ -e 's:$${CALC_INCDIR}:${CALC_INCDIR}:g' < ../LIBRARY > $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
bugs: ../BUGS bugs: ../BUGS
rm -f $@ ${RM} -f $@
cp ../BUGS $@ ${CP} ../BUGS $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
errorcodes: ../calcerr.h errorcodes.hdr errorcodes.sed errorcodes: ../calcerr.h errorcodes.hdr errorcodes.sed
rm -f $@ ${RM} -f $@
cat errorcodes.hdr > $@ ${CAT} errorcodes.hdr > $@
${SED} -n -f errorcodes.sed < ../calcerr.h >> $@ ${SED} -n -f errorcodes.sed < ../calcerr.h >> $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
calc: usage calc: usage
rm -f $@ ${RM} -f $@
cp usage $@ ${CP} usage $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
custom_cal: ../custom/CUSTOM_CAL custom_cal: ../custom/CUSTOM_CAL
rm -f $@ ${RM} -f $@
cp ../custom/CUSTOM_CAL $@ ${CP} ../custom/CUSTOM_CAL $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
new_custom: ../custom/HOW_TO_ADD new_custom: ../custom/HOW_TO_ADD
rm -f $@ ${RM} -f $@
cp ../custom/HOW_TO_ADD $@ ${CP} ../custom/HOW_TO_ADD $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
copy: blkcpy copy: blkcpy
rm -f $@ ${RM} -f $@
cp blkcpy $@ ${CP} blkcpy $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
COPYING: ../COPYING COPYING: ../COPYING
rm -f $@ ${RM} -f $@
cp ../COPYING $@ ${CP} ../COPYING $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
COPYING-LGPL: ../COPYING-LGPL COPYING-LGPL: ../COPYING-LGPL
rm -f $@ ${RM} -f $@
cp ../COPYING-LGPL $@ ${CP} ../COPYING-LGPL $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
cscript: ../cscript/README cscript: ../cscript/README
rm -f $@ ${RM} -f $@
cp ../cscript/README $@ ${CP} ../cscript/README $@
${CHMOD} 0444 $@ ${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
full: ${FULL_HELP_FILES} ${MAKE_FILE} full: ${FULL_HELP_FILES} ${MAKE_FILE}
${Q}echo "forming full" ${Q} echo "forming full"
-${Q}rm -f $@ -${Q} ${RM} -f $@
-${Q}for i in ${FULL_HELP_FILES}; do \ -${Q} for i in ${FULL_HELP_FILES}; do \
if [ Xintro != X"$$i" ]; then \ if [ Xintro != X"$$i" ]; then \
echo " "; \ echo " "; \
else \ else \
true; \ ${TRUE}; \
fi; \ fi; \
if [ Xobj.file = X"$$i" ]; then \ if [ Xobj.file = X"$$i" ]; then \
j=obj; \ j=obj; \
@@ -504,34 +512,34 @@ full: ${FULL_HELP_FILES} ${MAKE_FILE}
echo "* $$j"; \ echo "* $$j"; \
echo "*************"; \ echo "*************"; \
echo ""; \ echo ""; \
cat $$i; \ ${CAT} $$i; \
done > $@ done > $@
${Q}echo "full formed" ${Q} echo "full formed"
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
# Singular files are the same files as their plural form. # Singular files are the same files as their plural form.
# #
${SINGULAR_FILES}: ${PLURAL_FILES} ${SINGULAR_FILES}: ${PLURAL_FILES}
${Q}for i in ${SINGULAR_FILES} /dev/null; do \ ${Q} for i in ${SINGULAR_FILES} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo "rm -f $${i}"; \ echo "${RM} -f $${i}"; \
rm -f $${i}; \ ${RM} -f $${i}; \
echo "cp $${i}s $${i}"; \ echo "${CP} $${i}s $${i}"; \
cp $${i}s $${i}; \ ${CP} $${i}s $${i}; \
fi; \ fi; \
done done
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/SINGULAR_FILES =-=-='; \ echo '=-=-= skipping the ${CAT} of help/SINGULAR_FILES =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
# Form the builtin file # Form the builtin file
@@ -553,25 +561,25 @@ ${SINGULAR_FILES}: ${PLURAL_FILES}
# do not treat -I.. correctly! # do not treat -I.. correctly!
# #
builtin: builtin.top builtin.end ../func.c funclist.sed builtin: builtin.top builtin.end ../func.c funclist.sed
${Q}echo "forming builtin help file" ${Q} echo "forming builtin help file"
-${Q}rm -f funclist.c -${Q} ${RM} -f funclist.c
${Q}${SED} -n -f funclist.sed ../func.c > funclist.c ${Q} ${SED} -n -f funclist.sed ../func.c > funclist.c
-${Q}rm -f funclist.o funclist${EXT} -${Q} ${RM} -f funclist.o funclist${EXT}
${Q}${LCC} ${ICFLAGS} -DFUNCLIST -I/usr/include \ ${Q} ${LCC} ${ICFLAGS} -DFUNCLIST -I/usr/include \
-I.. funclist.c -c 2>/dev/null -I.. funclist.c -c 2>/dev/null
${Q}${LCC} ${ILDFLAGS} funclist.o -o funclist${EXT} ${Q} ${LCC} ${ILDFLAGS} funclist.o -o funclist${EXT}
-${Q}rm -f builtin -${Q} ${RM} -f builtin
${Q}cat builtin.top > builtin ${Q} ${CAT} builtin.top > builtin
${Q}./funclist${EXT} | \ ${Q} ./funclist${EXT} | \
${SED} -e 's/^/ /' -e 's/[ ][ ]*$$//' >> builtin ${SED} -e 's/^/ /' -e 's/[ ][ ]*$$//' >> builtin
${Q}cat builtin.end >> builtin ${Q} ${CAT} builtin.end >> builtin
${Q}echo "builtin help file formed" ${Q} echo "builtin help file formed"
-@if [ -z "${Q}" ]; then \ -@if [ -z "${Q}" ]; then \
echo ''; \ echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \ echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
echo ''; \ echo ''; \
else \ else \
true; \ ${TRUE}; \
fi fi
## ##
@@ -585,17 +593,17 @@ builtin: builtin.top builtin.end ../func.c funclist.sed
## ##
distlist: ${DISTLIST} distlist: ${DISTLIST}
${Q}for i in ${DISTLIST} /dev/null; do \ ${Q} for i in ${DISTLIST} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo help/$$i; \ echo help/$$i; \
fi; \ fi; \
done | LANG=C ${SORT} done | LANG=C ${SORT}
distdir: distdir:
${Q}echo help ${Q} echo help
calcliblist: calcliblist:
${Q}for i in ${CALCLIBLIST} /dev/null; do \ ${Q} for i in ${CALCLIBLIST} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo help/$$i; \ echo help/$$i; \
fi; \ fi; \
@@ -606,21 +614,21 @@ calcliblist:
# ignore this rule. # ignore this rule.
# #
bsdi: all bsdi: all
rm -f obj ${RM} -f obj
cp obj.file obj ${CP} obj.file obj
# These next rule help me form the ${DETAIL_HELP} makefile variables above. # These next rule help me form the ${DETAIL_HELP} makefile variables above.
# #
detaillist: detaillist:
${Q}-(echo "xxxxx"; \ ${Q} -(echo "xxxxx"; \
for i in ${DETAIL_HELP} /dev/null; do \ for i in ${DETAIL_HELP} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
if [ ! -f RCS/$$i,v ]; then \ if [ ! -f RCS/$$i,v ]; then \
echo "WARNING: $$i not under RCS control" 1>&2; \ echo "WARNING: $$i not under RCS control" 1>&2; \
else \ else \
echo $$i; \ echo $$i; \
fi; \
fi; \ fi; \
fi; \
done | LANG=C ${SORT}) | ${FMT} -70 | \ done | LANG=C ${SORT}) | ${FMT} -70 | \
${SED} -e '1s/xxxxx/DETAIL_HELP=/' -e '2,$$s/^/ /' \ ${SED} -e '1s/xxxxx/DETAIL_HELP=/' -e '2,$$s/^/ /' \
-e 's/$$/ \\/' -e '$$s/ \\$$//' -e 's/$$/ \\/' -e '$$s/ \\$$//'
@@ -632,13 +640,13 @@ detaillist:
## ##
echo_inst_files: echo_inst_files:
${Q}for i in ${STD_HELP_FILES} full ${BLT_HELP_FILES} \ ${Q} for i in ${STD_HELP_FILES} full ${BLT_HELP_FILES} \
builtin ${DETAIL_HELP} ${SINGULAR_FILES} /dev/null; do \ builtin ${DETAIL_HELP} ${SINGULAR_FILES} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo __file__ ${HELPDIR}/$$i; \ echo __file__ ${HELPDIR}/$$i; \
fi; \ fi; \
done done
${Q}echo __file__ ${HELPDIR}/obj ${Q} echo __file__ ${HELPDIR}/obj
## ##
# #
@@ -647,67 +655,67 @@ echo_inst_files:
## ##
clean: clean:
rm -f obj mkbuiltin funclist.c funclist.o funclist${EXT} ${RM} -f obj mkbuiltin funclist.c funclist.o funclist${EXT}
rm -f COPYING COPYING-LGPL ${RM} -f COPYING COPYING-LGPL
clobber: clobber:
rm -f ${BLT_HELP_FILES} full .all calc ${RM} -f ${BLT_HELP_FILES} full .all calc
rm -f obj mkbuiltin funclist.c funclist.o funclist${EXT} ${RM} -f obj mkbuiltin funclist.c funclist.o funclist${EXT}
rm -f COPYING COPYING-LGPL ${RM} -f COPYING COPYING-LGPL
rm -f ${SINGULAR_FILES} ${DETAIL_CLONE} ${RM} -f ${SINGULAR_FILES} ${DETAIL_CLONE}
# install everything # install everything
# #
# NOTE: Keep the uninstall rule in reverse order to the install rule # NOTE: Keep the uninstall rule in reverse order to the install rule
# #
install: all install: all
-${Q}if [ ! -d $T${CALC_SHAREDIR} ]; then \ -${Q} if [ ! -d ${T}${CALC_SHAREDIR} ]; then \
echo mkdir $T${CALC_SHAREDIR}; \ echo ${MKDIR} ${T}${CALC_SHAREDIR}; \
mkdir $T${CALC_SHAREDIR}; \ ${MKDIR} ${T}${CALC_SHAREDIR}; \
if [ ! -d "$T${CALC_SHAREDIR}" ]; then \ if [ ! -d "${T}${CALC_SHAREDIR}" ]; then \
echo mkdir -p "$T${CALC_SHAREDIR}"; \ echo ${MKDIR} -p "${T}${CALC_SHAREDIR}"; \
mkdir -p "$T${CALC_SHAREDIR}"; \ ${MKDIR} -p "${T}${CALC_SHAREDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${CALC_SHAREDIR}; \ echo ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \
${CHMOD} 0755 $T${CALC_SHAREDIR}; \ ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}if [ ! -d $T${HELPDIR} ]; then \ -${Q} if [ ! -d ${T}${HELPDIR} ]; then \
echo mkdir $T${HELPDIR}; \ echo ${MKDIR} ${T}${HELPDIR}; \
mkdir $T${HELPDIR}; \ ${MKDIR} ${T}${HELPDIR}; \
if [ ! -d "$T${HELPDIR}" ]; then \ if [ ! -d "${T}${HELPDIR}" ]; then \
echo mkdir -p "$T${HELPDIR}"; \ echo ${MKDIR} -p "${T}${HELPDIR}"; \
mkdir -p "$T${HELPDIR}"; \ ${MKDIR} -p "${T}${HELPDIR}"; \
fi; \ fi; \
echo ${CHMOD} 0755 $T${HELPDIR}; \ echo ${CHMOD} 0755 ${T}${HELPDIR}; \
${CHMOD} 0755 $T${HELPDIR}; \ ${CHMOD} 0755 ${T}${HELPDIR}; \
else \ else \
true; \ ${TRUE}; \
fi fi
-${Q}for i in ${STD_HELP_FILES} ${BLT_HELP_FILES} builtin \ -${Q} for i in ${STD_HELP_FILES} ${BLT_HELP_FILES} builtin \
full ${DETAIL_HELP} ${SINGULAR_FILES} /dev/null; do \ full ${DETAIL_HELP} ${SINGULAR_FILES} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if ${CMP} -s $$i $T${HELPDIR}/$$i; then \ if ${CMP} -s $$i ${T}${HELPDIR}/$$i; then \
true; \ ${TRUE}; \
else \ else \
rm -f $T${HELPDIR}/$$i.new; \ ${RM} -f ${T}${HELPDIR}/$$i.new; \
cp -f $$i $T${HELPDIR}/$$i.new; \ ${CP} -f $$i ${T}${HELPDIR}/$$i.new; \
${CHMOD} 0444 $T${HELPDIR}/$$i.new; \ ${CHMOD} 0444 ${T}${HELPDIR}/$$i.new; \
mv -f $T${HELPDIR}/$$i.new $T${HELPDIR}/$$i; \ ${MV} -f ${T}${HELPDIR}/$$i.new ${T}${HELPDIR}/$$i; \
echo "installed $T${HELPDIR}/$$i"; \ echo "installed ${T}${HELPDIR}/$$i"; \
fi; \ fi; \
done done
-${Q}if ${CMP} -s obj.file $T${HELPDIR}/obj; then \ -${Q} if ${CMP} -s obj.file ${T}${HELPDIR}/obj; then \
true; \ ${TRUE}; \
else \ else \
rm -f $T${HELPDIR}/obj.new; \ ${RM} -f ${T}${HELPDIR}/obj.new; \
cp -f obj.file $T${HELPDIR}/obj.new; \ ${CP} -f obj.file ${T}${HELPDIR}/obj.new; \
${CHMOD} 0444 $T${HELPDIR}/obj.new; \ ${CHMOD} 0444 ${T}${HELPDIR}/obj.new; \
mv -f $T${HELPDIR}/obj.new $T${HELPDIR}/obj; \ ${MV} -f ${T}${HELPDIR}/obj.new ${T}${HELPDIR}/obj; \
echo "installed $T${HELPDIR}/obj"; \ echo "installed ${T}${HELPDIR}/obj"; \
fi fi
# Try to remove everything that was installed # Try to remove everything that was installed
@@ -715,31 +723,31 @@ install: all
# NOTE: Keep the uninstall rule in reverse order to the install rule # NOTE: Keep the uninstall rule in reverse order to the install rule
# #
uninstall: uninstall:
-${Q}if [ -f "$T${HELPDIR}/obj" ]; then \ -${Q} if [ -f "${T}${HELPDIR}/obj" ]; then \
rm -f "$T${HELPDIR}/obj"; \ ${RM} -f "${T}${HELPDIR}/obj"; \
if [ -f "$T${HELPDIR}/obj" ]; then \ if [ -f "${T}${HELPDIR}/obj" ]; then \
echo "cannot uninstall $T${HELPDIR}/obj"; \ echo "cannot uninstall ${T}${HELPDIR}/obj"; \
else \ else \
echo "uninstalled $T${HELPDIR}/obj"; \ echo "uninstalled ${T}${HELPDIR}/obj"; \
fi; \ fi; \
fi fi
-${Q}for i in ${SINGULAR_FILES} ${DETAIL_HELP} full builtin \ -${Q} for i in ${SINGULAR_FILES} ${DETAIL_HELP} full builtin \
${BLT_HELP_FILES} ${STD_HELP_FILES} /dev/null; do \ ${BLT_HELP_FILES} ${STD_HELP_FILES} /dev/null; do \
if [ "$$i" = "/dev/null" ]; then \ if [ "$$i" = "/dev/null" ]; then \
continue; \ continue; \
fi; \ fi; \
if [ -f "$T${HELPDIR}/$$i" ]; then \ if [ -f "${T}${HELPDIR}/$$i" ]; then \
rm -f "$T${HELPDIR}/$$i"; \ ${RM} -f "${T}${HELPDIR}/$$i"; \
if [ -f "$T${HELPDIR}/$$i" ]; then \ if [ -f "${T}${HELPDIR}/$$i" ]; then \
echo "cannot uninstall $T${HELPDIR}/$$i"; \ echo "cannot uninstall ${T}${HELPDIR}/$$i"; \
else \ else \
echo "uninstalled $T${HELPDIR}/$$i"; \ echo "uninstalled ${T}${HELPDIR}/$$i"; \
fi; \ fi; \
fi; \ fi; \
done done
-${Q}for i in ${HELPDIR} ${CALC_SHAREDIR}; do \ -${Q} for i in ${HELPDIR} ${CALC_SHAREDIR}; do \
if [ -d "$T$$i" ]; then \ if [ -d "${T}$$i" ]; then \
rmdir "$T$$i" 2>/dev/null; \ ${RMDIR} "${T}$$i" 2>/dev/null; \
echo "cleaned up $T$$i"; \ echo "cleaned up ${T}$$i"; \
fi; \ fi; \
done done

93
rpm.mk
View File

@@ -19,8 +19,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc. # received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# #
MAKEFILE_REV= $$Revision: 29.14 $$ MAKEFILE_REV= $$Revision: 29.16 $$
# @(#) $Id: rpm.mk,v 29.14 2006/08/20 16:47:51 chongo Exp $ # @(#) $Id: rpm.mk,v 29.16 2006/09/18 06:33:50 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/RCS/rpm.mk,v $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/rpm.mk,v $
# #
# Under source code control: 2003/02/16 20:21:39 # Under source code control: 2003/02/16 20:21:39
@@ -42,6 +42,16 @@ RPM_TOOL= rpm
MD5SUM= md5sum MD5SUM= md5sum
SHA1SUM= sha1sum SHA1SUM= sha1sum
SED= sed SED= sed
FIND= find
GZIP_PROG= gzip
TAR= tar
RM= rm
LS= ls
CPIO= cpio
CP= cp
EGREP= egrep
MKDIR= mkdir
GREP= GREP
# rpm-related parameters # rpm-related parameters
# #
@@ -50,7 +60,7 @@ PROJECT_VERSION=
PROJECT_RELEASE= PROJECT_RELEASE=
PROJECT= $(PROJECT_NAME)-$(PROJECT_VERSION) PROJECT= $(PROJECT_NAME)-$(PROJECT_VERSION)
SPECFILE= $(PROJECT_NAME).spec SPECFILE= $(PROJECT_NAME).spec
TARBALL= $(PROJECT).tar.gz TARBALL= $(PROJECT).${TAR}.gz
RPM686= $(PROJECT)-$(PROJECT_RELEASE).${TARCH}.rpm RPM686= $(PROJECT)-$(PROJECT_RELEASE).${TARCH}.rpm
DRPM686= $(PROJECT_NAME)-devel-$(PROJECT_VERSION)-$(PROJECT_RELEASE).${TARCH}.rpm DRPM686= $(PROJECT_NAME)-devel-$(PROJECT_VERSION)-$(PROJECT_RELEASE).${TARCH}.rpm
SRPM= $(PROJECT)-$(PROJECT_RELEASE).src.rpm SRPM= $(PROJECT)-$(PROJECT_RELEASE).src.rpm
@@ -62,7 +72,7 @@ all: calc.spec ver_calc
PROJECT_RELEASE="`${SED} -n -e '/^Release:/s/^Release: *//p' \ PROJECT_RELEASE="`${SED} -n -e '/^Release:/s/^Release: *//p' \
calc.spec.in`" rpm calc.spec.in`" rpm
pkgme: $(PROJECT_NAME)-spec.tar.gz pkgme: $(PROJECT_NAME)-spec.${TAR}.gz
ver_calc: ver_calc:
$(MAKE) -f Makefile ver_calc $(MAKE) -f Makefile ver_calc
@@ -72,26 +82,26 @@ vers:
$(MAKE) -f Makefile ver_calc $(MAKE) -f Makefile ver_calc
calc.spec: calc.spec.in ver_calc calc.spec: calc.spec.in ver_calc
rm -f calc.spec ${RM} -f calc.spec
${SED} -e 's/<<<PROJECT_VERSION>>>/'"`./ver_calc`"/g \ ${SED} -e 's/<<<PROJECT_VERSION>>>/'"`./ver_calc`"/g \
calc.spec.in > calc.spec calc.spec.in > calc.spec
.PHONY: srcpkg .PHONY: srcpkg
srcpkg: make_rhdir srcpkg: make_rhdir
find . -depth -print | egrep -v '/RCS|/CVS|/NOTES|\.gone' | \ ${FIND} . -depth -print | ${EGREP} -v '/RCS|/CVS|/NOTES|\.gone' | \
cpio -dumpv $(TMPDIR)/$(PROJECT) ${CPIO} -dumpv "$(TMPDIR)/$(PROJECT)"
(cd $(TMPDIR); tar cf - $(PROJECT)) | \ (cd "$(TMPDIR)"; ${TAR} cf - "$(PROJECT)") | \
gzip -c > $(RPMDIR)/SOURCES/$(TARBALL) ${GZIP_PROG} -c > "$(RPMDIR)/SOURCES/$(TARBALL)"
rm -fr $(TMPDIR)/$(PROJECT) ${RM} -fr "$(TMPDIR)/$(PROJECT)"
.PHONY: rpm .PHONY: rpm
rpm: srcpkg calc.spec rpm: srcpkg calc.spec
$(MAKE) -f Makefile clean $(MAKE) -f Makefile clean
cp $(SPECFILE) $(RPMDIR)/SPECS/$(SPECFILE) ${CP} "$(SPECFILE)" "$(RPMDIR)/SPECS/$(SPECFILE)"
rm -f $(RPMDIR)/RPMS/${TARCH}/$(RPM686) ${RM} -f "$(RPMDIR)/RPMS/${TARCH}/$(RPM686)"
rm -f $(RPMDIR)/RPMS/${TARCH}/$(DRPM686) ${RM} -f "$(RPMDIR)/RPMS/${TARCH}/$(DRPM686)"
rm -f $(RPMDIR)/SRPMS/$(SRPM) ${RM} -f "$(RPMDIR)/SRPMS/$(SRPM)"
${RPMBUILD_TOOL} ${RPMBUILD_OPTION} $(RPMDIR)/SPECS/$(SPECFILE) ${RPMBUILD_TOOL} ${RPMBUILD_OPTION} "$(RPMDIR)/SPECS/$(SPECFILE)"
@if [ ! -f "$(RPMDIR)/SRPMS/$(SRPM)" ]; then \ @if [ ! -f "$(RPMDIR)/SRPMS/$(SRPM)" ]; then \
echo "SRPMS/$(SRPM) not found" 1>&2; \ echo "SRPMS/$(SRPM) not found" 1>&2; \
exit 3; \ exit 3; \
@@ -99,33 +109,33 @@ rpm: srcpkg calc.spec
@echo @echo
@echo "RPM package sizes:" @echo "RPM package sizes:"
@echo @echo
@cd $(RPMDIR); ls -1s RPMS/${TARCH}/$(RPM686) \ @cd $(RPMDIR); ${LS} -1s "RPMS/${TARCH}/$(RPM686)" \
RPMS/${TARCH}/$(DRPM686) SRPMS/$(SRPM) "RPMS/${TARCH}/$(DRPM686)" "SRPMS/$(SRPM)"
@echo @echo
@echo "RPM package md5 hashes:" @echo "RPM package md5 hashes:"
@echo @echo
-@cd $(RPMDIR); ${MD5SUM} RPMS/${TARCH}/$(RPM686) \ -@cd $(RPMDIR); ${MD5SUM} "RPMS/${TARCH}/$(RPM686)" \
RPMS/${TARCH}/$(DRPM686) SRPMS/$(SRPM) "RPMS/${TARCH}/$(DRPM686)" "SRPMS/$(SRPM)"
@echo @echo
@echo "RPM package sha1 hashes:" @echo "RPM package sha1 hashes:"
@echo @echo
-@cd $(RPMDIR); ${SHA1SUM} RPMS/${TARCH}/$(RPM686) \ -@cd $(RPMDIR); ${SHA1SUM} "RPMS/${TARCH}/$(RPM686)" \
RPMS/${TARCH}/$(DRPM686) SRPMS/$(SRPM) "RPMS/${TARCH}/$(DRPM686)" "SRPMS/$(SRPM)"
@echo @echo
@echo "RPM package locations:" @echo "RPM package locations:"
@echo @echo
@ls -1 $(RPMDIR)/RPMS/${TARCH}/$(RPM686) \ @${LS} -1 "$(RPMDIR)/RPMS/${TARCH}/$(RPM686)" \
$(RPMDIR)/RPMS/${TARCH}/$(DRPM686) $(RPMDIR)/SRPMS/$(SRPM) "$(RPMDIR)/RPMS/${TARCH}/$(DRPM686)" "$(RPMDIR)/SRPMS/$(SRPM)"
@echo @echo
@echo "All done! -- Jessica Noll, Age 2" @echo "All done! -- Jessica Noll, Age 2"
@echo @echo
.PHONY: make_rhdir .PHONY: make_rhdir
make_rhdir: make_rhdir:
for i in $(RPMDIR) $(RPMDIR)/RPMS $(RPMDIR)/SOURCES \ for i in "$(RPMDIR)" "$(RPMDIR)/RPMS" "$(RPMDIR)/SOURCES" \
$(RPMDIR)/SPECS $(RPMDIR)/SRPMS $(RPMDIR)/BUILD; do \ "$(RPMDIR)/SPECS" "$(RPMDIR)/SRPMS" "$(RPMDIR)/BUILD"; do \
if [ ! -d $$i ] ; then \ if [ ! -d "$$i" ] ; then \
mkdir -p $$i; \ ${MKDIR} -p "$$i"; \
fi; \ fi; \
done; done;
@@ -136,20 +146,20 @@ logdate:
.PHONY: chkpkg .PHONY: chkpkg
chkpkg: chkpkg:
for i in $(RPMDIR)/RPMS/${TARCH}/$(RPM686) \ for i in "$(RPMDIR)/RPMS/${TARCH}/$(RPM686)" \
$(RPMDIR)/RPMS/${TARCH}/$(DRPM686) \ "$(RPMDIR)/RPMS/${TARCH}/$(DRPM686)" \
$(RPMDIR)/SRPMS/$(SRPM) ; do \ "$(RPMDIR)/SRPMS/$(SRPM)" ; do \
echo "***** start $$i" ; \ echo "***** start $$i" ; \
${RPM_TOOL} -qpi $$i ; \ ${RPM_TOOL} -qpi "$$"i ; \
echo "***** files $$i" ; \ echo "***** files $$i" ; \
${RPM_TOOL} -qpl $$i ; \ ${RPM_TOOL} -qpl "$$i" ; \
echo "***** end $$i" ; \ echo "***** end $$i" ; \
done ; done ;
.PHONY: chksys .PHONY: chksys
chksys: chksys:
${RPM_TOOL} -qa | grep $(PROJECT_NAME) ${RPM_TOOL} -qa | ${GREP} "$(PROJECT_NAME)"
${RPM_TOOL} -qa | grep $(PROJECT_NAME)-devel ${RPM_TOOL} -qa | ${GREP} "$(PROJECT_NAME)-devel"
.PHONY: test .PHONY: test
test: ver_calc test: ver_calc
@@ -165,8 +175,8 @@ installrpm:
echo "must be root to install RPMs" 1>&2; \ echo "must be root to install RPMs" 1>&2; \
exit 5; \ exit 5; \
fi fi
${RPM_TOOL} -ivh $(RPMDIR)/RPMS/${TARCH}/$(RPM686) ${RPM_TOOL} -ivh "$(RPMDIR)/RPMS/${TARCH}/$(RPM686)"
${RPM_TOOL} -ivh $(RPMDIR)/RPMS/${TARCH}/$(DRPM686) ${RPM_TOOL} -ivh "$(RPMDIR)/RPMS/${TARCH}/$(DRPM686)"
.PHONY: uninstallrpm .PHONY: uninstallrpm
uninstallrpm: uninstallrpm:
@@ -174,10 +184,11 @@ uninstallrpm:
echo "must be root to uninstall RPMs" 1>&2; \ echo "must be root to uninstall RPMs" 1>&2; \
exit 6; \ exit 6; \
fi fi
${RPM_TOOL} -e $(PROJECT_NAME)-devel ${RPM_TOOL} -e "$(PROJECT_NAME)-devel"
${RPM_TOOL} -e $(PROJECT_NAME) ${RPM_TOOL} -e "$(PROJECT_NAME)"
$(PROJECT_NAME)-spec.tar.gz: rpm.mk $(PROJECT_NAME).spec.in $(PROJECT_NAME)-spec.${TAR}.gz: rpm.mk $(PROJECT_NAME).spec.in
tar cf - $^ | gzip -c > $@ ${RM} -f "$@"
${TAR} cf - "$^" | ${GZIP_PROG} -c > "$@"
#**** #****

View File

@@ -1,7 +1,7 @@
# #
# sample - makefile for calc sample programs # sample - makefile for calc sample programs
# #
# Copyright (C) 1999 Landon Curt Noll # Copyright (C) 1999-2006 Landon Curt Noll
# #
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
@@ -17,8 +17,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc. # received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# #
# @(#) $Revision: 29.18 $ # @(#) $Revision: 29.23 $
# @(#) $Id: Makefile,v 29.18 2006/06/26 05:46:06 chongo Exp $ # @(#) $Id: Makefile,v 29.23 2006/09/18 13:13:25 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/sample/RCS/Makefile,v $ # @(#) $Source: /usr/local/src/cmd/calc/sample/RCS/Makefile,v $
# #
# Under source code control: 1997/04/19 22:46:49 # Under source code control: 1997/04/19 22:46:49
@@ -35,7 +35,6 @@
############################################################################## ##############################################################################
# Any .h files that are needed by programs that use libcustcalc.a # Any .h files that are needed by programs that use libcustcalc.a
# Don't put ${REQUIRED_H_SRC} files in this list.
# #
# Put any .h files that you add which might be useful to other # Put any .h files that you add which might be useful to other
# programs here. # programs here.
@@ -43,7 +42,6 @@
SAMPLE_H_SRC= SAMPLE_H_SRC=
# Any .c files that are needed to build libcustcalc.a. # Any .c files that are needed to build libcustcalc.a.
# Don't put ${REQUIRED_SRC} files in this list.
# #
# There MUST be a .c in SAMPLE_SRC for every .o in SAMPLE_OBJ. # There MUST be a .c in SAMPLE_SRC for every .o in SAMPLE_OBJ.
# #
@@ -52,7 +50,6 @@ SAMPLE_H_SRC=
SAMPLE_SRC= many_random.c test_random.c SAMPLE_SRC= many_random.c test_random.c
# Any .o files that are needed by program that use libcustcalc.a. # Any .o files that are needed by program that use libcustcalc.a.
# Don't put ${REQUIRED_OBJ} files in this list.
# #
# There MUST be a .c in SAMPLE_SRC for every .o in SAMPLE_OBJ. # There MUST be a .c in SAMPLE_SRC for every .o in SAMPLE_OBJ.
# #
@@ -101,9 +98,9 @@ INCDIR= /usr/include
# ${LIBDIR} where calc link library (*.a) files are installed # ${LIBDIR} where calc link library (*.a) files are installed
# ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files # ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files
# #
# NOTE: The install rule prepends installation paths with $T, which # NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If $T is non-empty, then installation # by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the $T directory. # locations will be relative to the ${T} directory.
# #
# For DJGPP, select: # For DJGPP, select:
# #
@@ -135,12 +132,12 @@ CALC_SHAREDIR= /usr/share/calc
# ${CALC_INCDIR} where the calc include files are installed # ${CALC_INCDIR} where the calc include files are installed
# ${CUSTOMCALDIR} where custom *.cal files are installed # ${CUSTOMCALDIR} where custom *.cal files are installed
# ${CUSTOMHELPDIR} where custom help files are installed # ${CUSTOMHELPDIR} where custom help files are installed
# ${CUSTOMINCPDIR} where custom .h files are installed # ${CUSTOMINCDIR} where custom .h files are installed
# ${SCRIPTDIR} where calc shell scripts are installed # ${SCRIPTDIR} where calc shell scripts are installed
# #
# NOTE: The install rule prepends installation paths with $T, which # NOTE: The install rule prepends installation paths with ${T}, which
# by default is empty. If $T is non-empty, then installation # by default is empty. If ${T} is non-empty, then installation
# locations will be relative to the $T directory. # locations will be relative to the ${T} directory.
# #
# If in doubt, set: # If in doubt, set:
# #
@@ -160,8 +157,8 @@ SCRIPTDIR= ${BINDIR}/cscript
# T - top level directory under which calc will be installed # T - top level directory under which calc will be installed
# #
# The calc install is performed under $T, the calc build is # The calc install is performed under ${T}, the calc build is
# performed under /. The purpose for $T is to allow someone # performed under /. The purpose for ${T} is to allow someone
# to install calc somewhere other than into the system area. # to install calc somewhere other than into the system area.
# #
# For example, if: # For example, if:
@@ -181,10 +178,10 @@ SCRIPTDIR= ${BINDIR}/cscript
# calc help, .cal ...: /var/tmp/testing/usr/share/calc # calc help, .cal ...: /var/tmp/testing/usr/share/calc
# ... etc ... /var/tmp/testing/... # ... etc ... /var/tmp/testing/...
# #
# If $T is empty, calc is installed under /, which is the same # If ${T} is empty, calc is installed under /, which is the same
# top of tree for which it was built. If $T is non-empty, then # top of tree for which it was built. If ${T} is non-empty, then
# calc is installed under $T, as if one had to chroot under # calc is installed under ${T}, as if one had to chroot under
# $T for calc to operate. # ${T} for calc to operate.
# #
# If in doubt, use T= # If in doubt, use T=
# #
@@ -236,6 +233,20 @@ NO_SHARED=
#NO_SHARED= -dn #NO_SHARED= -dn
#NO_SHARED= -non_shared #NO_SHARED= -non_shared
# On some systems where you are disabling dynamic shared link libs, you may
# need to pass a special flag to ${CC} and ${LCC} during linking stage.
#
# System type NO_SHARED recommendation
#
# IRIX with NO_SHARED= -non_shared LD_NO_SHARED= -Wl,-rdata_shared
# IRIX with NO_SHARED= LD_NO_SHARED=
# others LD_NO_SHARED=
#
# If in doubt, use LD_NO_SHARED=
#
LD_NO_SHARED=
#LD_NO_SHARED= -Wl,-rdata_shared
# Normally, the upper level makefile will set these values. We provide # Normally, the upper level makefile will set these values. We provide
# a default here just in case you want to build from this directory. # a default here just in case you want to build from this directory.
# #
@@ -262,12 +273,22 @@ MAKE_FILE= Makefile
# Normally, the upper level makefile will set these values. We provide # Normally, the upper level makefile will set these values. We provide
# a default here just in case you want to build from this directory. # a default here just in case you want to build from this directory.
# #
# If you do not wish to use purify, leave PURIFY commented out. # If you do not wish to use purify, set PURIFY to an empty string.
# #
# If in doubt, leave PURIFY commented out. # If in doubt, use PURIFY=
# #
#PURIFY= purify -logfile=pure.out #PURIFY= purify -logfile=pure.out
#PURIFY= purify #PURIFY= purify
PURIFY=
# If you want to use a debugging link library such as a malloc debug link
# library, or need to add special ld flags after the calc link libraries
# are included, set ${LD_DEBUG} below.
#
# If in doubt, set LD_DEBUG to empty.
#
#LD_DEBUG= -lmalloc_cv
LD_DEBUG=
# Normally, the upper level makefile will set these values. We provide # Normally, the upper level makefile will set these values. We provide
# a default here just in case you want to build from this directory. # a default here just in case you want to build from this directory.
@@ -364,7 +385,7 @@ CALCLIBLIST= ${C_SRC} ${H_SRC} ${MAKE_FILE} README_SAMPLE
# complete list of targets # complete list of targets
# #
# NOTE: This list MUST be co-ordinated with the ${SAMPLE_TARGETS} variable # NOTE: This list MUST be coordinated with the ${SAMPLE_TARGETS} variable
# in the upper level ../Makefile # in the upper level ../Makefile
# #
SAMPLE_TARGETS= many_random test_random SAMPLE_TARGETS= many_random test_random
@@ -381,6 +402,12 @@ MAKEDEPEND= makedepend
CHMOD= chmod CHMOD= chmod
SORT= sort SORT= sort
CMP= cmp CMP= cmp
TRUE= true
RM= rm
TOUCH= touch
MKDIR= mkdir
MV= mv
CO= co
## ##
# #
@@ -389,7 +416,7 @@ CMP= cmp
## ##
all: ${TARGETS} .all all: ${TARGETS} .all
@true @${TRUE}
test_random.o: test_random.c test_random.o: test_random.c
${CC} ${CFLAGS} ${ALLOW_CUSTOM} test_random.c -c ${CC} ${CFLAGS} ${ALLOW_CUSTOM} test_random.c -c
@@ -412,8 +439,8 @@ many_random: many_random.o ../libcalc.a
# to determine of we have done all # to determine of we have done all
# #
.all: .all:
rm -f .all ${RM} -f .all
touch .all ${TOUCH} .all
## ##
# #
@@ -429,17 +456,17 @@ many_random: many_random.o ../libcalc.a
## ##
distlist: ${DISTLIST} distlist: ${DISTLIST}
${Q}for i in ${DISTLIST} /dev/null; do \ ${Q} for i in ${DISTLIST} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo sample/$$i; \ echo sample/$$i; \
fi; \ fi; \
done done
distdir: distdir:
${Q}echo sample ${Q} echo sample
calcliblist: calcliblist:
${Q}for i in ${CALCLIBLIST} /dev/null; do \ ${Q} for i in ${CALCLIBLIST} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo sample/$$i; \ echo sample/$$i; \
fi; \ fi; \
@@ -458,23 +485,23 @@ calcliblist:
## ##
depend: depend:
${Q}if [ -f Makefile.bak ]; then \ ${Q} if [ -f Makefile.bak ]; then \
echo "Makefile.bak exists, remove or move it out of the way"; \ echo "Makefile.bak exists, remove or move it out of the way"; \
exit 1; \ exit 1; \
else \ else \
true; \ ${TRUE}; \
fi fi
${Q}echo forming sample/skel ${Q} echo forming sample/skel
-${Q}rm -rf skel -${Q} ${RM} -rf skel
${Q}mkdir skel ${Q} ${MKDIR} skel
${Q}mkdir skel/sample ${Q} ${MKDIR} skel/sample
-${Q}for i in ${C_SRC} /dev/null; do \ -${Q} for i in ${C_SRC} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
${SED} -n '/^#[ ]*include[ ]*"/p' \ ${SED} -n '/^#[ ]*include[ ]*"/p' \
"$$i" > "skel/sample/$$i"; \ "$$i" > "skel/sample/$$i"; \
fi; \ fi; \
done done
-${Q}for i in ${H_SRC} /dev/null; do \ -${Q} for i in ${H_SRC} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
@@ -486,11 +513,11 @@ depend:
fi; \ fi; \
fi; \ fi; \
done done
${Q}(cd ..; ${MAKE} hsrc) ${Q} (cd ..; $(MAKE) hsrc)
${Q}for i in `cd ..; ${MAKE} h_list 2>&1 | \ ${Q} for i in `cd ..; $(MAKE) h_list 2>&1 | \
${SED} -e '/Entering directory/d' \ ${SED} -e '/Entering directory/d' \
-e '/Nothing to be done/d' \ -e '/Nothing to be done/d' \
-e '/Leaving directory/d'` /dev/null; do \ -e '/Leaving directory/d'` /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
echo "#if !defined($$tag)" > "skel/$$i"; \ echo "#if !defined($$tag)" > "skel/$$i"; \
@@ -500,39 +527,39 @@ depend:
echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \
fi; \ fi; \
done done
-${Q}rm -f skel/sample/makedep.out -${Q} ${RM} -f skel/sample/makedep.out
${Q}echo sample/skel formed ${Q} echo sample/skel formed
${Q}echo forming sample dependency list ${Q} echo forming sample dependency list
${Q}echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \ ${Q} echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \
skel/sample/makedep.out skel/sample/makedep.out
${Q}cd skel/sample; ${MAKEDEPEND} -w 1 -f makedep.out -I.. ${C_SRC} ${Q} cd skel/sample; ${MAKEDEPEND} -w 1 -f makedep.out -I.. ${C_SRC}
-${Q}for i in ${C_SRC} /dev/null; do \ -${Q} for i in ${C_SRC} /dev/null; do \
if [ X"$$i" != X"/dev/null" ]; then \ if [ X"$$i" != X"/dev/null" ]; then \
echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \ echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \
fi; \ fi; \
done >> skel/sample/makedep.out done >> skel/sample/makedep.out
${Q}echo sample dependency list formed ${Q} echo sample dependency list formed
${Q}echo forming new sample/Makefile ${Q} echo forming new sample/Makefile
-${Q}rm -f Makefile.bak -${Q} ${RM} -f Makefile.bak
${Q}mv Makefile Makefile.bak ${Q} ${MV} Makefile Makefile.bak
${Q}${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile
${Q}echo "" >> Makefile ${Q} echo "" >> Makefile
${Q}${SED} -n '3,$$p' skel/sample/makedep.out | \ ${Q} ${SED} -n '3,$$p' skel/sample/makedep.out | \
LANG=C ${SORT} -u >> Makefile LANG=C ${SORT} -u >> Makefile
-${Q}rm -rf skel -${Q} ${RM} -rf skel
-${Q}if ${CMP} -s Makefile.bak Makefile; then \ -${Q} if ${CMP} -s Makefile.bak Makefile; then \
echo 'sample Makefile was already up to date'; \ echo 'sample Makefile was already up to date'; \
mv -f Makefile.bak Makefile; \ ${MV} -f Makefile.bak Makefile; \
else \ else \
rm -f Makefile.tmp; \ ${RM} -f Makefile.tmp; \
mv Makefile Makefile.tmp; \ ${MV} Makefile Makefile.tmp; \
if [ -d RCS ]; then \ if [ -d RCS ]; then \
co -l Makefile; \ ${CO} -l Makefile; \
fi; \ fi; \
mv Makefile.tmp Makefile; \ ${MV} Makefile.tmp Makefile; \
if [ -d RCS ]; then \ if [ -d RCS ]; then \
echo new sample Makefile formed, you need to check it in; \ echo new sample Makefile formed, you need to check it in; \
fi; \ fi; \
fi fi
## ##
@@ -551,12 +578,12 @@ echo_inst_files: Makefile
## ##
clean: clean:
-rm -f ${SAMPLE_OBJ} core -${RM} -f ${SAMPLE_OBJ} core
clobber: clobber:
-rm -f ${SAMPLE_OBJ} -${RM} -f ${SAMPLE_OBJ}
-rm -f ${TARGETS} -${RM} -f ${TARGETS}
rm -f .all Makefile.tmp sample ${RM} -f .all Makefile.tmp sample
# install everything # install everything
# #
@@ -565,7 +592,7 @@ clobber:
# NOTE: for right now we will not install anything # NOTE: for right now we will not install anything
# #
install: all install: all
@true @${TRUE}
# Try to remove everything that was installed # Try to remove everything that was installed
# #
@@ -574,7 +601,7 @@ install: all
# NOTE: nothing installed, nothing to uninstall # NOTE: nothing installed, nothing to uninstall
# #
uninstall: uninstall:
@true @${TRUE}
## ##
# #

View File

@@ -19,8 +19,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc. * received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
* *
* @(#) $Revision: 29.67 $ * @(#) $Revision: 29.71 $
* @(#) $Id: version.c,v 29.67 2006/09/17 23:50:45 chongo Exp $ * @(#) $Id: version.c,v 29.71 2006/09/18 13:14:03 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/RCS/version.c,v $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/version.c,v $
* *
* Under source code control: 1990/05/22 11:00:58 * Under source code control: 1990/05/22 11:00:58
@@ -48,7 +48,7 @@ static char *program;
#define MAJOR_VER 2 /* major version */ #define MAJOR_VER 2 /* major version */
#define MINOR_VER 12 /* minor version */ #define MINOR_VER 12 /* minor version */
#define MAJOR_PATCH 1 /* patch level or 0 if no patch */ #define MAJOR_PATCH 1 /* patch level or 0 if no patch */
#define MINOR_PATCH 1 /* test number or 0 if no minor patch */ #define MINOR_PATCH 5 /* test number or 0 if no minor patch */
/* /*

View File

@@ -57,4 +57,3 @@ CALCPAGER=less.exe
EXT=.exe EXT=.exe
ECHO=

View File

@@ -32,10 +32,5 @@
#define DEFAULTCALCPAGER "less.exe" #define DEFAULTCALCPAGER "less.exe"
#endif /* DEFAULTCALCPAGER */ #endif /* DEFAULTCALCPAGER */
/* where the echo command is located */
#if !defined(ECHO_PROG)
#define ECHO_PROG ""
#endif /* ECHO_PROG */
#endif /* !__CONF_H__ */ #endif /* !__CONF_H__ */