Index: ossp-pkg/rc/00TODO RCS File: /v/ossp/cvs/ossp-pkg/rc/00TODO,v rcsdiff -q -kk '-r1.4' '-r1.5' -u '/v/ossp/cvs/ossp-pkg/rc/00TODO,v' 2>/dev/null --- 00TODO 2002/01/17 15:47:10 1.4 +++ 00TODO 2002/01/18 16:47:17 1.5 @@ -6,7 +6,9 @@ Must do Translate rc bourne shell script to ANSI C. - Convert from autogen to devtool for conformance with team standards. + Finish man page. Start latex or Docbook guide. + Remove autogen.sh after devtool is finished. + Customize devtool.conf and devtool.func for rc and automake. If a variable is defined for which no default exists, warn user (Scholli.) Avoid a silent failure when giving non-existent run commands (Marcus.) Index: ossp-pkg/rc/devtool RCS File: /v/ossp/cvs/ossp-pkg/rc/devtool,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/rc/devtool,v' | diff -u /dev/null - -L'ossp-pkg/rc/devtool' 2>/dev/null --- ossp-pkg/rc/devtool +++ - 2024-05-09 01:52:04.173449859 +0200 @@ -0,0 +1,46 @@ +#! /bin/sh +## +## devtool -- Development Tool +## Copyright (c) 2001-2002 Ralf S. Engelschall +## + +if [ $# -eq 0 ]; then + echo "devtool:USAGE: devtool [ ...]" 1>&2 + exit 1 +fi + +cmd="$1" +shift + +devtoolfunc="./devtool.func" + +if [ ! -f devtool.conf ]; then + echo "devtool:ERROR: no devtool.conf in current directory" 1>&2 + exit 1 +fi + +cmdline=`grep "^%$cmd" devtool.conf` +if [ ".$cmdline" = . ]; then + echo "devtool:ERROR: command $cmd not found in devtool.conf" 1>&2 + exit 1 +fi + +if [ ".$TMPDIR" != . ]; then + tmpdir="$TMPDIR" +elif [ ".$TEMPDIR" != . ]; then + tmpdir="$TEMPDIR" +else + tmpdir="/tmp" +fi +tmpfile="$tmpdir/rc.$$.tmp" + +rm -f $tmpfile +touch $tmpfile +echo ". $devtoolfunc" >>$tmpfile +( sed >$tmpfile + +sh $tmpfile "$@" + +rm -f $tmpfile >/dev/null 2>&1 || true Index: ossp-pkg/rc/devtool.conf RCS File: /v/ossp/cvs/ossp-pkg/rc/devtool.conf,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/rc/devtool.conf,v' | diff -u /dev/null - -L'ossp-pkg/rc/devtool.conf' 2>/dev/null --- ossp-pkg/rc/devtool.conf +++ - 2024-05-09 01:52:04.190408632 +0200 @@ -0,0 +1,28 @@ +## +## devtool.conf -- Development Tool Configuration +## + +%autogen + @autogen shtool 1.5.4 "1.5.*" all + @autogen libtool 1.4.2 "1.4*" + @autogen autoconf 2.52 "2.5.*" + +%autoclean + @autoclean shtool + @autoclean libtool + @autoclean autoconf + +%configure + ./configure \ + --prefix=/tmp/rc \ + "$@" + +%version + ./shtool version -l txt -n "OSSP rc" -p "rc_" -e VERSION + +%dist + make distclean >/dev/null 2>&1 + ./shtool fixperm -v . + V=`./shtool version -l txt -d short VERSION` + ./shtool tarball -o rc-${V}.tar.gz -d rc-${V} -u ossp -g ossp \ + -e 'CVS,\.cvsignore,\.[ao],^\.,devtool.conf' -c 'gzip --best' . Index: ossp-pkg/rc/devtool.func RCS File: /v/ossp/cvs/ossp-pkg/rc/devtool.func,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/rc/devtool.func,v' | diff -u /dev/null - -L'ossp-pkg/rc/devtool.func' 2>/dev/null --- ossp-pkg/rc/devtool.func +++ - 2024-05-09 01:52:04.193050167 +0200 @@ -0,0 +1,71 @@ +## +## devtool.func -- Development Tool Functions +## Copyright (c) 2001-2002 Ralf S. Engelschall +## + +devtool_require () { + t="$1"; o="$2"; p="$3"; e="$4"; a="$5" + v=`($t $o | head -1 | awk "{ print \\\$$p; }") 2>/dev/null` + if [ ".$v" = . ]; then + echo "devtool:ERROR: unable to determine version of $t" 1>&2 + exit 1 + fi + case "$v" in + $e ) + ;; + $a ) + echo "devtool:WARNING: $t version $v still accepted, although expected $e." 1>&2 + ;; + * ) + echo "devtool:ERROR: $t version $e expected, but found $v." 1>&2 + exit 1 + ;; + esac + echo "$v" +} + +devtool_autogen () { + tool=$1 + shift + case $tool in + autoconf ) + autoconf_version=`devtool_require autoconf --version 4 "$1" "$2"` + echo "generating (GNU Autoconf $autoconf_version): configure config.h.in" + autoconf + autoheader 2>&1 | grep -v "is unchanged" + ;; + libtool ) + libtoolize_version=`devtool_require libtoolize --version 4 "$1" "$2"` + echo "generating (GNU Libtool $libtoolize_version): ltmain.sh, libtool.m4, config.guess, config.sub" + libtoolize --force --copy >/dev/null 2>&1 + cp `libtoolize --force --copy --dry-run | grep "add the contents of" |\ + sed -e 's;^[^\`]*\`;;' -e "s;'.*;;"` libtool.m4 + ;; + shtool ) + shtoolize_version=`devtool_require shtoolize -v 3 "$1" "$2"` + echo "generating (GNU Shtool $shtoolize_version): shtool" + shift + shift + shtoolize -q "$@" + ;; + esac +} + +devtool_autoclean () { + tool=$1 + shift + case $tool in + autoconf ) + echo "removing: configure config.h.in" + rm -f configure config.h.in + ;; + libtool ) + echo "removing: ltmain.sh libtool.m4 config.guess config.sub" + rm -f ltmain.sh libtool.m4 config.guess config.sub + ;; + shtool ) + echo "removing: shtool" + rm -f shtool + ;; + esac +}