Release calc version 2.12.1.3

This commit is contained in:
Landon Curt Noll
2006-09-18 00:09:34 -07:00
parent 2c0d0bbc1b
commit 81a523043e
13 changed files with 1148 additions and 1041 deletions

13
CHANGES
View File

@@ -4,7 +4,14 @@ 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.
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 +6208,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.88 $
## @(#) $Id: CHANGES,v 29.87 2006/09/17 23:50:45 chongo Exp $ ## @(#) $Id: CHANGES,v 29.88 2006/09/18 06:29:07 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

@@ -58,8 +58,8 @@ Installing calc from the gziped tarball in 4 easy steps:
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.8 $
## @(#) $Id: HOWTO.INSTALL,v 29.7 2003/04/15 03:38:34 chongo Exp $ ## @(#) $Id: HOWTO.INSTALL,v 29.8 2006/09/18 06:27:39 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

1010
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.22 $ # @(#) $Revision: 29.23 $
# @(#) $Id: Makefile,v 29.22 2006/09/18 00:08:42 chongo Exp $ # @(#) $Id: Makefile,v 29.23 2006/09/18 06:27:39 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
@@ -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=
# #
@@ -163,6 +163,13 @@ Q=@
# #
CHMOD= chmod CHMOD= chmod
CMP= cmp CMP= cmp
RM= rm
MKDIR= mkdir
RMDIR= rmdir
CP= cp
MV= mv
CO= co
TRUE= true
# The calc files to install # The calc files to install
# #
@@ -192,8 +199,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
## ##
# #
@@ -247,37 +254,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
@@ -290,18 +297,18 @@ uninstall:
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

@@ -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.25 $ # @(#) $Revision: 29.27 $
# @(#) $Id: Makefile,v 29.25 2006/09/18 00:13:59 chongo Exp $ # @(#) $Id: Makefile,v 29.27 2006/09/18 07:04:42 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
@@ -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=
# #
@@ -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
## ##
# #
@@ -286,9 +294,9 @@ depend:
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
@@ -296,29 +304,29 @@ depend:
${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; \
@@ -344,52 +352,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
@@ -402,53 +410,53 @@ uninstall:
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.26 $ # @(#) $Revision: 29.28 $
# @(#) $Id: Makefile,v 29.26 2006/09/18 00:13:59 chongo Exp $ # @(#) $Id: Makefile,v 29.28 2006/09/18 07:04:42 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:
# #
@@ -151,9 +151,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:
# #
@@ -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=
# #
@@ -402,6 +402,15 @@ 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
## ##
# #
@@ -413,8 +422,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 +444,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
## ##
# #
@@ -485,12 +494,12 @@ depend:
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' \
@@ -523,7 +532,7 @@ depend:
>> "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." > \
@@ -536,23 +545,23 @@ depend:
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; \
@@ -593,154 +602,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,24 +758,24 @@ 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
@@ -774,12 +783,12 @@ uninstall:
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
@@ -787,20 +796,20 @@ uninstall:
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.31 $ # @(#) $Revision: 29.33 $
# @(#) $Id: Makefile,v 29.31 2006/09/18 00:13:59 chongo Exp $ # @(#) $Id: Makefile,v 29.33 2006/09/18 07:04:42 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
@@ -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,15 +512,15 @@ 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.
@@ -520,18 +528,18 @@ full: ${FULL_HELP_FILES} ${MAKE_FILE}
${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
@@ -554,24 +562,24 @@ ${SINGULAR_FILES}: ${PLURAL_FILES}
# #
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
## ##
@@ -606,8 +614,8 @@ 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.
# #
@@ -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,12 +723,12 @@ 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 \
@@ -728,18 +736,18 @@ uninstall:
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

91
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.19 $ # @(#) $Revision: 29.22 $
# @(#) $Id: Makefile,v 29.19 2006/09/18 00:14:13 chongo Exp $ # @(#) $Id: Makefile,v 29.22 2006/09/18 07:04:42 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
@@ -101,9 +101,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:
# #
@@ -138,9 +138,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:
# #
@@ -160,8 +160,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 +181,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=
# #
@@ -364,7 +364,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 +381,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 +395,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 +418,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
## ##
# #
@@ -462,12 +468,12 @@ depend:
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' \
@@ -500,7 +506,7 @@ 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." > \
@@ -513,23 +519,23 @@ depend:
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; \
@@ -551,12 +557,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 +571,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 +580,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.68 $ * @(#) $Revision: 29.69 $
* @(#) $Id: version.c,v 29.68 2006/09/18 00:14:46 chongo Exp $ * @(#) $Id: version.c,v 29.69 2006/09/18 06:29:07 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 2 /* test number or 0 if no minor patch */ #define MINOR_PATCH 3 /* 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__ */