dist_3.5-36.001/0002755000175000017500000000000012645366701013421 5ustar srivastasrivastadist_3.5-36.001/Configure0000755000175000017500000031004712621647006015265 0ustar srivastasrivasta#! /bin/sh # # If these # comments don't work, trim them. Don't worry about any other # shell scripts, Configure will trim # comments from them for you. # # (If you are trying to port this package to a machine without sh, # I would suggest you have a look at the prototypical config_h.SH file # and edit it to reflect your system. Some packages may include samples # of config.h for certain machines, so you might look for one of those.) # # Yes, you may rip this off to use in other distribution packages. This # script belongs to the public domain and cannot be copyrighted. # # Note: this Configure script was generated automatically. Rather than # working with this copy of Configure, you may wish to get metaconfig. # The dist package (which contains metaconfig) is available via SVN: # svn co https://svn.code.sf.net/p/dist/code/trunk/dist # $Id: Head.U 167 2013-05-08 17:58:00Z rmanfredi $ # # Generated on Sat Nov 14 16:05:58 CET 2015 [metaconfig 3.5-197] cat >c1$$ <c2$$ </dev/null` test "$me" || me=$0 ;; esac : Proper separator for the PATH environment variable p_=: : On OS/2 this directory should exist if this is not floppy only system ":-]" if test -d c:/. ; then if test -n "$OS2_SHELL"; then p_=\; PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` elif test -n "$DJGPP"; then case "X${MACHTYPE:-nonesuchmach}" in *cygwin|*msys) ;; *) p_=\; ;; esac fi fi : Proper PATH setting paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin" paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin" paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin" paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin" paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" paths="$paths /sbin /usr/sbin /usr/libexec" paths="$paths /system/gnu_library/bin" for p in $paths do case "$p_$PATH$p_" in *$p_$p$p_*) ;; *) test -d $p && PATH=$PATH$p_$p ;; esac done PATH=.$p_$PATH export PATH : shall we be using ksh? inksh='' needksh='' avoidksh='' newsh=/bin/ksh changesh='' if (PATH=.; alias -x) >/dev/null 2>&1; then inksh=true fi if test -f /hp-ux -a -f /bin/ksh; then needksh='to avoid sh bug in "here document" expansion' fi if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then if test X`/usr/bin/uname -v` = X4; then avoidksh="to avoid AIX 4's /bin/sh" newsh=/usr/bin/bsh fi fi if test -f /osf_boot -a -f /usr/sbin/setld; then if test X`/usr/bin/uname -s` = XOSF1; then avoidksh="to avoid Digital UNIX' ksh" newsh=/bin/sh unset BIN_SH fi fi case "$inksh/$needksh" in /[a-z]*) ENV='' changesh=true reason="$needksh" ;; esac case "$inksh/$avoidksh" in true/[a-z]*) changesh=true reason="$avoidksh" ;; esac case "$inksh/$needksh-$avoidksh-" in true/--) cat </dev/null` : Private path used by Configure to find libraries. Its value : is prepended to libpth. This variable takes care of special : machines, like the mips. Usually, it should be empty. plibpth='' : Find the basic shell for Bourne shell scripts case "$sh" in '') case "$SYSTYPE" in *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";; *) xxx='/bin/sh';; esac if test -f "$xxx"; then sh="$xxx" else : Build up a list and do a single loop so we can 'break' out. pth=`echo $PATH | sed -e "s/$p_/ /g"` for xxx in sh bash ksh pdksh ash; do for p in $pth; do try="$try ${p}/${xxx}" done done for xxx in $try; do if test -f "$xxx"; then sh="$xxx" break elif test -f "$xxx$_exe"; then sh="$xxx$_exe" break elif test -f "$xxx.exe"; then sh="$xxx.exe" break fi done fi ;; esac case "$sh" in '') cat >&2 </dev/null 2>&1`; then shsharp=true spitshell=cat xcat=/bin/cat test -f $xcat$_exe || xcat=/usr/bin/cat if test ! -f $xcat$_exe; then for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do if test -f $p/cat$_exe; then xcat=$p/cat break fi done if test ! -f $xcat$_exe; then echo "Can't find cat anywhere!" exit 1 fi fi echo "#!$xcat" >sharp $eunicefix sharp chmod +x sharp ./sharp > today 2>/dev/null if test -s today; then sharpbang='#!' else echo "#! $xcat" > sharp $eunicefix sharp chmod +x sharp ./sharp > today 2>/dev/null if test -s today; then sharpbang='#! ' else sharpbang=': use ' fi fi else echo " " echo "Your $sh doesn't grok # comments--I will strip them later on." shsharp=false cd .. echo "exec grep -v '^[ ]*#'" >spitshell chmod +x spitshell $eunicefix spitshell spitshell=`pwd`/spitshell cd UU echo "I presume that if # doesn't work, #! won't work either!" sharpbang=': use ' fi rm -f sharp today : figure out how to guarantee sh startup case "$startsh" in '') startsh=${sharpbang}${sh} ;; *) esac cat >sharp < cmdline.opt <>cmdline.opt < cmdl.opt $arg EOC arg_exp=`cat cmdl.opt` args_exp="$args_exp$args_sep'$arg_exp'" argn=`expr $argn + 1` args_sep=' ' done rm -f cmdl.opt : produce awk script to parse command line options cat >options.awk <<'EOF' BEGIN { optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification len = length(optstr); for (i = 1; i <= len; i++) { c = substr(optstr, i, 1); if (i < len) a = substr(optstr, i + 1, 1); else a = ""; if (a == ":") { arg[c] = 1; i++; } opt[c] = 1; } } { expect = 0; str = $0; if (substr(str, 1, 1) != "-") { printf("'%s'\n", str); next; } len = length($0); for (i = 2; i <= len; i++) { c = substr(str, i, 1); if (!opt[c]) { printf("-%s\n", substr(str, i)); next; } printf("-%s\n", c); if (arg[c]) { if (i < len) printf("'%s'\n", substr(str, i + 1)); else expect = 1; next; } } } END { if (expect) print "?"; } EOF : process the command line options set X `for arg in "$@"; do echo "X$arg"; done | sed -e s/X// | awk -f options.awk` eval "set $*" shift rm -f options.awk : set up default values fastread='' reuseval=false config_sh='' alldone='' error='' silent='' extractsh='' override='' knowitall='' rm -f optdef.sh posthint.sh cat >optdef.sh <&2 error=true fi cd UU shift;; -h) shift; error=true;; -r) shift; reuseval=true;; -s) shift; silent=true; realsilent=true;; -E) shift; alldone=exit;; -K) shift; knowitall=true;; -O) shift; override=true;; -S) shift; silent=true; extractsh=true;; -D) shift case "$1" in *=) echo "$me: use '-U symbol=', not '-D symbol='." >&2 echo "$me: ignoring -D $1" >&2 ;; *=*) echo "$1" | \ sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;; *) echo "$1='define'" >> optdef.sh;; esac shift ;; -U) shift case "$1" in *=) echo "$1" >> optdef.sh;; *=*) echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2 echo "$me: ignoring -U $1" >&2 ;; *) echo "$1='undef'" >> optdef.sh;; esac shift ;; -A) shift xxx='' yyy="$1" zzz='' uuu=undef case "$yyy" in *=*) zzz=`echo "$yyy"|sed 's!=.*!!'` case "$zzz" in *:*) zzz='' ;; *) xxx=append zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'` yyy=`echo "$yyy"|sed 's!=.*!!'` ;; esac ;; esac case "$xxx" in '') case "$yyy" in *:*) xxx=`echo "$yyy"|sed 's!:.*!!'` yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` zzz=`echo "$yyy"|sed 's!^[^=]*=!!'` yyy=`echo "$yyy"|sed 's!=.*!!'` ;; *) xxx=`echo "$yyy"|sed 's!:.*!!'` yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;; esac ;; esac case "$xxx" in append) echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;; clear) echo "$yyy=''" >> posthint.sh ;; define) case "$zzz" in '') zzz=define ;; esac echo "$yyy='$zzz'" >> posthint.sh ;; eval) echo "eval \"$yyy=$zzz\"" >> posthint.sh ;; prepend) echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;; undef) case "$zzz" in '') zzz="$uuu" ;; esac echo "$yyy=$zzz" >> posthint.sh ;; *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;; esac shift ;; -V) echo "$me generated by metaconfig 3.5-197." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; *) break;; esac done case "$error" in true) cat >&2 <&1 case "$silent" in true) exec 1>/dev/null;; esac touch optdef.sh if grep -q '\\' optdef.sh >/dev/null 2>&1; then echo "Configure does not support \\ in -D or -U arguments" >&2 exit 1 fi : run the defines and the undefines, if any, but leave the file out there... . ./optdef.sh : create the posthint manipulation script and leave the file out there... touch posthint.sh : set package name package='dist' first=`echo $package | sed -e 's/^\(.\).*/\1/'` last=`echo $package | sed -e 's/^.\(.*\)/\1/'` case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;; *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;; esac : script used to emulate mkdir -p cat >mkdirp <>mkdirp <<'EOS' name=$1; create=""; while test $name; do if test ! -d "$name"; then create="$name $create" name=`echo $name | sed -e "s|^[^/]*$||"` name=`echo $name | sed -e "s|\(.*\)/.*|\1|"` else name="" fi done for file in $create; do mkdir $file done EOS chmod +x mkdirp $eunicefix mkdirp : Some greps do not return status, grrr. echo "grimblepritz" >grimble if grep blurfldyick grimble >/dev/null 2>&1 ; then contains=contains elif grep grimblepritz grimble >/dev/null 2>&1 ; then contains=grep else contains=contains fi rm -f grimble : the following should work in any shell case "$contains" in contains*) echo " " echo "AGH! Grep doesn't return a status. Attempting remedial action." cat >contains <<'EOSS' grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp EOSS chmod +x contains esac : Find the path to the source tree case "$src" in '') case "$0" in */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` ;; *) src='.';; esac;; esac case "$src" in '') src=/ rsrc=/ ;; /*) rsrc="$src";; *) rsrc="../$src";; esac if test -f $rsrc/Configure && \ $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1 then : found it, so we are ok. else rsrc='' for src in . .. ../.. ../../.. ../../../..; do if test -f ../$src/Configure && \ $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1 then rsrc=../$src break fi done fi case "$rsrc" in '') cat <&4 Sorry, I can't seem to locate the source dir for $package. Please start Configure with an explicit path -- i.e. /some/path/Configure. EOM exit 1 ;; ../.) rsrc='..';; *) echo " " echo "Sources for $package found in \"$src\"." >&4 ;; esac : script used to extract .SH files with variable substitutions cat >extract </dev/null` EOS cat >>extract <<'EOS' echo "Doing variable substitutions on .SH files..." if test -f "$SRC/MANIFEST"; then set x `awk '{print $1}' <$SRC/MANIFEST | grep '\.SH'` else echo "(Looking for .SH files under the source directory.)" set x `(cd "$SRC"; find . -name "*.SH" -print)` fi shift case $# in 0) set x `(cd "$SRC"; echo *.SH)`; shift;; esac if test ! -f "$SRC/$1"; then shift fi for file in $*; do case "$SRC" in ".") case "$file" in */*) dir=`expr X$file : 'X\(.*\)/'` file=`expr X$file : 'X.*/\(.*\)'` (cd $dir && . ./$file) ;; *) . ./$file ;; esac ;; *) case "$file" in */*) dir=`expr X$file : 'X\(.*\)/'` file=`expr X$file : 'X.*/\(.*\)'` ./mkdirp $dir sh <"$SRC/$dir/$file" ;; *) sh <"$SRC/$file" ;; esac ;; esac done if test -f "$SRC/config_h.SH"; then if test ! -f config.h; then sh <"$SRC/config_h.SH" fi fi EOS : extract files and exit if asked to do so case "$extractsh" in true) case "$realsilent" in true) ;; *) exec 1>&4;; esac case "$config_sh" in '') config_sh='config.sh';; esac echo " " echo "Fetching answers from $config_sh..." cd .. . $config_sh test "$override" && . ./optdef.sh echo " " . UU/extract rm -rf UU echo "Extraction done." exit 0 ;; esac : Eunice requires " " instead of "", can you believe it echo " " : Here we go... echo "Beginning of configuration questions for $package." trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15 : first determine how to suppress newline on echo command echo " " echo "Checking echo to see how to suppress newlines..." (echo "hi there\c" ; echo " ") >.echotmp if $contains c .echotmp >/dev/null 2>&1 ; then echo "...using -n." n='-n' c='' else cat <<'EOM' ...using \c EOM n='' c='\c' fi echo $n "The star should be here-->$c" echo '*' rm -f .echotmp : Now test for existence of everything in MANIFEST echo " " if test -f "$rsrc/MANIFEST"; then echo "First let's make sure your kit is complete. Checking..." >&4 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \ (split -l 50 2>/dev/null || split -50) rm -f missing tmppwd=`pwd` for filelist in x??; do (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \ >/dev/null 2>>"$tmppwd/missing") done if test -s missing; then cat missing >&4 cat >&4 <<'EOM' THIS PACKAGE SEEMS TO BE INCOMPLETE. You have the option of continuing the configuration process, despite the distinct possibility that your kit is damaged, by typing 'y'es. If you do, don't blame me if something goes wrong. I advise you to type 'n'o and contact the author (Raphael_Manfredi@pobox.com). EOM echo $n "Continue? [n] $c" >&4 read ans case "$ans" in y*) echo "Continuing..." >&4 rm -f missing ;; *) echo "ABORTING..." >&4 kill $$ ;; esac else echo "Looks good..." fi else echo "There is no MANIFEST file. I hope your kit is complete !" fi rm -f missing x?? : Find the appropriate value for a newline for tr if test -n "$DJGPP"; then trnl='\012' fi if test X"$trnl" = X; then case "`echo foo | tr '\n' x 2>/dev/null`" in foox) trnl='\n' ;; esac fi if test X"$trnl" = X; then case "`echo foo | tr '\012' x 2>/dev/null`" in foox) trnl='\012' ;; esac fi if test X"$trnl" = X; then case "`echo foo | tr '\r\n' xy 2>/dev/null`" in fooxy) trnl='\n\r' ;; esac fi if test X"$trnl" = X; then cat <&2 $me: Fatal Error: cannot figure out how to translate newlines with 'tr'. EOM exit 1 fi : compute the number of columns on the terminal for proper question formatting case "$COLUMNS" in '') COLUMNS='80';; esac : set up the echo used in my read myecho="case \"\$xxxm\" in '') echo $n \"\$rp $c\" >&4;; *) case \"\$rp\" in '') echo $n \"[\$xxxm] $c\";; *) if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then echo \"\$rp\" >&4 echo $n \"[\$xxxm] $c\" >&4 else echo $n \"\$rp [\$xxxm] $c\" >&4 fi ;; esac;; esac" : now set up to do reads with possible shell escape and default assignment cat <myread $startsh xxxm=\$dflt $myecho ans='!' case "\$fastread" in yes) case "\$dflt" in '') ;; *) ans=''; case "\$silent-\$rp" in true-) ;; *) echo " " >&4;; esac;; esac;; *) case "\$silent" in true) case "\$rp" in '') ans='';; esac;; esac;; esac while expr "X\$ans" : "X!" >/dev/null; do read answ set x \$xxxm shift aok=''; eval "ans=\\"\$answ\\"" && aok=y case "\$answ" in "!") sh 1>&4 echo " " $myecho ;; !*) set x \`expr "X\$ans" : "X!\(.*\)\$"\` shift sh 1>&4 -c "\$*" echo " " $myecho ;; "\$ans") case "\$ans" in \\&*) set x \`expr "X\$ans" : "X&\(.*\)\$"\` shift case "\$1" in -d) fastread=yes echo "(OK, I'll run with -d after this question.)" >&4 ;; -*) echo "*** Sorry, \$1 not supported yet." >&4 ;; esac $myecho ans=! ;; esac;; *) case "\$aok" in y) echo "*** Substitution done -- please confirm." xxxm="\$ans" ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\` xxxm="\$ans" ans=! ;; *) echo "*** Error -- try again." ans=! ;; esac $myecho ;; esac case "\$ans\$xxxm\$nostick" in '') ans=! $myecho ;; esac done case "\$ans" in '') ans="\$xxxm";; esac EOSC : create .config dir to save info across Configure sessions test -d ../.config || mkdir ../.config cat >../.config/README </dev/null` case "$user" in '') user=`whoami 2>&1`;; esac if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then firsttime=false echo " " rp='Would you like to see the instructions?' dflt=n . ./myread case "$ans" in [yY]*) ;; *) needman=false;; esac fi if $needman; then cat <>../.config/instruct;; esac fi : script used to emit important warnings cat >warn <msg else cat >msg fi echo "*** WARNING:" >&4 sed -e 's/^/*** /' &4 echo "*** " >&4 cat msg >>config.msg echo " " >>config.msg rm -f msg EOS chmod +x warn $eunicefix warn : find out where common programs are echo " " echo "Locating common programs..." >&4 cat <loc $startsh case \$# in 0) exit 1;; esac thing=\$1 shift dflt=\$1 shift for dir in \$*; do case "\$thing" in .) if test -d \$dir/\$thing; then echo \$dir exit 0 fi ;; *) for thisthing in \$dir/\$thing; do : just loop through to pick last item done if test -f \$thisthing; then echo \$thisthing exit 0 elif test -f \$thisthing$_exe; then echo \$thisthing exit 0 elif test -f \$dir/\$thing.exe; then if test -n "$DJGPP"; then echo \$dir/\$thing.exe else : on Eunice apparently echo \$dir/\$thing fi exit 0 fi ;; esac done echo \$dflt exit 1 EOSC chmod +x loc $eunicefix loc loclist=" awk cat chgrp chmod chown cp echo expr grep make mkdir mv rm sed sort touch tr uniq " trylist=" cpp date inews less line ln mail more nroff perl pg rmail sendmail smail test uname vi wc zcat " pth=`echo $PATH | sed -e "s/$p_/ /g"` pth="$pth /sbin /usr/sbin /lib /usr/lib /etc" for file in $loclist; do eval xxx=\$$file case "$xxx" in /*|?:[\\/]*) if test -f "$xxx"; then : ok else ./warn "no $xxx -- ignoring your setting for $file." 4>&4 xxx=`./loc $file $file $pth` fi ;; '') xxx=`./loc $file $file $pth`;; *) xxx=`./loc $xxx $xxx $pth`;; esac eval $file=$xxx eval _$file=$xxx case "$xxx" in /*) echo $file is in $xxx. ;; ?:[\\/]*) echo $file is in $xxx. ;; *) echo "I don't know where '$file' is, and my life depends on it." >&4 echo "Go find a public domain implementation or fix your PATH!" >&4 exit 1 ;; esac done echo " " echo "Don't worry if any of the following aren't found..." say=offhand for file in $trylist; do eval xxx=\$$file case "$xxx" in /*|?:[\\/]*) if test -f "$xxx"; then : ok else ./warn "no $xxx -- ignoring your setting for $file." 4>&4 xxx=`./loc $file $file $pth` fi ;; '') xxx=`./loc $file $file $pth`;; *) xxx=`./loc $xxx $xxx $pth`;; esac eval $file=$xxx eval _$file=$xxx case "$xxx" in /*) echo $file is in $xxx. ;; ?:[\\/]*) echo $file is in $xxx. ;; *) echo "I don't see $file out there, $say." say=either ;; esac done case "$egrep" in egrep$_exe|egrep) echo "Substituting grep for egrep." egrep=$grep _egrep=$_grep ;; esac case "$ln" in ln$_exe|ln) echo "Substituting cp for ln." ln=$cp _ln=$_cp ;; esac case "$make" in make$_exe|make) case "$gmake" in gmake) echo "I can't find make or gmake, and my life depends on it." >&4 echo "Go find a public domain implementation or fix your PATH setting!" >&4 exit 1 ;; esac ;; esac case "$gmake" in gmake$_exe|gmake) ;; *) if test -f "/system/gnu_library/bin/ar.pm"; then : Stratus VOS echo "Substituting gmake for make." make=$gmake _make=$_gmake fi ;; esac case "$test" in test|test$_exe) echo "Hopefully test is built into your sh." test=test ;; *) if `sh -c "PATH= test true" >/dev/null 2>&1`; then echo "Using the test built into your sh." test=test _test=test fi ;; esac case "$echo" in echo|echo$_exe) echo "Hopefully echo is built into your sh." echo=echo ;; '') ;; *) echo " " echo "Checking compatibility between $_echo and builtin echo (if any)..." >&4 $echo $n "hi there$c" >foo1 echo $n "hi there$c" >foo2 if cmp foo1 foo2 >/dev/null 2>&1; then echo "They are compatible. In fact, they may be identical." else case "$n" in '-n') n='' c='\c';; *) n='-n' c='';; esac cat <$c" $echo "*" fi $rm -f foo1 foo2 ;; esac : generate the trygcc script for later perusal cat <trygcc $startsh EOS cat <<'EOSC' >>trygcc case "$cc" in '') ;; *) $rm -f try try.* $cat >try.c <&4 despair=yes trygcc=yes case "$cc" in *gcc*) trygcc=no ;; esac case "`$cc -v -c try.c 2>&1`" in *gcc*) trygcc=no ;; esac if $test X"$trygcc" = Xyes; then if gcc -o try -c try.c; then echo " " echo "You seem to have a working gcc, though." >&4 rp="Would you like to use it?" dflt=y if $test -f myread; then . ./myread else if $test -f UU/myread; then . ./UU/myread else echo "Cannot find myread, sorry. Aborting." >&2 exit 1 fi fi case "$ans" in [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no; $cat *.cbu >checktmp 2>/dev/null if $contains ccflags checktmp >/dev/null; then ./warn 4>&4 <checkcc $startsh EOS cat <<'EOSC' >>checkcc case "$cc" in '') ;; *) $rm -f try try.* $cat >try.c <&4 fi $cat >&4 < /dev/null 2>&1 && $test -f sym; then echo "Symbolic links are supported." >&4 lns="$ln -s" else echo "Symbolic links are NOT supported." >&4 lns="$ln" fi $rm -f blurfl sym : determine whether symbolic links are supported echo " " case "$lns" in *"ln"*" -s") echo "Checking how to test for symbolic links..." >&4 $lns blurfl sym if $test "X$issymlink" = X; then case "$newsh" in '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;; *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;; esac if test $? = 0; then issymlink="test -h" else echo "Your builtin 'test -h' may be broken." >&4 case "$test" in /*) ;; *) pth=`echo $PATH | sed -e "s/$p_/ /g"` for p in $pth do if test -f "$p/$test"; then test="$p/$test" break fi done ;; esac case "$test" in /*) echo "Trying external '$test -h'." >&4 issymlink="$test -h" if $test ! -h sym >/dev/null 2>&1; then echo "External '$test -h' is broken, too." >&4 issymlink='' fi ;; *) issymlink='' ;; esac fi fi if $test "X$issymlink" = X; then if $test -L sym 2>/dev/null; then issymlink="$test -L" echo "The builtin '$test -L' worked." >&4 fi fi if $test "X$issymlink" != X; then echo "You can test for symbolic links with '$issymlink'." >&4 else echo "I do not know how you can test for symbolic links." >&4 fi $rm -f blurfl sym ;; *) echo "No symbolic links, so not testing for their testing..." >&4 ;; esac : define absolute package source directory case "$src" in /*) pkgsrc=$src;; *) pkgsrc=`cd $rsrc; pwd`;; esac : Duplicate the tree with symbolic links if -Dmksymlinks was supplied case "$mksymlinks" in $define|true|[yY]*) echo " " case "$src" in ''|'.') echo "Cannot create symlinks in the original directory." >&4 exit 1 ;; *) case "$lns:$issymlink" in *"ln"*" -s:"*"test -"?) echo "Creating the symbolic links..." >&4 echo "(First creating the subdirectories...)" >&4 cd .. awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | \ sort -u | while true do read dir test -z "$dir" && break ./UU/mkdirp $dir 2>/dev/null if test -d $dir; then : ok else echo "Failed to create '$dir'. Aborting." >&4 exit 1 fi done echo "(Now creating the symlinks...)" >&4 awk '{print $1}' $src/MANIFEST | while true; do read filename test -z "$filename" && break if test -f $filename; then if $issymlink $filename; then rm -f $filename fi fi if test -f $filename; then echo "$filename already exists, not symlinking." else ln -s $pkgsrc/$filename $filename fi done echo "(Checking current directory...)" >&4 cd UU awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \ (split -l 50 2>/dev/null || split -50) rm -f missing tmppwd=`pwd` for filelist in x??; do (cd ..; ls `cat "$tmppwd/$filelist"` \ >/dev/null 2>>"$tmppwd/missing") done if test -s missing; then echo "Failed duplication of source tree. Aborting." >&4 exit 1 fi ;; *) echo "(I cannot figure out how to do symbolic links, ignoring!)" >&4 ;; esac ;; esac ;; esac : see whether [:lower:] and [:upper:] are supported character classes echo " " case "`echo AbyZ | LC_ALL=C $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in ABYZ) echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4 up='[:upper:]' low='[:lower:]' ;; *) # There is a discontinuity in EBCDIC between 'I' and 'J' # (0xc9 and 0xd1), therefore that is a nice testing point. if test "X$up" = X -o "X$low" = X; then case "`echo IJ | LC_ALL=C $tr '[I-J]' '[i-j]' 2>/dev/null`" in ij) up='[A-Z]' low='[a-z]' ;; esac fi if test "X$up" = X -o "X$low" = X; then case "`echo IJ | LC_ALL=C $tr I-J i-j 2>/dev/null`" in ij) up='A-Z' low='a-z' ;; esac fi if test "X$up" = X -o "X$low" = X; then case "`echo IJ | od -x 2>/dev/null`" in *C9D1*|*c9d1*) echo "Hey, this might be EBCDIC." >&4 if test "X$up" = X -o "X$low" = X; then case "`echo IJ | \ LC_ALL=C $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in ij) up='[A-IJ-RS-Z]' low='[a-ij-rs-z]' ;; esac fi if test "X$up" = X -o "X$low" = X; then case "`echo IJ | LC_ALL=C $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in ij) up='A-IJ-RS-Z' low='a-ij-rs-z' ;; esac fi ;; esac fi esac case "`echo IJ | LC_ALL=C $tr \"$up\" \"$low\" 2>/dev/null`" in ij) echo "Using $up and $low to convert case." >&4 ;; *) echo "I don't know how to translate letters from upper to lower case." >&4 echo "Your tr is not acting any way I know of." >&4 exit 1 ;; esac : set up the translation script tr, must be called with ./tr of course cat >tr <&4 exit 1 ;; esac : Determine the name of the machine myuname=`$uname -a 2>/dev/null` $test -z "$myuname" && myuname=`hostname 2>/dev/null` myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '` newmyuname="$myuname" has_uname= $test -f "$uname" && has_uname=y : Guessing of the OS name -- half the following guesses are probably wrong... : If you have better tests or hints, please send them to the metaconfig : authors and to Raphael_Manfredi@pobox.com $test -f /irix && osname=irix $test -f /xenix && osname=sco_xenix $test -f /dynix && osname=dynix $test -f /dnix && osname=dnix $test -f /lynx.os && osname=lynxos $test -f /unicos && osname=unicos && osvers=`$uname -r` $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r` $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r` $test -f /bin/mips && /bin/mips && osname=mips $test -d /NextApps && set X `hostinfo | $grep 'NeXT Mach.*:' | \ $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4 $test -d /usr/apollo/bin && osname=apollo $test -f /etc/saf/_sactab && osname=svr4 $test -d /usr/include/minix && osname=minix $test -f /system/gnu_library/bin/ar.pm && osname=vos if $test -d /MachTen -o -d /MachTen_Folder; then osname=machten if $test -x /sbin/version; then osvers=`/sbin/version | $awk '{print $2}' | $sed -e 's/[A-Za-z]$//'` elif $test -x /usr/etc/version; then osvers=`/usr/etc/version | $awk '{print $2}' | $sed -e 's/[A-Za-z]$//'` else osvers="$2.$3" fi fi $test -f /sys/posix.dll && $test -f /usr/bin/what && set X `/usr/bin/what /sys/posix.dll` && $test "$3" = UWIN && osname=uwin && osvers="$5" if $test "X$has_uname" != X; then set X $myuname shift case "$5" in fps*) osname=fps ;; mips*) case "$4" in umips) osname=umips ;; *) osname=mips ;; esac;; [23]100) osname=mips ;; next*) osname=next ;; i386*) tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'` if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then osname='sco' osvers=$tmp elif $test -f /etc/kconfig; then osname=isc if $test "$lns" = "$ln -s"; then osvers=4 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then osvers=3 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 then osvers=2 fi fi tmp='' ;; pc*) if $test -n "$DJGPP"; then osname=dos osvers=djgpp fi ;; esac case "$1" in aix) osname=aix tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1` case "$tmp" in 'not found') osvers="$4"."$3" ;; '<3240'|'<>3240') osvers=3.2.0 ;; '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;; '=3250'|'>3250') osvers=3.2.5 ;; *) osvers=$tmp;; esac ;; bsd386) osname=bsd386 osvers=`$uname -r` ;; cygwin*) osname=cygwin osvers=`echo "$3" | sed -e 's/\(.*\)(.*/\1/'` ;; mingw*) osname=mingw osvers=`echo "$3" | sed -e 's/\(.*\)(.*/\1/'` ;; *dc.osx) osname=dcosx osvers="$3" ;; dnix) osname=dnix osvers="$3" ;; domainos) osname=apollo osvers="$3" ;; dgux) osname=dgux osvers="$3" ;; dynixptx*) osname=dynixptx osvers=`echo "$4"|sed 's/^v//'` ;; freebsd) osname=freebsd osvers="$3" ;; genix) osname=genix ;; hp*) osname=hpux osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'` ;; irix*) osname=irix case "$3" in 4*) osvers=4 ;; 5*) osvers=5 ;; *) osvers="$3" ;; esac ;; linux) osname=linux case "$3" in *) osvers="$3" ;; esac ;; MiNT) osname=mint ;; netbsd*) osname=netbsd osvers="$3" ;; news-os) osvers="$3" case "$3" in 4*) osname=newsos4 ;; *) osname=newsos ;; esac ;; next*) osname=next ;; nonstop-ux) osname=nonstopux ;; openbsd) osname=openbsd osvers="$3" ;; POSIX-BC | posix-bc ) osname=posix-bc osvers="$3" ;; powerux | power_ux | powermax_os | powermaxos | \ powerunix | power_unix) osname=powerux osvers="$3" ;; qnx) osname=qnx osvers="$4" ;; solaris) osname=solaris case "$3" in 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; *) osvers="$3" ;; esac ;; sunos) osname=sunos case "$3" in 5*) osname=solaris osvers=`echo $3 | $sed 's/^5/2/g'` ;; *) osvers="$3" ;; esac ;; titanos) osname=titanos case "$3" in 1*) osvers=1 ;; 2*) osvers=2 ;; 3*) osvers=3 ;; 4*) osvers=4 ;; *) osvers="$3" ;; esac ;; ultrix) osname=ultrix osvers="$3" ;; osf1|mls+) case "$5" in alpha) osname=dec_osf osvers=`sizer -v | awk '{print $3}' | \ ./tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'` case "$osvers" in [1-9].[0-9]*) ;; *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;; esac ;; hp*) osname=hp_osf1 ;; mips) osname=mips_osf1 ;; esac ;; unixware) osname=svr5 osvers="$4" ;; uts) osname=uts osvers="$3" ;; vos) osvers="$3" ;; $2) case "$osname" in *isc*) ;; *freebsd*) ;; svr*) : svr4.x or possibly later case "svr$3" in ${osname}*) osname=svr$3 osvers=$4 ;; esac case "$osname" in svr4.0) : Check for ESIX if $test -f /stand/boot ; then eval `$grep '^INITPROG=[a-z/0-9]*$' /stand/boot` if $test -n "$INITPROG" -a -f "$INITPROG"; then isesix=`strings -a $INITPROG | \ $grep 'ESIX SYSTEM V/386 Release 4.0'` if $test -n "$isesix"; then osname=esix4 fi fi fi ;; esac ;; *) if $test -f /etc/systemid; then osname=sco set `echo $3 | $sed 's/\./ /g'` $4 if $test -f $src/hints/sco_$1_$2_$3.sh; then osvers=$1.$2.$3 elif $test -f $src/hints/sco_$1_$2.sh; then osvers=$1.$2 elif $test -f $src/hints/sco_$1.sh; then osvers=$1 fi else case "$osname" in '') : Still unknown. Probably a generic Sys V. osname="sysv" osvers="$3" ;; esac fi ;; esac ;; *) case "$osname" in '') : Still unknown. Probably a generic BSD. osname="$1" osvers="$3" ;; esac ;; esac else if $test -f /vmunix -a -f $src/hints/news_os.sh; then (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1 if $contains news-os UU/kernel.what >/dev/null 2>&1; then osname=news_os fi $rm -f UU/kernel.what elif $test -d c:/.; then set X $myuname osname=os2 osvers="$5" fi fi : Try to determine whether config.sh was made on this system case "$config_sh" in '') dflt=n case "$knowitall" in '') if test -f ../config.sh; then if $contains myuname= ../config.sh >/dev/null 2>&1; then eval "`$grep myuname= ../config.sh`" fi if test "X$myuname" = "X$newmyuname"; then dflt=y fi fi ;; *) dflt=y;; esac saved_osname="$osname" saved_osvers="$osvers" saved_libswanted="$libswanted" tmp_n="$n" tmp_c="$c" tmp_sh="$sh" : Get old answers from config file if it was generated on the same system hint=default if $test -f ../config.sh; then echo " " rp="I see a config.sh file. Shall I use it to set the defaults?" . ./myread case "$ans" in n*|N*) echo "OK, I'll ignore it." mv ../config.sh ../config.sh.old myuname="$newmyuname" ;; *) echo "Fetching default answers from your old config.sh file..." >&4 . ../config.sh cp ../config.sh . hint=previous case "$dflt" in n) echo " " rp="Do you want further invocations to use these defaults?" . ./myread case "$ans" in y*|Y*) myuname="$newmyuname";; esac ;; esac ;; esac fi ;; *) echo " " echo "Fetching default answers from $config_sh..." >&4 cd .. cp $config_sh config.sh 2>/dev/null chmod +w config.sh . ./config.sh cd UU cp ../config.sh . hint=previous ;; esac case "$sh" in '') sh="$tmp_sh" ;; esac $test "$override" && . ./optdef.sh : Restore computed paths for file in $loclist $trylist; do eval $file="\$_$file" done osname="$saved_osname" osvers="$saved_osvers" n="$tmp_n" c="$tmp_c" case "$libswanted" in "$saved_libswanted") ;; *) libs='';; esac libswanted="$saved_libswanted" . ./checkcc case "$targetarch" in '') ;; *) hostarch=$osname osname=`echo $targetarch|sed 's,^[^-]*-,,'` osvers='' ;; esac : Process their -A options . ./posthint.sh : Ask them to confirm the OS name cat << EOM Configure uses the operating system name and version to set some defaults. The default value is probably right if the name rings a bell. Otherwise, since spelling matters for me, either accept the default or answer "none" to leave it blank. EOM case "$osname" in ''|' ') case "$hintfile" in ''|' '|none) dflt=none ;; *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;; esac ;; *) dflt="$osname" ;; esac rp="Operating system name?" . ./myread case "$ans" in none) osname='' ;; *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;; esac echo " " case "$osvers" in ''|' ') case "$hintfile" in ''|' '|none) dflt=none ;; *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'` dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'` case "$dflt" in ''|' ') dflt=none ;; esac ;; esac ;; *) dflt="$osvers" ;; esac rp="Operating system version?" . ./myread case "$ans" in none) osvers='' ;; *) osvers="$ans" ;; esac : who configured the system cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1` cf_by=`(logname) 2>/dev/null` case "$cf_by" in "") cf_by=`(whoami) 2>/dev/null` case "$cf_by" in "") cf_by=unknown ;; esac ;; esac : allow them to override the AFS root case "$afsroot" in '') afsroot=/afs ;; *) afsroot=$afsroot ;; esac : is AFS running? echo " " case "$afs" in $define|true) afs=true ;; $undef|false) afs=false ;; *) if $test -d $afsroot; then afs=true else afs=false fi ;; esac if $afs; then echo "AFS may be running... I'll be extra cautious then..." >&4 else echo "AFS does not seem to be running..." >&4 fi : determine where manual pages are on this system echo " " case "$sysman" in '') syspath='/usr/share/man/man1 /usr/man/man1' syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1" syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1" syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1" syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1" syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1" sysman=`./loc . /usr/man/man1 $syspath` ;; esac if $test -d "$sysman"; then echo "System manual is in $sysman." >&4 else echo "Could not find manual pages in source form." >&4 fi : decide how portable to be case "$d_portable" in "$define") dflt=y;; *) dflt=n;; esac $cat <<'EOH' I can set things up so that your shell scripts and binaries are more portable, at what may be a noticable cost in performance. In particular, if you ask to be portable, the following happens: 1) Shell scripts will rely on the PATH variable rather than using the paths derived above. 2) ~username interpretations will be done at run time rather than by Configure. EOH rp="Do you expect to run these scripts and binaries on multiple machines?" . ./myread case "$ans" in y*) d_portable="$define" ;; *) d_portable="$undef" ;; esac : set up shell script to do ~ expansion cat >filexp <&2 exit 1 fi case "\$1" in */*) echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\` ;; *) echo \$dir ;; esac fi ;; *) echo \$1 ;; esac EOSS chmod +x filexp $eunicefix filexp : now set up to get a file name cat <getfile $startsh EOS cat <<'EOSC' >>getfile tilde='' fullpath='' already='' skip='' none_ok='' exp_file='' nopath_ok='' orig_rp="$rp" orig_dflt="$dflt" case "$gfpth" in '') gfpth='.' ;; esac case "$fn" in *\(*) : getfile will accept an answer from the comma-separated list : enclosed in parentheses even if it does not meet other criteria. expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok fn=`echo $fn | sed 's/(.*)//'` ;; esac case "$fn" in *:*) loc_file=`expr $fn : '.*:\(.*\)'` fn=`expr $fn : '\(.*\):.*'` ;; esac case "$fn" in *~*) tilde=true;; esac case "$fn" in */*) fullpath=true;; esac case "$fn" in *+*) skip=true;; esac case "$fn" in *n*) none_ok=true;; esac case "$fn" in *e*) exp_file=true;; esac case "$fn" in *p*) nopath_ok=true;; esac case "$fn" in *f*) type='File';; *d*) type='Directory';; *l*) type='Locate';; esac what="$type" case "$what" in Locate) what='File';; esac case "$exp_file" in '') case "$d_portable" in "$define") ;; *) exp_file=true;; esac ;; esac cd .. while test "$type"; do redo='' rp="$orig_rp" dflt="$orig_dflt" case "$tilde" in true) rp="$rp (~name ok)";; esac . UU/myread if test -f UU/getfile.ok && \ $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1 then value="$ans" ansexp="$ans" break fi case "$ans" in none) value='' ansexp='' case "$none_ok" in true) type='';; esac ;; *) case "$tilde" in '') value="$ans" ansexp="$ans";; *) value=`UU/filexp $ans` case $? in 0) if test "$ans" != "$value"; then echo "(That expands to $value on this system.)" fi ;; *) value="$ans";; esac ansexp="$value" case "$exp_file" in '') value="$ans";; esac ;; esac case "$fullpath" in true) case "$ansexp" in /*) value="$ansexp" ;; [a-zA-Z]:/*) value="$ansexp" ;; [a-zA-Z]:\\*) value="$ansexp" ;; *) redo=true case "$already" in true) echo "I shall only accept a full path name, as in /bin/ls." >&4 echo "Use a ! shell escape if you wish to check pathnames." >&4 ;; *) echo "Please give a full path name, starting with slash." >&4 case "$tilde" in true) echo "Note that using ~name is ok provided it expands well." >&4 already=true ;; esac esac ;; esac ;; esac case "$redo" in '') case "$type" in File) for fp in $gfpth; do if test "X$fp" = X.; then pf="$ansexp" else pf="$fp/$ansexp" fi if test -f "$pf"; then type='' elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1 then echo "($value is not a plain file, but that's ok.)" type='' fi if test X"$type" = X; then value="$pf" break fi done ;; Directory) for fp in $gfpth; do if test "X$fp" = X.; then dir="$ans" direxp="$ansexp" else dir="$fp/$ansexp" direxp="$fp/$ansexp" fi if test -d "$direxp"; then type='' value="$dir" break fi done ;; Locate) if test -d "$ansexp"; then echo "(Looking for $loc_file in directory $value.)" value="$value/$loc_file" ansexp="$ansexp/$loc_file" fi if test -f "$ansexp"; then type='' fi case "$nopath_ok" in true) case "$value" in */*) ;; *) echo "Assuming $value will be in people's path." type='' ;; esac ;; esac ;; esac case "$skip" in true) type=''; esac case "$type" in '') ;; *) if test "$fastread" = yes; then dflt=y else dflt=n fi rp="$what $value doesn't exist. Use that name anyway?" . UU/myread dflt='' case "$ans" in y*) type='';; *) echo " ";; esac ;; esac ;; esac ;; esac done cd UU ans="$value" rp="$orig_rp" dflt="$orig_dflt" rm -f getfile.ok test "X$gfpthkeep" != Xy && gfpth="" EOSC : determine root of directory hierarchy where package will be installed. case "$prefix" in '') dflt=`./loc . /usr/local /usr/local /local /opt /usr` ;; *) dflt="$prefix" ;; esac $cat <bsd echo exit 1 >usg echo exit 1 >v7 echo exit 1 >osf1 echo exit 1 >eunice echo exit 1 >xenix echo exit 1 >venix echo exit 1 >os2 echo exit 1 >gnu echo exit 1 >linux echo exit 1 >dos echo exit 1 >windows d_bsd="$undef" d_linux="$undef" d_dos="$undef" d_os2="$undef" d_windows="$undef" $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1 then echo "Looks kind of like an OSF/1 system, but we'll see..." echo exit 0 >osf1 elif test `echo abc | $tr a-z A-Z` = Abc ; then xxx=`./loc addbib blurfl $pth` if $test -f $xxx; then echo "Looks kind of like a USG system with BSD features, but we'll see..." echo exit 0 >bsd echo exit 0 >usg else if $contains SIGTSTP foo >/dev/null 2>&1 ; then echo "Looks kind of like an extended USG system, but we'll see..." else echo "Looks kind of like a USG system, but we'll see..." fi echo exit 0 >usg fi elif $contains SIGTSTP foo >/dev/null 2>&1 ; then echo "Looks kind of like a BSD system, but we'll see..." d_bsd="$define" echo exit 0 >bsd elif $rm --version 2>/dev/null >foo; $contains "Free Software Foundation" foo >/dev/null then xxx=`uname` echo exit 0 >gnu echo "Looks kind of like a GNU/$xxx system, but we'll see..." if $test X$xxx = XLinux; then d_linux="$define" echo exit 0 >linux fi else echo "Looks kind of like a Version 7 system, but we'll see..." echo exit 0 >v7 fi case "$eunicefix" in *unixtovms*) $cat <<'EOI' There is, however, a strange, musty smell in the air that reminds me of something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. EOI echo exit 0 >eunice d_eunice="$define" : it so happens the Eunice I know will not run shell scripts in Unix format ;; *) echo " " echo "Congratulations. You aren't running Eunice." d_eunice="$undef" ;; esac if test -d c:/.; then case "X${MACHTYPE:-nonesuchmach}" in *cygwin) echo " "; echo "Hah!... you're running under Cygwin!";; *msys) echo " "; echo "Hah!... you're running under MinGW!";; esac case "X${MACHTYPE:-nonesuchmach}" in *cygwin|*msys) echo exit 0 >windows d_windows="$define" ;; esac fi case "$p_" in :) ;; *) $cat <<'EOI' I have the feeling something is not exactly right, however...don't tell me... EOI if test -n "$DJGPP"; then echo exit 0 >dos d_dos="$define" else $cat <<'EOI' lemme think...does HAL ring a bell?...no, of course, you're only running OS/2! EOI echo exit 0 >os2 d_os2="$define" fi ;; esac if test -f /xenix; then echo "Actually, this looks more like a XENIX system..." echo exit 0 >xenix d_xenix="$define" else echo " " echo "It's not Xenix..." d_xenix="$undef" fi chmod +x xenix $eunicefix xenix if test -f /venix; then echo "Actually, this looks more like a VENIX system..." echo exit 0 >venix else echo " " if ./xenix; then : null else echo "Nor is it Venix..." fi fi chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux windows $eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux windows $rm -f foo : What should the include directory be ? echo " " $echo $n "Hmm... $c" incpath='' mips_type='' if $test -f /bin/mips && /bin/mips; then echo "Looks like a MIPS system..." $cat >usr.c <<'EOCP' #ifdef SYSTYPE_BSD43 /bsd43 #endif EOCP if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then dflt='/bsd43/usr/include' incpath='/bsd43' mips_type='BSD 4.3' else mips_type='System V' fi $rm -f usr.c usr.out echo "and you're compiling with the $mips_type compiler and libraries." echo "exit 0" >mips else echo "Doesn't look like a MIPS system." echo "exit 1" >mips fi chmod +x mips $eunicefix mips : What should the include directory be ? echo " " dflt='/usr/include' case "$usrinc" in '') dflt="$incpath/usr/include";; *) dflt="$usrinc";; esac fn=d/ rp='Where are the include files you want to use?' . ./getfile usrinc="$ans" : see if we have to deal with yellow pages, now NIS. if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then if $test -f /usr/etc/nibindd; then echo " " echo "I'm fairly confident you're on a NeXT." echo " " rp='Do you get the hosts file via NetInfo?' dflt=y case "$hostcat" in nidump*) ;; '') ;; *) dflt=n;; esac . ./myread case "$ans" in y*) hostcat='nidump hosts .';; *) case "$hostcat" in nidump*) hostcat='';; esac ;; esac fi case "$hostcat" in nidump*) ;; *) case "$hostcat" in *ypcat*) dflt=y;; '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then dflt=y else dflt=n fi;; *) dflt=n;; esac echo " " rp='Are you getting the hosts file via yellow pages?' . ./myread case "$ans" in y*) hostcat='ypcat hosts';; *) hostcat='cat /etc/hosts';; esac ;; esac fi case "$hostcat" in '') hostcat=':' $test -f /etc/hosts && hostcat='cat /etc/hosts';; esac case "$groupcat" in '') groupcat=':' $test -f /etc/group && groupcat='cat /etc/group';; esac case "$passcat" in '') passcat=':' $test -f /etc/passwd && passcat='cat /etc/passwd';; esac : now get the host name echo " " echo "Figuring out host name..." >&4 case "$myhostname" in '') cont=true echo 'Maybe "hostname" will work...' if tans=`sh -c hostname 2>&1` ; then myhostname=$tans phostname=hostname cont='' fi ;; *) cont='';; esac if $test "$cont"; then if ./xenix; then echo 'Oh, dear. Maybe "/etc/systemid" is the key...' if tans=`cat /etc/systemid 2>&1` ; then myhostname=$tans phostname='cat /etc/systemid' echo "Whadyaknow. Xenix always was a bit strange..." cont='' fi elif $test -r /etc/systemid; then echo "(What is a non-Xenix system doing with /etc/systemid?)" fi fi if $test "$cont"; then echo 'No, maybe "uuname -l" will work...' if tans=`sh -c 'uuname -l' 2>&1` ; then myhostname=$tans phostname='uuname -l' else echo 'Strange. Maybe "uname -n" will work...' if tans=`sh -c 'uname -n' 2>&1` ; then myhostname=$tans phostname='uname -n' else echo 'Oh well, maybe I can mine it out of whoami.h...' if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'` phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h" else case "$myhostname" in '') echo "Does this machine have an identity crisis or something?" phostname='';; *) echo "Well, you said $myhostname before..." phostname='echo $myhostname';; esac fi fi fi fi case "$myhostname" in '') myhostname=noname ;; esac : you do not want to know about this set $myhostname myhostname=$1 : verify guess if $test "$myhostname" ; then dflt=y rp='Your host name appears to be "'$myhostname'".'" Right?" . ./myread case "$ans" in y*) ;; *) myhostname='';; esac fi : bad guess or no guess while $test "X$myhostname" = X ; do dflt='' rp="Please type the (one word) name of your host:" . ./myread myhostname="$ans" done : translate upper to lower if necessary case "$myhostname" in *[A-Z]*) echo "(Normalizing case in your host name)" myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'` ;; esac case "$myhostname" in *.*) dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"` myhostname=`expr "X$myhostname" : "X\([^.]*\)\."` echo "(Trimming domain name from host name--host name is now $myhostname)" ;; *) case "$mydomain" in '') { test "X$hostcat" = "Xypcat hosts" && ypmatch "$myhostname" hosts 2>/dev/null |\ $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \ $test -s hosts } || { $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ / /[ ]$myhostname[ . ]/p" > hosts } tmp_re="[ . ]" $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ } END { print sum }" hosts` = x1 || tmp_re="[ ]" dflt=.`$awk \ "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \ hosts | $sort | $uniq | \ $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"` case `$echo X$dflt` in X*\ *) echo "(Several hosts in /etc/hosts matched hostname)" dflt=. ;; X.) if $test -f /etc/hosts; then echo "(You do not have fully-qualified names in /etc/hosts)" else echo "(I cannot locate a hosts database anywhere)" fi ;; esac case "$dflt" in .) tans=`./loc resolv.conf X /etc /usr/etc` if $test -f "$tans"; then echo "(Attempting domain name extraction from $tans)" dflt=.`$sed -n -e 's/ / /g' \ -e 's/^search *\([^ ]*\).*/\1/p' $tans \ | ./tr '[A-Z]' '[a-z]' 2>/dev/null` case "$dflt" in .) dflt=.`$sed -n -e 's/ / /g' \ -e 's/^domain *\([^ ]*\).*/\1/p' $tans \ | ./tr '[A-Z]' '[a-z]' 2>/dev/null` ;; esac fi ;; esac case "$dflt" in .) echo "(No help from resolv.conf either -- attempting clever guess)" dflt=.`sh -c domainname 2>/dev/null` case "$dflt" in '') dflt='.';; .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;; esac ;; esac case "$dflt$osname" in .os390) file="//'SYS1.TCPPARMS(TCPDATA)'" echo "(Attempting domain name extraction from $file)" dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "$file" 2>/dev/null` ;; esac case "$dflt" in .) echo "(Lost all hope -- silly guess then)" dflt='.nonet' ;; esac $rm -f hosts ;; *) dflt="$mydomain";; esac;; esac echo " " rp="What is your domain name?" . ./myread tans="$ans" case "$ans" in '') ;; .*) ;; *) tans=".$tans";; esac mydomain="$tans" : translate upper to lower if necessary case "$mydomain" in *[A-Z]*) echo "(Normalizing case in your domain name)" mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'` ;; esac : a little sanity check here case "$phostname" in '') ;; *) case `$phostname | ./tr '[A-Z]' '[a-z]'` in $myhostname$mydomain|$myhostname) ;; *) case "$phostname" in sed*) echo "(That doesn't agree with your whoami.h file, by the way.)" ;; *) echo "(That doesn't agree with your $phostname command, by the way.)" ;; esac ;; esac ;; esac : determine the e-mail address of the user who is running us $cat <&4 $cat >foo.c <<'EOF' #define A(x) x #define B(y) y A(a)B(b) EOF if $cpp foo.c >foo.cpp; $contains ab foo.cpp >/dev/null 2>&1; then echo "Plain '$cpp' works just fine." cpp_trad="$cpp" elif $cpp -traditional foo.c >foo.cpp; \ $contains ab foo.cpp >/dev/null 2>&1; then echo "We'll use '$cpp -traditional' to get proper semantics." cpp_trad="$cpp -traditional" else echo "I don't know how to get traditional semantics with '$cpp'." >&4 cpp_trad="$cpp" fi $rm -f foo.c foo.cpp : Check whether they have gcc in any guise. echo " " echo "Checking for GNU cc in disguise and/or its version number..." >&4 $cat >try.c < try 2>&1 then gccversion=`$grep gcc_version_major try | sed 's/^.*gcc_version_major[\t ]*//'` case "$gccversion" in '') echo "You are not using GNU cc." ;; *) echo "You are using GNU cc $gccversion." ccname=gcc ;; esac else gccversion='' fi $rm -f try try.* case "$gccversion" in 1*) cpp=`./loc gcc-cpp $cpp $pth` ;; esac case "$gccversion" in '') gccosandvers='' ;; *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'` gccosandvers=`$cc -v 2>&1 | \ $grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"` gccshortvers='' case "$gccosandvers" in $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr $osname$osvers) ;; # looking good $osname*) cat <&4 *** WHOA THERE!!! *** Your gcc has not been compiled for the exact release of your operating system ($gccosandvers versus $osname$osvers). In general it is a good idea to keep gcc synchronized with the operating system because otherwise serious problems may ensue when trying to compile software, like Perl. I'm trying to be optimistic here, though, and will continue. If later during the configuration and build icky compilation problems appear (headerfile conflicts being the most common manifestation), I suggest reinstalling the gcc to match your operating system release. EOM ;; *) gccosandvers='' ;; # failed to parse, better be silent esac ;; esac case "$ccname" in '') ccname="$cc" ;; esac : gcc 3.1 complains about adding -Idirectories that it already knows about, : so we will take those off from locincpth. case "$gccversion" in 3*) echo "main(){}">try.c for incdir in `$cc -v -c try.c 2>&1 | \ sed '1,/^#include <\.\.\.>/d;/^End of search list/,$d;s/^ //'` ; do locincpth=`echo $locincpth | sed s!$incdir!!` done $rm -f try try.* esac : see how we invoke the C preprocessor echo " " echo "Now, how can we feed standard input to your C preprocessor..." >&4 cat <<'EOT' >testcpp.c #define ABC abc #define XYZ xyz ABC.XYZ EOT cd .. if $test ! -f cppstdin; then echo "$startsh" >cppstdin if $test "X$osname" = "Xaix" -a "X$gccversion" = X; then echo 'cat >.$$.c; rm -f .$$.u; '"$cc"' ${1+"$@"} -M -c .$$.c 2>/dev/null; \ test -s .$$.u && \ awk '"'"'$2 ~ /\.h$/ { print "# 0 \""$2"\"" }'"'"' .$$.u; \ rm -f .$$.o .$$.u; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >> cppstdin else echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >>cppstdin fi; else echo "Keeping your $hint cppstdin wrapper." fi chmod 755 cppstdin $eunicefix cppstdin wrapper=`pwd`/cppstdin ok='false' cd UU if $test "X$cppstdin" != "X" && \ $cppstdin $cppminus testcpp.out 2>&1 && \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 then echo "You used to use $cppstdin $cppminus so we'll use that again." case "$cpprun" in '') echo "But let's see if we can live without a wrapper..." ;; *) if $cpprun $cpplast testcpp.out 2>&1 && \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 then echo "(And we'll use $cpprun $cpplast to preprocess directly.)" ok='true' else echo "(However, $cpprun $cpplast does not work, let's see...)" fi ;; esac else case "$cppstdin" in '') ;; *) echo "Good old $cppstdin $cppminus does not seem to be of any help..." ;; esac fi if $ok; then : nothing elif echo 'Maybe "'"$cc"' -E" will work...'; \ $cc -E testcpp.out 2>&1; \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then echo "Yup, it does." x_cpp="$cc -E" x_minus=''; elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \ $cc -E - testcpp.out 2>&1; \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then echo "Yup, it does." x_cpp="$cc -E" x_minus='-'; elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \ $cc -P testcpp.out 2>&1; \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then echo "Yipee, that works!" x_cpp="$cc -P" x_minus=''; elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \ $cc -P - testcpp.out 2>&1; \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then echo "At long last!" x_cpp="$cc -P" x_minus='-'; elif echo 'No such luck, maybe "'$cpp'" will work...'; \ $cpp testcpp.out 2>&1; \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then echo "It works!" x_cpp="$cpp" x_minus=''; elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \ $cpp - testcpp.out 2>&1; \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then echo "Hooray, it works! I was beginning to wonder." x_cpp="$cpp" x_minus='-'; elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \ $wrapper testcpp.out 2>&1; \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then x_cpp="$wrapper" x_minus='' echo "Eureka!" else dflt='' rp="No dice. I can't find a C preprocessor. Name one:" . ./myread x_cpp="$ans" x_minus='' $x_cpp testcpp.out 2>&1 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then echo "OK, that will do." >&4 else echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4 exit 1 fi fi case "$ok" in false) cppstdin="$x_cpp" cppminus="$x_minus" cpprun="$x_cpp" cpplast="$x_minus" set X $x_cpp shift case "$1" in "$cpp") echo "Perhaps can we force $cc -E using a wrapper..." if $wrapper testcpp.out 2>&1; \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 then echo "Yup, we can." cppstdin="$wrapper" cppminus=''; else echo "Nope, we'll have to live without it..." fi ;; esac case "$cpprun" in "$wrapper") cpprun='' cpplast='' ;; esac ;; esac case "$cppstdin" in "$wrapper"|'cppstdin') ;; *) $rm -f $wrapper;; esac $rm -f testcpp.c testcpp.out : Set private lib path case "$plibpth" in '') if ./mips; then plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib" fi;; esac case "$libpth" in ' ') dlist='';; '') dlist="$loclibpth $plibpth $glibpth";; *) dlist="$libpth";; esac : Now check and see which directories actually exist, avoiding duplicates libpth='' for xxx in $dlist do if $test -d $xxx; then case " $libpth " in *" $xxx "*) ;; *) libpth="$libpth $xxx";; esac fi done $cat <<'EOM' Some systems have incompatible or broken versions of libraries. Among the directories listed in the question below, please remove any you know not to be holding relevant libraries, and add any that are needed. Say "none" for none. EOM case "$libpth" in '') dflt='none';; *) set X $libpth shift dflt=${1+"$@"} ;; esac rp="Directories to use for library searches?" . ./myread case "$ans" in none) libpth=' ';; *) libpth="$ans";; esac : determine optimize, if desired, or use for debug flag also case "$optimize" in ' '|$undef) dflt='none';; '') case "$gccversion" in '') dflt='-O';; *) dflt='-O2 -g';; esac ;; *) dflt="$optimize";; esac case "$gccversion" in '') $cat </dev/null 2>&1 then dflt="$dflt -posix" fi ;; esac case "$gccversion" in 1*|2*) dflt="$dflt -Wall";; *) dflt="$dflt -W -Wall -Wformat=2 -Wshadow";; esac ;; esac case "$mips_type" in *BSD*|'') inclwanted="$locincpth $usrinc";; *) inclwanted="$locincpth $inclwanted $usrinc/bsd";; esac for thisincl in $inclwanted; do if $test -d $thisincl; then if $test x$thisincl != x$usrinc; then case "$dflt" in *$thisincl*);; *) dflt="$dflt -I$thisincl";; esac fi fi done inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then xxx=true; elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then xxx=true; else xxx=false; fi; if $xxx; then case "$dflt" in *$2*);; *) dflt="$dflt -D$2";; esac; fi' if ./osf1; then set signal.h __LANGUAGE_C__; eval $inctest else set signal.h LANGUAGE_C; eval $inctest fi case "$hint" in default|recommended) dflt="$dflt $ccflags" ;; *) dflt="$ccflags";; esac case "$dflt" in ''|' ') dflt=none;; esac $cat <&4 set X $cppflags shift cppflags='' $cat >cpp.c <<'EOM' #define BLURFL foo BLURFL xx LFRULB EOM previous='' for flag in $* do case "$flag" in -*) ftry="$flag";; *) ftry="$previous $flag";; esac if $cppstdin -DLFRULB=bar $ftry $cppminus cpp1.out 2>/dev/null && \ $cpprun -DLFRULB=bar $ftry $cpplast cpp2.out 2>/dev/null && \ $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \ $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1 then cppflags="$cppflags $ftry" previous='' else previous="$flag" fi done set X $cppflags shift cppflags=${1+"$@"} case "$cppflags" in *-*) echo "They appear to be: $cppflags";; esac $rm -f cpp.c cpp?.out ;; esac : flags used in final linking phase case "$ldflags" in '') if ./venix; then dflt='-i -z' else dflt='' fi case "$ccflags" in *-posix*) dflt="$dflt -posix" ;; esac ;; *) dflt="$ldflags";; esac : Try to guess additional flags to pick up local libraries. for thislibdir in $libpth; do case " $loclibpth " in *" $thislibdir "*) case "$dflt " in *"-L$thislibdir "*) ;; *) dflt="$dflt -L$thislibdir" ;; esac ;; esac done case "$dflt" in '') dflt='none' ;; *) set X $dflt; shift; dflt="$@";; esac $cat <&4 set X $cc $optimize $pthread $ccflags $ldflags -o try try.c shift $cat >try.msg < try.c <<'EOF' int main() { return 0; } EOF dflt=y if sh -c "$cc $optimize $ccflags $ldflags -o try try.c" >>try.msg 2>&1; then if sh -c './try' >>try.msg 2>&1; then dflt=n else echo "The program compiled OK, but exited with status $?." >>try.msg rp="You have a problem. Shall I abort Configure" dflt=y fi else echo "I can't compile the test program." >>try.msg rp="You have a BIG problem. Shall I abort Configure" dflt=y fi case "$dflt" in y) $cat try.msg >&4 case "$knowitall" in '') echo "(The supplied flags might be incorrect with this C compiler.)" ;; *) dflt=n;; esac echo " " . ./myread case "$ans" in n*|N*) ;; *) echo "Ok. Stopping Configure." >&4 exit 1 ;; esac ;; n) echo "OK, that should do.";; esac $rm -f try try.* core : determine default editor echo " " case "$defeditor" in '') case "$vi" in */*) dflt="$vi";; *) dflt=/usr/ucb/vi;; esac ;; *) dflt="$defeditor" ;; esac fn=f/ rp="What is the default editor on your system?" . ./getfile defeditor="$ans" : locate a BSD compatible install program echo " " echo "Looking for a BSD-compatible install program..." >&4 creatdir='' case "$install" in '') tryit='' for dir in $pth; do for file in ginstall installbsd scoinst install; do if $test -f $dir/$file; then tryit="$tryit $dir/$file" fi done done $cat >try.c </dev/null 2>&1; then cp try try.ns strip try >/dev/null 2>&1 else echo "(I can't seem to compile a trivial C program -- bypassing.)" echo "try" >try cp try try.ns fi $cat >tryinst </dev/null 2>&1 if $test -d foo/bar; then creatdir="$prog -d" fi (ls -l d/try >try.ls; ls -l d/try.ns >tryno.ls) 2>/dev/null try_wc=`($wc -c try | $awk '{ print $1}') 2>/dev/null` tryns_wc=`($wc -c try.ns | $awk '{ print $1}') 2>/dev/null` d_try_wc=`($wc -c d/try | $awk '{ print $1}') 2>/dev/null` d_tryns_wc=`($wc -c d/try.ns | $awk '{ print $1}') 2>/dev/null` if ($test "X$try_wc" = "X$d_try_wc" && \ $test "X$tryns_wc" = "X$d_tryns_wc" && \ $contains 'rwxrw-r--' tryno.ls && \ $contains 'rw-r---w-' try.ls) >/dev/null 2>&1 then dflt="$prog" echo "ok, that will do." break fi echo "not good$either." either=' either' $rm -f try*.ls done $rm -rf foo d tryinst try try*.ls try.* case "$dflt" in '') echo "Hopefully, $package comes with its own install script!" dflt='./install' ;; esac ;; *) dflt="$install";; esac $cat <&4 case "$installdir" in '') $mkdir -p foo/bar >/dev/null 2>&1 if $test -d foo/bar; then echo "Great, we can build them using 'mkdir -p'." creatdir='mkdir -p' else case "$creatdir" in '') if eval "$install -d foo/bar"; $test -d foo/bar; then creatdir="install -d" echo "It looks like '$creatdir' will do it for us." fi ;; *) eval "$creatdir foo/bar" >/dev/null 2>&1 if $test -d foo/bar; then echo "Ah! We can use '$creatdir' to do just that." else creatdir='' fi ;; esac fi $rm -rf foo case "$creatdir" in '') echo "Heck! Another ancient system lacking the comfort of modern ones!" echo "You can thank $package for bringing you its own install script!" installdir='./install -d' ;; *) installdir="$creatdir";; esac ;; *) echo "As you already told me, '$installdir' should work.";; esac : determine the name of a reasonable mailer case "$mailer" in '') if $test -f "$sendmail"; then dflt="$sendmail" elif $test -f "$smail"; then dflt="$smail" elif $test -f "$rmail"; then dflt="$rmail" elif $test -f /bin/mail; then dflt=/bin/mail else dflt=$mail fi ;; *) dflt="$mailer";; esac $cat <&4 if $test -r $rsrc/patchlevel.h;then patchlevel=`awk \ '/^#[ ]*define[ ][ ]*PATCHLEVEL/ {print $3}' \ < $rsrc/patchlevel.h` else patchlevel=0 fi if $test -r $rsrc/revision.h;then revision=`awk \ '/^#[ ]*define[ ][ ]*REVISION/ {print $3}' \ < $rsrc/revision.h` case "$revision" in '"$Revision:') revision=`awk \ '/^#[ ]*define[ ][ ]*REVISION/ {print $4}' \ < $rsrc/revision.h` ;; esac else revision=0 fi case "$revision" in 0) echo "(You have $package $baserev PL$patchlevel.)" ;; *) case "$patchlevel" in 0) echo "(You have $package $baserev-$revision)";; *) echo "(You have $package $baserev-$revision PL$patchlevel)";; esac ;; esac : determine perl absolute location case "$perlpath" in '') if test -f /usr/bin/perl; then dflt=/usr/bin/perl else case "$perl" in */*) dflt="$perl";; *) dflt=/usr/bin/perl;; esac fi ;; *) dflt="$perlpath" ;; esac echo " " fn=f~/ rp="Where is perl located on your system?" . ./getfile perlpath="$ans" : figure out how to guarantee perl startup case "$sharpbang" in *!) $cat >xtry </dev/null 2>&1; then $cat <&4 . ./config.arch fi : configuration may be patched via a 'config.over' file if $test -f config.over; then echo " " dflt=y rp='I see a config.over file. Do you wish to load it?' . UU/myread case "$ans" in n*) echo "OK, I'll ignore it.";; *) . ./config.over echo "Configuration override changes have been loaded." ;; esac fi : in case they want portability, strip down executable paths case "$d_portable" in "$define") echo " " echo "Stripping down executable paths..." >&4 xsed=$sed for file in $loclist $trylist; do eval sfile="\$$file" sfile=`echo $sfile | $xsed -e 's,.*/\(.*\),\1,'` eval $file="$sfile" done ;; esac : create config.sh file echo " " echo "Creating config.sh..." >&4 $spitshell <config.sh $startsh # # This file was produced by running the Configure script. It holds all the # definitions figured out by Configure. Should you modify one of these values, # do not forget to propagate your changes by running "Configure -der". You may # instead choose to run each of the .SH files by yourself, or "Configure -S". # # Package name : $package # Source directory : $src # Configuration time: $cf_time # Configured by : $cf_by # Target system : $myuname EOT $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh $spitshell <>config.sh Author='$Author' Date='$Date' Header='$Header' Id='$Id' Locker='$Locker' Log='$Log' RCSfile='$RCSfile' Revision='$Revision' Source='$Source' State='$State' _a='$_a' _exe='$_exe' _o='$_o' afs='$afs' afsroot='$afsroot' ar='$ar' archobjs='$archobjs' awk='$awk' baserev='$baserev' bash='$bash' bison='$bison' byacc='$byacc' c='$c' cat='$cat' ccflags='$ccflags' ccname='$ccname' ccversion='$ccversion' cf_by='$cf_by' cf_email='$cf_email' cf_time='$cf_time' chgrp='$chgrp' chmod='$chmod' chown='$chown' comm='$comm' compress='$compress' contains='$contains' cp='$cp' cpio='$cpio' cpp='$cpp' cpp_trad='$cpp_trad' cppflags='$cppflags' cpplast='$cpplast' cppminus='$cppminus' cpprun='$cpprun' cppstdin='$cppstdin' csh='$csh' d_berknames='$d_berknames' d_bsd='$d_bsd' d_dos='$d_dos' d_eunice='$d_eunice' d_linux='$d_linux' d_os2='$d_os2' d_passnames='$d_passnames' d_portable='$d_portable' d_usgnames='$d_usgnames' d_windows='$d_windows' d_xenix='$d_xenix' date='$date' defeditor='$defeditor' echo='$echo' egrep='$egrep' emacs='$emacs' eunicefix='$eunicefix' expr='$expr' find='$find' firstmakefile='$firstmakefile' flex='$flex' from='$from' gcc='$gcc' gccosandvers='$gccosandvers' gccversion='$gccversion' glibpth='$glibpth' gmake='$gmake' gmsgfmt='$gmsgfmt' grep='$grep' groupcat='$groupcat' gzip='$gzip' hint='$hint' hostcat='$hostcat' incpath='$incpath' inews='$inews' install='$install' installdir='$installdir' installmansrc='$installmansrc' installprivlib='$installprivlib' installscript='$installscript' issymlink='$issymlink' ksh='$ksh' ldflags='$ldflags' less='$less' libpth='$libpth' line='$line' lint='$lint' lkflags='$lkflags' ln='$ln' lns='$lns' locincpth='$locincpth' loclibpth='$loclibpth' lp='$lp' lpr='$lpr' ls='$ls' mail='$mail' mailer='$mailer' mailx='$mailx' make='$make' make_set_make='$make_set_make' manext='$manext' mansrc='$mansrc' mansrcexp='$mansrcexp' mips_type='$mips_type' mkdir='$mkdir' more='$more' msgfmt='$msgfmt' msgmerge='$msgmerge' mv='$mv' mydomain='$mydomain' myhostname='$myhostname' myuname='$myuname' n='$n' nametype='$nametype' nawk='$nawk' nm='$nm' nroff='$nroff' optimize='$optimize' orgname='$orgname' osname='$osname' osvers='$osvers' package='$package' pager='$pager' passcat='$passcat' patchlevel='$patchlevel' perl='$perl' perlpath='$perlpath' pg='$pg' phostname='$phostname' pkgsrc='$pkgsrc' plibpth='$plibpth' pmake='$pmake' pr='$pr' prefix='$prefix' prefixexp='$prefixexp' privlib='$privlib' privlibexp='$privlibexp' pthread='$pthread' revision='$revision' rm='$rm' rmail='$rmail' run='$run' scriptdir='$scriptdir' scriptdirexp='$scriptdirexp' sed='$sed' sendmail='$sendmail' sh='$sh' shar='$shar' sharpbang='$sharpbang' shsharp='$shsharp' sleep='$sleep' smail='$smail' sort='$sort' spackage='$spackage' spitshell='$spitshell' src='$src' startperl='$startperl' startsh='$startsh' submit='$submit' sysman='$sysman' tail='$tail' tar='$tar' targetarch='$targetarch' tbl='$tbl' tee='$tee' test='$test' to='$to' touch='$touch' tr='$tr' trnl='$trnl' troff='$troff' uname='$uname' uniq='$uniq' usecrosscompile='$usecrosscompile' usrinc='$usrinc' uuname='$uuname' vi='$vi' wc='$wc' xgettext='$xgettext' xlibpth='$xlibpth' zcat='$zcat' zip='$zip' EOT : add special variables $test -f $src/patchlevel.h && \ awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh $test -f $src/revision.h && \ sed -ne 's/^#define \([A-Za-z0-9_]*\) ".*: \([0-9]*\).*"/\1=\2/p' \ < $src/revision.h >>config.sh echo "CONFIG=true" >>config.sh : propagate old symbols if $test -f UU/config.sh; then UU/oldconfig.sh $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \ config.sh config.sh UU/oldconfig.sh |\ $sort | $uniq -u >UU/oldsyms set X `cat UU/oldsyms` shift case $# in 0) ;; *) cat <>config.sh for sym in `cat UU/oldsyms`; do echo " Propagating $hint variable "'$'"$sym..." eval 'tmp="$'"${sym}"'"' echo "$tmp" | \ sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh done ;; esac fi : Finish up by extracting the .SH files case "$alldone" in exit) echo "Stopping at your request, leaving temporary files around." exit 0 ;; cont) ;; '') dflt='' nostick=true $cat <&4 -c "$ans";; esac ;; esac : if this fails, just run all the .SH files by hand . ./config.sh echo " " exec 1>&4 pwd=`pwd` . ./UU/extract cd "$pwd" if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then dflt=y case "$silent" in true) ;; *) $cat < makedepend.out &" It can take a while, so you might not want to run it right now. EOM ;; esac rp="Run $make depend now?" . UU/myread case "$ans" in y*) $make depend && echo "Now you must run '$make'." ;; *) echo "You must run '$make depend' then '$make'." ;; esac elif test -f [Mm]akefile; then echo " " echo "Now you must run a $make." else echo "Configure done." fi if $test -f Policy.sh; then $cat <&4 fi $rm -f kit*isdone ark*isdone $rm -rf UU : End of Configure dist_3.5-36.001/Makefile.SH0000755000175000017500000001540711714261665015401 0ustar srivastasrivasta: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-119] : $X-Id: Jmake.tmpl 69 2011-01-09 13:57:07Z rmanfredi $ case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac CURRENT=. DIR=`echo $CURRENT/ | sed -e 's/\.\///g'` echo "Extracting ${DIR}Makefile (with variable substitutions)" INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'` INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'` DATE=`date` $spitshell >Makefile <>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files # $X-Id: Jmake.rules 106 2011-11-25 20:36:12Z rmanfredi $ ######################################################################## # Start of Jmakefile # $X-Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $X-Log: Jmakefile,v $ # Revision 3.0.1.2 1995/07/25 13:29:41 ram # patch56: re-ordered macros, moving the install at the end # # Revision 3.0.1.1 1994/01/24 13:42:41 ram # patch16: added dependency generation stage # # Revision 3.0 1993/08/18 12:03:53 ram # Baseline for dist 3.0 netwide release. # all:: depend:: sub_depend sub_depend:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "Depending" "in $(DIR)$$i..."; \ $(MAKE) $(MFLAGS) depend) || exit 1; \ done local_clobber:: $(RM) install local_install.man:: dist.man @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \ $(INSTALL) -c -m 444 dist.man $(INSTALL_PREFIX)$(MANSRC)/dist.$(L) local_deinstall.man:: $(RM) $(INSTALL_PREFIX)$(MANSRC)/dist.$(L) all:: revision.h .FORCE: revision.h: .FORCE $(TOP)/bin/svn-revision $(TOP) $@ ######################################################################## # Common rules for all Makefiles -- do not edit all:: clean: sub_clean local_clean realclean: sub_realclean local_realclean clobber: sub_clobber local_clobber local_clean:: if test -f core; then $(RM) core; fi $(RM) *~ *.o local_realclean:: local_clean $(RM) -r UU local_clobber:: local_realclean $(RM) config.sh config.h $(RM) -r .config $(RM) Makefile install:: local_install sub_install @exit 0 install.man:: maybe_install.man sub_install.man deinstall:: sub_deinstall local_deinstall deinstall.man:: sub_deinstall.man maybe_deinstall.man install.man-yes: local_install.man install.man-no: deinstall.man-yes: local_deinstall.man deinstall.man-no: !NO!SUBS! case "$installmansrc" in '') man=no;; *) man=yes;; esac $spitshell >>Makefile <>Makefile <<'!NO!SUBS!' Makefile.SH: Jmakefile -@if test -f $(TOP)/.package; then \ if test -f Makefile.SH; then \ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ fi; \ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ else touch $@; fi Makefile: Makefile.SH /bin/sh Makefile.SH tags:: $(CTAGS) -w *.[ch] $(CTAGS) -xw *.[ch] > tags local_clobber:: $(RM) tags depend:: ######################################################################## # Rules for building in sub-directories -- do not edit subdirs: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \ done sub_install:: @$(MAKE) subdirs TARGET=install VERB="Installing" FLAGS= sub_deinstall:: @$(MAKE) subdirs TARGET=deinstall VERB="Deinstalling" FLAGS= @echo "Back to $(CURRENT) for "deinstall... sub_install.man:: @$(MAKE) subdirs TARGET=install.man VERB="Installing man pages" FLAGS= sub_deinstall.man:: @$(MAKE) subdirs TARGET=deinstall.man VERB="Deinstalling man pages" FLAGS= @echo "Back to $(CURRENT) for "deinstall.man... sub_clean:: @$(MAKE) subdirs TARGET=clean VERB="Cleaning" FLAGS= @echo "Back to $(CURRENT) for "clean... sub_realclean:: @$(MAKE) subdirs TARGET=realclean VERB="Real cleaning" FLAGS= @echo "Back to $(CURRENT) for "realclean... sub_clobber:: @$(MAKE) subdirs TARGET=clobber VERB="Clobbering" FLAGS= @echo "Back to $(CURRENT) for "clobber... tag:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \ $(MAKE) $(MFLAGS) tag) || exit 1; \ done Makefiles:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS);\ do \ echo "Making "Makefiles" in $(DIR)$$i..."; \ (cd $$i || exit 1; \ if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \ $(MAKE) $(MFLAGS) Makefiles) || exit 1;\ done Makefiles.SH:: Makefile.SH @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS);\ do \ case "$(DIR)$$i/" in \ */*/*/*/) newtop=../../../..;; \ */*/*/) newtop=../../..;; \ */*/) newtop=../..;; \ */) newtop=..;; \ esac; \ case "$(TOP)" in \ /*) newtop="$(TOP)" ;; \ esac; \ echo "Making Makefiles.SH in $(DIR)$$i..."; \ (cd $$i || exit 1; \ if test -f Jmakefile; then \ $(MAKE) $(MFLAGS) -f ../Makefile \ Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \ $(MAKE) $(MFLAGS) Makefiles.SH; \ fi; \ ) || exit 1; \ done all:: @$(MAKE) subdirs TARGET=all VERB="Making all" FLAGS= local_install:: local_deinstall:: local_install.man:: local_deinstall.man:: !NO!SUBS! chmod 644 Makefile $eunicefix Makefile dist_3.5-36.001/Known_bugs0000644000175000017500000000057010473316164015453 0ustar srivastasrivastaHere are some known bugs that I plan to fix soon. + Patname ought to ask for a log message for the symbolic number. + A unit name is always wanted by Configure. Hence in a unit d_waitpid, if you write: @if WAITPID || d_waitpid ..... @end then the <....> part of the code will always be loaded even if no shell script references d_waitpid or C code references WAITPID. dist_3.5-36.001/bin/0002755000175000017500000000000012645366677014205 5ustar srivastasrivastadist_3.5-36.001/bin/packinit.SH0000755000175000017500000003241311344533734016230 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting bin/packinit (with variable substitutions)" cat >packinit <>packinit <<'!NO!SUBS!' print < $mypackver) { die "This .package file was produced by a newer packinit than I am.\n". "Please find a packinit of version $packver or greater.\n"; } } elsif (-f '../.package' || -f '../../.package' || -f '../../../.package') { die "Run in top level directory only.\n"; } # Now set up to do reads with possible shell escape. sub myread { ($rp,$dflt) = @_; $rp .= " [$dflt]"; print "$rp "; $ans='!'; while ($ans =~ /^!/) { $ans = ; chop($ans); if ($ans eq '!') { system '/bin/sh'; print "\n$rp "; } elsif ($ans =~ s/^!//) { system '/bin/sh', '-c', $ans; print "\n$rp "; } } $ans = $dflt if $ans eq ''; $ans = '' if $ans eq 'none'; $ans; } $dflt = $package; ($dflt) = (`pwd | tr "[A-Z]" "[a-z]"` =~ m|.*/(.*)|) unless $package; print <; $rcs = shift(@rcs); if (! -f $rcs) { $rcs = shift(@rcs); if (! -f $1) { print "I don't see any RCS files there (yet)."; $dflt='1.1'; } } $revs=0; if ($dflt eq '') { $rlog = `rlog $rcs`; ($dflt) = ($rlog =~ /\nhead:\s*(\d+\.\d+)/); $rlog = `rlog -r$dflt.1- -r$dflt.2- -r$dflt.3- -r$dflt.4- $rcs`; ($revs) = ($rlog =~ /selected revisions:\s*([\d.]+)/); $dflt='1.1' if $dflt eq ''; } print < 1) { print <.package') || die "Can't create .package"; chop($date = `date`); print PACKAGE <>packinit $grep -v '^;#' ../pl/logname.pl >>packinit $grep -v '^;#' ../pl/fullname.pl >>packinit $grep -v '^;#' ../pl/tilde.pl >>packinit chmod 755 packinit $eunicefix packinit dist_3.5-36.001/bin/Makefile.SH0000755000175000017500000001363611474560157016154 0ustar srivastasrivasta: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-43] : $X-Id: Jmake.tmpl 47 2010-11-28 22:23:13Z rmanfredi $ case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac CURRENT=bin DIR=`echo $CURRENT/ | sed -e 's/\.\///g'` echo "Extracting ${DIR}Makefile (with variable substitutions)" INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'` INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'` DATE=`date` $spitshell >Makefile <>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files # $X-Id: Jmake.rules 18 2006-12-27 10:35:09Z rmanfredi $ ######################################################################## # Start of Jmakefile # $X-Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $X-Log: Jmakefile,v $ # Revision 3.0.1.1 1994/01/24 13:42:53 ram # patch16: added dependency generation stage # # Revision 3.0 1993/08/18 12:04:00 ram # Baseline for dist 3.0 netwide release. # BINPL = packinit manilist BIN = manicheck $(BINPL) all:: $(BIN) local_realclean:: $(RM) $(BIN) manicheck: manicheck.SH /bin/sh manicheck.SH packinit: packinit.SH /bin/sh packinit.SH manilist: manilist.SH /bin/sh manilist.SH local_install:: $(SCRIPTS) $(LSCRIPTS) @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \ for file in $(SCRIPTS) $(LSCRIPTS); do \ (set -x; \ $(INSTALL) -c -m 555 $$file $(INSTALL_PREFIX)$(SCRIPTDIR)) || \ exit 1; \ done local_deinstall:: @for file in $(SCRIPTS) $(LSCRIPTS); do \ case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/$$file); \ done local_install.man:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \ for file in $(SCRIPTS); do \ if test -f $$file.man; then \ (set -x; \ $(INSTALL) -c -m 444 $$file.man \ $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)) || \ exit 1; \ fi; \ done local_deinstall.man:: case '${MFLAGS}' in *[i]*) set +e;; esac; \ for file in $(SCRIPTS); do \ (set -x; $(RM) $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)); \ done BINSH = \ packinit.SH \ manilist.SH depend:: local_depend local_depend:: ($(SED) '/^# DO NOT DELETE/q' Makefile && \ grep '^\$$grep' $(BINSH) | \ $(SED) -e "s/^.*' \([^ ]*\) >>[ ]*\([^ ]*\)/\2: \1/" \ ) > Makefile.new cp Makefile Makefile.bak cp Makefile.new Makefile $(RM) Makefile.new ######################################################################## # Common rules for all Makefiles -- do not edit all:: clean: local_clean realclean: local_realclean clobber: local_clobber local_clean:: if test -f core; then $(RM) core; fi $(RM) *~ *.o local_realclean:: local_clean local_clobber:: local_realclean $(RM) Makefile config.sh install:: local_install install.man:: maybe_install.man deinstall:: local_deinstall deinstall.man:: maybe_deinstall.man install.man-yes: local_install.man install.man-no: deinstall.man-yes: local_deinstall.man deinstall.man-no: !NO!SUBS! case "$installmansrc" in '') man=no;; *) man=yes;; esac $spitshell >>Makefile <>Makefile <<'!NO!SUBS!' Makefile.SH: Jmakefile -@if test -f $(TOP)/.package; then \ if test -f Makefile.SH; then \ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ fi; \ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ else touch $@; fi Makefile: Makefile.SH /bin/sh Makefile.SH tags:: $(CTAGS) -w *.[ch] $(CTAGS) -xw *.[ch] > tags local_clobber:: $(RM) tags depend:: ######################################################################## # Empty rules for directories with no sub-directories -- do not edit local_install:: @echo "install in $(CURRENT) done." local_deinstall:: @echo "deinstall in $(CURRENT) done." local_install.man:: @echo "install.man in $(CURRENT) done." local_deinstall.man:: @echo "deinstall.man in $(CURRENT) done." Makefiles:: Makefiles.SH:: ######################################################################## # Dependencies generated by make depend # DO NOT DELETE THIS LINE -- make depend relies on it # Put nothing here or make depend will gobble it up .FORCE_DEPEND:: @echo "You must run 'make depend' in $(TOP) first."; exit 1 !NO!SUBS! chmod 644 Makefile $eunicefix Makefile dist_3.5-36.001/bin/manicheck.SH0000755000175000017500000000402410473316164016343 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting bin/manicheck (with variable substitutions)" $spitshell >manicheck <>manicheck <<'!NO!SUBS!' # $Id: manicheck.SH 1 2006-08-24 12:32:52Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # Original Author: Harlan Stenn # # $Log: manicheck.SH,v $ # Revision 3.0.1.1 1993/08/19 06:41:51 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:04:02 ram # Baseline for dist 3.0 netwide release. # find . ! -type d -print | sed -e ' s|^./|| /RCS\//d /UU\//d /core$/d /\.bak$/d /\.orig$/d ' | sort > check.present manifest='' if test -r MANIFEST.new; then manifest='MANIFEST.new' else if test -r MANIFEST; then manifest='MANIFEST' else echo "No MANIFEST.new or MANIFEST file--don't know what to look for." fi fi awk '{print $1}' $manifest | sort > check.expected comm -23 check.expected check.present > check.want comm -13 check.expected check.present > check.extra rm -f check.expected check.present if test -s check.want; then echo "Some files listed in $manifest are missing; see check.want." else rm check.want fi if test -s check.extra; then echo "Some files not listed in $manifest are present; see check.extra." else rm check.extra fi !NO!SUBS! chmod 755 manicheck $eunicefix manicheck dist_3.5-36.001/bin/manilist.SH0000755000175000017500000003634511344533734016256 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting bin/manilist (with variable substitutions)" $spitshell >manilist <>manilist <<'!NO!SUBS!' # This script scans the MANIFEST.new file and builds some reports. # The output can be somewhat changed to produce other kind of reports. # The format is specified with a leading set of activation character, followed # by a ':', and then a set of formatting macros. The leading characters tell # when a report line shall be issued: # a: all files (shortcut for 'ix') # A: all files but the excluded ones # f: report for files only # d: report for directories only # m: report for files/directories found in the MANIFEST.new # n: report for files/directories not found in the MANIFEST.new # i: included files are listed # x: excluded files are listed # Then a set of macros introduced by %: # %c: the leading one character code defined as follows: # . if the file is up to date (i.e. not newer than patchlevel.h) # - if the file is present in the manifest but is missing # > if the file has changed since last patch. # + if the file is not present in the manifest but exists # o if the file is not listed but exists and is older than patchlevel.h # x if the file in manifest and exists but was excluded # ? if the file in manifest but was excluded and does not exist # %n: the name of the file (its path from the top directory) # %t: time stamp of last modification # %d: description from MANIFEST.new file, if any # %s: size of the file, in bytes $format = 'A:%c %n'; # By default, only the source files whith the following extensions are reported # (but a -a option will report ALL the files, and a -i option can specify some # other extensions as well). # .sh .SH .c .h .l .y .man @include = ('.sh', '.SH', '.c', '.h', '.l', '.y', '.man'); # By default, the following extensions are excluded from the list. More # exclusions can be added with the -x option: # ^core .o .bak .rej .new .old .orig ,v @exclude = ('^core', '.o', '.bak', '.rej', '.new', '.old', '.orig', ',v'); # The column separator character (or string) is used to separate each formatted # column on the output. Formatting is requested by adding a '|' character in # the format string. A new separator can be specified via the -C option. # The maximum column size is fixed by the -L. $col_separator = ' '; $col_size = ''; &profile; # Read ~/.dist_profile require 'getopts.pl'; require 'stat.pl'; &usage unless &Getopts('abcdhntVi:f:p:s:w:x:C:L:I:X:'); &usage if $opt_h; if ($opt_V) { print "manilist $version PL$pl\n"; exit 0; } # Go to the top of the package, and update any file name given as argument # by prepending the needed path. The process then performs a chdir to the # top. unless ($opt_b) { chop($pwd = `pwd`) unless -f '.package'; until (-f '.package') { die "No .package file! Run packinit.\n" unless $pwd; chdir '..' || die "Can't cd ..\n"; $pwd =~ s|(.*)/(.*)|$1|; $prefix = $2 . '/' . $prefix; } if ($prefix) { for (@ARGV) { s/^\.$/$prefix/ && next; s/^/$prefix/ unless m|^[-/]|; } } } # We now are at the top level # Build up the file hierarchy filter in @filter foreach $entry (@ARGV) { $entry =~ s|/$||; # Remove final / in directory names if (-d $entry) { push(@filter, "d:$entry"); } elsif (-f $entry) { push(@filter, "f:$entry"); } else { die "$entry: No such file or directory.\n"; } } $prefix = '.' unless $prefix; ($top = $prefix) =~ s|/$||; $top = '.' if $opt_t; # Start from top, not from original dir @ARGV = ($top) unless @ARGV; if ($opt_n) { # "manifest" files are found by scanning the directory open(MANIFEST, "find @ARGV -print|") || die "Can't run find: $!\n"; while () { chop; s|^./||; push(@manifest, $_); } close MANIFEST; } else { $MANIFEST = $opt_f; $MANIFEST = 'MANIFEST.new' unless $opt_f; open(MANIFEST, $MANIFEST) || die "Can't open $MANIFEST: $!\n"; while () { chop; s|^./||; s|^(\S+)||; local($name) = $1; push(@manifest, $name); m|^\s+(\d+)*\s*(.*)| && ($comment{$name} = $2); } close MANIFEST; } # If we have to compare the files in the MANIFEST with the actual files on # the file system, then grab them... if ($opt_c && !$opt_n) { open(FILES, "find @ARGV -print|") || die "Can't run find: $!\n"; while () { chop; s|^./||; push(@files, $_); } close FILES; } # If there is a patchlevel.h file, get its time stamp. $pl_mtime = 0; $pl_mtime = (stat('patchlevel.h'))[$ST_MTIME] if -f 'patchlevel.h'; # Dealing with command-line options $format = $opt_p if $opt_p; $col_separator = $opt_C if $opt_C; $col_size = $opt_L if $opt_L; unless ($opt_p) { # -p may be used as a shortcut for -w and -s local($which) = ($format =~ /^(\w+):/); local($string) = ($format =~ /^\w+:(.*)/); $which = $opt_w if $opt_w; $string = $opt_s if $opt_s; $format = "$which:$string"; } @include = split(' ', $opt_I) if $opt_I; # First reset included with -I @exclude = split(' ', $opt_X) if $opt_X; # and excluded with -X push(@include, split(' ', $opt_i)) if $opt_i; # before applying additions push(@exclude, split(' ', $opt_x)) if $opt_x; &mode_opt; # Compute $mode_xxx variables &init_functions; # Compile &included and &excluded # Option -d requests dumping of inclusion and exclusion lists on stderr if ($opt_d) { print STDERR "Included: ", join(' ', @include), "\n"; print STDERR "Excluded: ", join(' ', @exclude), "\n"; } @manifest = sort @manifest; @files = sort @files if defined(@files); # Build up the %manifest array so that we quickly know whether a file is in the # manifest or not. foreach (@manifest) { ++$manifest{$_}; } # Now loop other the files held in @manifest and perform your job... foreach $mani (@manifest) { if ($opt_c && !$opt_n) { # Check MANIFEST with actual files on disk for (;;) { $disk = $files[0]; # Next file coming up last unless $disk; last if $disk gt $mani; # Past the current point shift(@files); # Remove the file from list last if $disk eq $mani; # Reached the manifest point # This means the file is before the current MANIFEST point &report($disk); # File exists and not in MANIFEST } } &report($mani); } &flush_report; # Flush the @Report array if formatting is needed # Print usage and exit with a non-zero status sub usage { print STDERR < $pl_mtime; $c_macro = 'x' if &excluded($file); } else { $c_macro = '-'; $c_macro = '?' if &excluded($file); } } else { # File not in MANIFEST if (-e $file) { # And file exists $c_macro = $mtime < $pl_mtime ? 'o' : '+'; } else { return if -l $file; warn "$file seems to have been removed...\n"; } } # Perform the macro substitution $fmt =~ s/%%/\0/g; # Escape %% $fmt =~ s/%/\01/g; # Transform %, in case substitution add some $fmt =~ s/\01c/$c_macro/g; # %c is the code $fmt =~ s/\01n/$file/g; # %n is the file name $fmt =~ s/\01t/&fstamp/ge; # %t is the time stamp $fmt =~ s/\01s/&fsize/ge; # %s is the file size, in bytes $fmt =~ s/\01d/&mdesc/ge; # %d is the manifest description $fmt =~ s/\01/%/g; # All other %'s are left undisturbed print "$fmt\n" unless $postproc; push(@Report, $fmt) if $postproc; } # Format and flush report on stdout. Columns are aligned on what was originally # a '|' character in the format string, translated into a ^B by the reporting # routine. sub flush_report { return unless @Report; # Early return if nothing to be done local(@length); # Stores maximum length for each field local(@max); # Maximum allowed column sizes local($i); local($report); local($len); local(@fields); @max = split(',', $col_size); foreach $report (@Report) { # First pass: compute fields lengths $i = 0; foreach (split(/\02/, $report)) { $len = length($_); $length[$i] = $length[$i] < $len ? $len : $length[$i]; $i++; } } for ($i = 0; $i < @length; $i++) { # Adapt to maximum specified length $length[$i] = $max[$i] if $max[$i] > 0 && $length[$i] > $max[$i]; } foreach $report (@Report) { # Second pass: formats each line @fields = split(/\02/, $report); $i = 0; foreach (@fields) { $len = length($_); if ($max[$i] > 0 && $len > $max[$i]) { $_ = substr($_, 0, $max[$i]); # Truncate field } else { $_ .= ' ' x ($length[$i] - $len); # Pad with blanks } $i++; } print join($col_separator, @fields), "\n"; } } # The following macro subsitution functions are called with $file set # Return the modification time on file sub fstamp { (stat($file))[$ST_MTIME]; } # Return the file size, in bytes sub fsize { (stat($file))[$ST_SIZE]; } # Return the description from the MANIFEST file, if any sub mdesc { return '' unless defined $comment{$file}; $comment{$file}; } # Do we have to report informations on the specified file? sub report_wanted { return 1 unless @filter; local($file) = @_; local($filter); foreach (@filter) { $filter = $_; # Work on a copy if ($filter =~ s/^d://) { return 1 if $file =~ m|^$filter(/[^/]*)*|; } else { $filter =~ s/^f://; return 1 if $filter eq $file; } } return 0; } # Build up the 'included' and 'excluded' functions which return true if a file # is in the include or exclude set. sub init_functions { &build_function('included', *include, 1); &build_function('excluded', *exclude, 0); } # Build a function which returns true if a given name is found in the array # list of regular expression. Each regular expression is applied on the file # name, anchored at the end. False is returned only if none of the expressions # match. The purpose of building such a function dynamically is to avoid the # costly pattern recompilation every time. sub build_function { local($name) = shift(@_); # The name of the function to be built local(*array) = shift(@_); # The extension array we have to check with local($dflt) = shift(@_); # Default value when -a is used local($fn) = &q(<> manilist $grep -v '^;#' ../pl/profile.pl >> manilist chmod 755 manilist $eunicefix manilist dist_3.5-36.001/bin/Jmakefile0000644000175000017500000000207311474560045015777 0ustar srivastasrivasta/* * Jmakefile for bin subdirectory. */ ;# $Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: Jmakefile,v $ ;# Revision 3.0.1.1 1994/01/24 13:42:53 ram ;# patch16: added dependency generation stage ;# ;# Revision 3.0 1993/08/18 12:04:00 ram ;# Baseline for dist 3.0 netwide release. ;# BINPL = packinit manilist BIN = manicheck $(BINPL) ShellScriptTarget($(BIN)) BINSH = \ |expand f!$(BINPL)! !f.SH \ -expand \\ depend:: local_depend local_depend:: ($(SED) '/^# DO NOT DELETE/q' Makefile && \ grep '^\$$grep' $(BINSH) | \ $(SED) -e "s/^.*' \([^ ]*\) >>[ ]*\([^ ]*\)/\2: \1/" \ ) > Makefile.new cp Makefile Makefile.bak cp Makefile.new Makefile $(RM) Makefile.new dist_3.5-36.001/bin/perload0000755000175000017500000005115711710770257015551 0ustar srivastasrivasta: # feed this into perl '/bin/true' && eval 'exec perl -S $0 "$@"' if $running_under_some_shell; 'di'; 'ig00'; # # This perl script is its own manual page [generated by wrapman] # # $Id: perload,v 3.0.1.1 1994/10/29 15:45:36 ram Exp ram $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $Log: perload,v $ # Revision 3.0.1.1 1994/10/29 15:45:36 ram # patch36: added minimal support for perl5 dataloading # # Revision 3.0 1993/08/18 12:04:06 ram # Baseline for dist 3.0 netwide release. # # Replace each function definition in a loading section by two stubs and # reject the definition into the DATA part of the script if in a dataload # section or into a FILE if in an autoload section. $in_load = 0; # In a loading section $autoload = ''; # Name of autoloaded file $has_invocation_stub = 0; # True if we detect a #! stub $current_package = 'main'; # Current package $init_emitted = 0; # True when dataloading stamp was emitted $in_function = 0; use Getopt::Std; getopts("ot"); while (<>) { if ($. == 1 && /^(:|#).*perl/) { # Invocation stub $has_invocation_stub = 1; print; next; } if ($. <= 3 && $has_invocation_stub) { print; next; } if (/^\s*$/) { &flush_comment; print unless $in_function; print if $in_function && !$in_load; if ($in_function && $in_load) { push(@Data, "\n") unless $autoload; $Auto{$autoload} .= "\n" if $autoload; } next; } if (/^\s*;?#/) { if (/#\s*perload on/i) { # Enter a loading section print unless /:$/; $in_load = 1; next; } if (/#\s*perload off/i) { # End a loading section print unless /:$/; $in_load = 0; next; } if (/#\s*autoload (\S+)/i) { # Enter autoloading section print unless /:$/; push(@autoload, $autoload); # Directives may be nested $autoload = $1; $in_load += 2; next; } if (/#\s*offload/i) { # End autoloading section print unless /:$/; $autoload = pop(@autoload); # Revert to previously active file $in_load -= 2; next; } &emit_init unless $init_emitted; push(@Comment, $_) unless $in_function; print if $in_function && !$in_load; next unless $in_function; push(@Data, $_) unless $autoload; $Auto{$autoload} .= $_ if $autoload; next; } &emit_init unless $init_emitted; /^package (\S+)\s*;/ && ($current_package = $1); unless ($in_load) { &flush_comment; print; next; } # We are in a loading section if (/^sub\s+([\w']+)\s*\{(.*)/) { die "line $.: function $1 defined within another function.\n" if $in_function; # Silently ignore one-line functions if (/\}/) { &flush_comment; print; next; } $comment = $2; $in_function = 1; $function = $1; ($fn_package, $fn_basename) = $function =~ /^(\w+)'(\w+)/; unless ($fn_package) { $fn_package = $current_package; $fn_basename = $function; } die "line $.: duplicate routine ${fn_package}::$fn_basename\n" if $Seen{"${fn_package}::$fn_basename"}++; # Keep leading function comment foreach (@Comment) { push(@Data, $_) unless $autoload; $Auto{$autoload} .= $_ if $autoload; } @Comment = (); # Change package context for correct compilation: the name is visible # within the original function package while the body of the function # is compiled within the current package. $declaration = "sub $fn_package" . "'load_$fn_basename {$comment\n"; $package_context = "\tpackage $current_package;\n"; if ($autoload) { $Auto{$autoload} .= $declaration . $package_context; } else { push(@Data, $declaration, $package_context); } # Emit stubs print "sub $fn_package", "'$fn_basename"; print " { &auto_$fn_package", "'$fn_basename; }\n"; print "sub auto_$fn_package", "'$fn_basename { "; print '&main\'dataload' unless $autoload; print '&main\'autoload(' . "'$autoload'" . ', @_)' if $autoload; print "; }\n"; next; } unless ($in_function) { &flush_comment; print; next; } # We are in a loading section and inside a function body push(@Data, $_) unless $autoload; $Auto{$autoload} .= $_ if $autoload; $in_function = 0 if /^\}/; if (/^\}/) { push(@Data, "\n") unless $autoload; $Auto{$autoload} .= "\n" if $autoload; } } @auto = keys %Auto; if (@auto > 0) { print &q(<<'EOC'); :# Load the calling function from file and call it. This function is called :# only once per file to be loaded. :sub main'autoload { : local($__file__) = shift(@_); : local($__packname__) = (caller(1))[3]; : $__packname__ =~ s/::/'/; : local($__rpackname__) = $__packname__; : local($__saved__) = $@; : $__rpackname__ =~ s/^auto_//; : &perload'load_from_file($__file__); : $__rpackname__ =~ s/'/'load_/; : $@ = $__saved__; # Restore value $@ had on entrance : &$__rpackname__(@_); # Call newly loaded function :} : :# Load file and compile it, substituing the second stub function with the :# loaded ones. Location of the file uses the @AUTO array. :sub perload'load_from_file { : package perload; : local($file) = @_; # File to be loaded : local($body) = ' ' x 1024; # Pre-extent : local($load) = ' ' x 256; # Loading operations : # Avoid side effects by protecting special variables which will be : # changed by the autoloading operation. : local($., $_, $@); : $body = ''; : $load = ''; : &init_auto unless defined(@'AUTO); # Make sure we have a suitable @AUTO : &locate_file unless -f "$file"; # Locate file if relative path : open(FILE, $file) || : die "Can't load $'__rpackname__ from $file: $!\n"; : while () { : $load .= '*auto_' . $1 . '\'' . $2 . '= *' . $1 . '\'' . "load_$2;\n" : if (/^sub\s+(\w+)'load_(\w+)\s*\{/); : $body .= $_; : } : close FILE; EOC if ($opt_t) { print &q(<<'EOC'); : # Untaint body when running setuid : $body =~ /^([^\0]*)/; : # No need to untaint $load, as it was built using trusted variables : eval $1 . $load; EOC } else { print &q(<<'EOC'); : eval $body . $load; EOC } print &q(<<'EOC'); : chop($@) && die "$@, while parsing code of $file.\n"; :} : :# Initialize the @AUTO array. Attempt defining it by using the AUTOLIB :# environment variable if set, otherwise look in auto/ first, then in the :# current directory. :sub perload'init_auto { : if (defined $ENV{'AUTOLIB'} && $ENV{'AUTOLIB'}) { : @AUTO = split(':', $ENV{'AUTOLIB'}); : } else { : @AUTO = ('auto', '.'); : } :} : :# Locate to-be-loaded file held in $file by looking through the @AUTO array. :# This variable, defined in 'load_from_file', is modified as a side effect. :sub perload'locate_file { : package perload; : local($fullpath); : foreach $dir (@'AUTO) { : $fullpath = $dir . '/' . $file; : last if -f "$fullpath"; : $fullpath = ''; : } : $file = $fullpath if $fullpath; # Update var from 'load_from_file' :} : EOC } if (@Data > 0) { print &q(<<'EOC'); :# Load the calling function from DATA segment and call it. This function is :# called only once per routine to be loaded. :sub main'dataload { : local($__packname__) = (caller(1))[3]; : $__packname__ =~ s/::/'/; : local($__rpackname__) = $__packname__; : local($__at__) = $@; : $__rpackname__ =~ s/^auto_//; : &perload'load_from_data($__rpackname__); : local($__fun__) = "$__rpackname__"; : $__fun__ =~ s/'/'load_/; : eval "*$__packname__ = *$__fun__;"; # Change symbol table entry : die $@ if $@; # Should not happen : $@ = $__at__; # Restore value $@ had on entrance : &$__fun__; # Call newly loaded function :} : :# Load function name given as argument, fatal error if not existent :sub perload'load_from_data { : package perload; : local($pos) = $Datapos{$_[0]}; # Offset within DATA : # Avoid side effects by protecting special variables which will be changed : # by the dataloading operation. : local($., $_, $@); : $pos = &fetch_function_code unless $pos; : die "Function $_[0] not found in data section.\n" unless $pos; : die "Cannot seek to $pos into data section.\n" : unless seek(main'DATA, $pos, 0); : local($/) = "\n}"; : local($body) = scalar(); : die "End of file found while loading $_[0].\n" unless $body =~ /^\}$/m; EOC if ($opt_t) { print &q(<<'EOC'); : # Untaint body when running setuid : $body =~ /^([^\0]*)/; : # Now we may safely eval it without getting an insecure dependency : eval $1; # Load function into perl space EOC } else { print &q(<<'EOC'); : eval $body; # Load function into perl space EOC } print &q(<<'EOC'); : chop($@) && die "$@, while parsing code of $_[0].\n"; :} : EOC print &q(<<'EOC') unless $opt_o; :# Parse text after the END token and record defined loadable functions (i.e. :# those whose name starts with load_) into the %Datapos array. Such function :# definitions must be left adjusted. Stop as soon as the function we want :# has been found. :sub perload'fetch_function_code { : package perload; : local($pos) = tell main'DATA; : local($in_function) = 0; : local($func_name); : local($., $_); : while () { : if (/^sub\s+(\w+)'load_(\w+)\s*\{/) { : die "DATA line $.: function $1'$2 defined within $func_name.\n" : if $in_function; : $func_name = $1 . '\'' . $2; : $Datapos{$func_name} = $pos; : $in_function = 1; : next; : } : $in_function = 0 if /^\}/; : next if $in_function; : return $pos if $func_name eq $_[0]; : $pos = tell main'DATA; : } : 0; # Function not found :} : EOC print &q(<<'EOC') if $opt_o; :# This function is called only once, and fills in the %Datapos array with :# the offset of each of the dataloaded routines held in the data section. :sub perload'fetch_function_code { : package perload; : local($start) = 0; : local($., $_); : while () { # First move to start of offset table : next if /^#/; : last if /^$/ && ++$start > 2; # Skip two blank line after end token : } : $start = tell(main'DATA); # Offsets in table are relative to here : local($key, $value); : while () { # Load the offset table : last if /^$/; # Ends with a single blank line : ($key, $value) = split(' '); : $Datapos{$key} = $value + $start; : } : $Datapos{$_[0]}; # All that pain to get this offset... :} : EOC print &q(<<'EOC'); :# :# The perl compiler stops here. :# : :__END__ : :# :# Beyond this point lie functions we may never compile. :# : EOC # Option -o directs us to optimize the function location by emitting an # offset table, which lists all the position within DATA for each possible # dataloaded routine. if ($opt_o) { print &q(<<'EOC'); :# :# DO NOT CHANGE A IOTA BEYOND THIS COMMENT! :# The following table lists offsets of functions within the data section. :# Should modifications be needed, change original code and rerun perload :# with the -o option to regenerate a proper offset table. :# : EOC $trailing_message = &q(<<'EOC'); : :# :# End of offset table and beginning of dataloading section. :# : EOC $pos = 0; # Offset relative to this point (start of table) foreach (@Data) { $Datapos{"$1\'$2"} = $pos - $now if /^sub\s+(\w+)'load_(\w+)\s*\{/; # } for vi $pos += length; } @poskeys = keys %Datapos; # Array of routine names (fully qualified) # Write out a formatted table, each entry stored on $entry bytes and # formatted with the $format string. ($entry, $format) = &get_format(*poskeys); # The total size occupied by the table is the size of one item times # the number of items plus the final trailing message at the end of # the table. $table_size = $entry * @poskeys + length($trailing_message); # Output formatted table foreach (sort @poskeys) { printf($format, $_, $table_size + $Datapos{$_}); } print $trailing_message; } # Output code for each dataloaded function foreach (@Data) { print; } print &q(<<'EOC'); :# :# End of dataloading section. :# : EOC } if (@auto > 0) { mkdir('auto',0755) unless -d 'auto'; foreach $file (@auto) { unless (open(AUTO, ">auto/$file")) { warn "Can't create auto/$file: $!\n"; next; } print AUTO &q(<<'EOC'); :# This file was generated by perload : EOC print AUTO $Auto{$file}; close AUTO; } } # Compute optimum format for routine offset table, returning both the size of # each entry and the formating string for printf. sub get_format { local(*names) = @_; local($name_len) = 0; local($max_len) = 0; foreach (@names) { $name_len = length; $max_len = $name_len if $name_len > $max_len; } # The size of each entry (preceded by one tab, followed by 12 chars) $name_len = $max_len + 1 + 12; ($name_len, "\t%${max_len}s %10d\n"); } sub emit_init { print &q(<<'EOC'); :# :# This perl program uses dynamic loading [generated by perload] :# : :$ENV{LC_ALL} = 'C'; : EOC $init_emitted = 1; } sub flush_comment { print @Comment if @Comment > 0; @Comment = (); } sub q { local($_) = @_; s/^://gm; $_; } # # These next few lines are legal in both perl and nroff. # .00; # finish .ig 'di \" finish diversion--previous line must be blank .nr nl 0-1 \" fake up transition to first page again .nr % 0 \" start at page 1 '; __END__ \" the perl compiler stops here ''' ''' From here on it's a standard manual page. ''' .TH PERLOAD 1 "June 20, 1992" .AT 3 .SH NAME perload \- builds up autoloaded and dataloaded perl scripts .SH SYNOPSIS .B perload [ \fB\-ot\fR ] [ \fIfile\fR ] .SH DESCRIPTION .I Perload takes a perl script as argument (or from stdin if no argument is supplied) and prints out on stdout an equivalent script set-up to perform autoloading or dataloading. The translation is directed by special comments within the original script. Using dynamic loading can drastically improve start-up performances, both in time and in memory, as perl does not need to compile the whole script nor store its whole compiled form in memory. .PP .I Autoloading delays compilation of some functions until they are needed. The code for these functions is loaded dynamically at run-time. The atomicity of loading is a file, which means that putting more than one function into a file will cause all these functions to be loaded and compiled as soon as one among them is needed. .PP .I Dataloading is a form of autoloading where no extra file are needed. The script carries all the functions whose compilation is to be delayed in its data segment (in the \fIperl\fR sense, i.e. they are accessible via the DATA filehandle). The scripts parses the data segment and extracts only the code for the needed subroutine, which means granularity is better than with autloading. .PP It is possible for a single script to use both autoloading and dataloading at the same time. However, it should be noted that a script using only dataloading is self contained and can be moved or shared accross different platforms without fear. On the contrary, a script using only autoloading relies on some externally provided files. Sharing this script among different platforms requires sharing of these external files. The script itself cannot be redistributed without also giving the extra files holding the autoloaded functions. .PP The major drawback with dataloading is that the DATA filehandle cannot be used for anything else and may result in code duplication when two scripts could share the same pieces of code. Autoloading appears as the perfect solution in this case since two scripts may freely share the same functions without actually duplicating them on the disk (hence saving some precious disk blocks :-). .SH CRITERIA Functions to be dataloaded or autoloaded must meet the following layout criteria: .TP 5 \- They must not be one-line functions like \fIsub sorter { $a <=> $b }\fR. Those functions are simply output verbatim, as they are already so small that it would not be worth to dynamically load them, .TP \- The first line must be of the form \fIsub routine_name {\fR, with an optional comment allowed after the '{'. .TP \- The function definition must end with a single '}' character left aligned. .TP \- Package directives outside any function must be left aligned. .PP All the above restrictions should not be source of a problem if "standard" writing style is used. There are also some name restrictions: the package name \fIperload\fR is reserved, as is the \fI@AUTO\fR array when autoloading is used. Packages must not start with \fIauto_\fR, as this is prepended to user's package names when building the stubs. Furthermore, the subroutines names \fImain'autoload\fR and \fImain'dataload\fR must not be used by the original script. Again, these should not cause any grief. .SH DIRECTIVES The translation performed by .I Perload is driven by some special comment directives placed directly within the code. Ending those directives with a ':' character will actually prevent them from being output into the produced script. Case is irrelevant for all the directives and the comment need not be left-aligned, although it must be the first non-space item on the line. .PP The following directives are available: .TP 10 # Perload ON Turns on the \fIperload\fR processing. Any function definition which meets the criteria listed in the previous section will be replaced by two stubs and its actual definition will be rejected into the data segment (default) or a file when inside an autoloading section. .TP # Perload OFF Turns off any processing. The script is written as-is on the standard output. .TP # Autoload \fIpath\fR Requests autoloading from file \fIpath\fR, which may be an absolute path or a relative path. The file will be located at run-time using the @AUTO array if a non-absolute path is supplied or if the file does not exist as listed. Autoloading directives may be nested. .TP # Offload \fIpath\fR The argument is not required. The directive ends the previous autoloading directive (the inmost one). This does not turn off the \fIperload\fR processing though. The \fIpath\fR name is optional here (in fact, it has only a comment value). .SH OPTIONS Perload accepts only two options. Using \fB\-o\fR is meaningful only when dataloading is used. It outputs an offset table which lists the relative offset of the dataloaded functions within the data section. This will spare perl the run-time parsing needed to locate the function, and results in an good speed gain. However, it has one major drawback: it prevents people from actually modifying the source beyond the start of the table. But anything before can be freely edited, which is particulary useful when tailoring the script. .PP This option should not be used when editing of functions within the data section is necessary for whatever reason. When \fB\-o\fR is used, any change in the dataloaded function must be committed by re-running perload on the original script. .PP The other option \fB\-t\fR is to be used when producing a script which is going to run setuid. The body of the loaded function is untainted before being fed to eval, which slightly slows down loading (the first time the function is called), but avoids either an insecure dependency report or weird warnings from taintperl stating something is wrong (which is the behaviour with 4.0 PL35). .SH FILES .TP 10 auto the subdirectory where all produced autoloaded files are written. .SH ENVIRONMENT No environment variables are used by \fIperload\fR. However, the autoloaded version of the script pays attention to the \fIAUTOLIB\fR variable as a colon separated set of directories where the to-be-loaded files are to be found when a non-absolute path was specified. If the \fIAUTOLIB\fR variable is not set, the default value 'auto:.' is used (i.e. look first in the auto/ subdirectory, then in the current directory. .SH CAVEAT Special care is required when using an autoloading script, especially when executed by the super-user: it would be very easy for someone to leave a special version of a routine to be loaded, in the hope the super-user (or another suitable target) executes the autoloaded version of the script with some \fIad hoc\fR changes... .PP The directory holding the to-be-loaded files should therefore be protected against unauthorized access, and no file should have write permission on them. The directory itself should not be world-writable either, or someone might substitute his own version. It should also be considered wise to manually set the @AUTO variable to a suitable value within the script itself. .PP The \fB\-o\fR option uses \fIperl\fR's special variable \fI$/\fR with a multi-character value. I suspect this did not work with versions of \fIperl\fR prior to 4.0, so any script using this optimized form of dataloading will not be 100% backward compatible. .SH AUTHOR Raphael Manfredi .SH CREDITS Valuable input came from Wayne H. Scott . He is merely the author of the optimizing offset table (\fB\-o\fR option). .PP .I Perload is based on an article from Tom Christiansen , .I Autoloading in Perl, explaining the concept of dataloading and giving a basic implementation. .SH "SEE ALSO" perl(1). dist_3.5-36.001/bin/manilist.man0000644000175000017500000002573510473666773016531 0ustar srivastasrivasta''' $Id: manilist.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: manilist.man,v $ ''' Revision 3.0.1.3 1995/05/12 11:57:31 ram ''' patch54: updated my e-mail address ''' ''' Revision 3.0.1.2 1994/01/24 13:52:55 ram ''' patch16: typo fix ''' ''' Revision 3.0.1.1 1993/08/24 12:11:02 ram ''' patch3: typo fix ''' ''' Revision 3.0 1993/08/18 12:04:04 ram ''' Baseline for dist 3.0 netwide release. ''' ''' .TH MANILIST 1 ram .SH NAME manilist \- report status of files in a source directory .SH SYNOPSIS .B manilist [ .B \-abcdhnptV ] [ .B \-i .I extension ] [ .B \-f .I manifest ] [ .B \-p .I format ] [ .B \-s .I string ] [ .B \-w .I which ] [ .B \-x .I extension ] [ .B \-C .I separator ] [ .B \-I .I included ] [ .B \-L .I colsize ] [ .B \-X .I excluded ] [ .I files or directories ] .SH DESCRIPTION .I Manilist scans a source directory and produces a report on the status of each file: whether it is up-to-date or not with respect to .I patchlevel.h , if it is missing from MANIFEST.new, and some other useful information which may be dynamically configured. It can be use to maintain a MANIFEST.new file, produce a detailed listing and status of a group of directories, etc... The rich set of options concur to make \fImanilist\fR a perfect low-level tool. .PP Under its simplest invocation form at the top level directory of a package, with no arguments, \fImanilist\fR will scan the MANIFEST.new and produce a report on the status of each file listed there. Each line starts with a single character flag which indicates the state of the file, followed by the name of the file. .PP What happens in fact is more complex than that. \fIManilist\fR scans the MANIFEST.new file and then loops over all the files listed there. Internally, \fImanilist\fR maintains an inclusion and an exclusion list, both specifying extensions for files. For instance, the inclusion list could be ('.c', '.h') and the exclusion ('.o', ',v') so that C sources are included and object or RCS files excluded. By default, all files but those excluded are used. Some other selections may be applied at this stage, as will be explained later on. For those files which pass this selection process, a report is issued according to a report \fIformat\fR, which by default is "\fIA:%c %n\fR". The letter \fIA\fR (or anything before the initial ':' character is the file selection specification we've been talking about. The remaining is the formatting, a string which is printed as-is, modulo some escape sequences. It so happens that \fI%c\fR is the character flag and \fI%n\fR is the name of the current file. .PP Generally speaking, \fImanilist\fR should be regarded as a tool which emits configurable reports on a set of files, selectively picking them among a list or by directly scanning the directories to see what's out there... .PP By specifying a set of directories or files as arguments on the command line, you restrict the scanning area, limiting to reports concerning those files or directories. If you do not specify any, manilist restricts its report to the current directory and its subdirectories, unless the \fB\-t\fR option is given. .SH OPTIONS .I Manilist recognizes the following options: .TP 15 .B \-a Make a report for \fIall\fR the files, regardless of what is specified by the \fIincluded\fR and \fIexcluded\fR suffix lists. .TP .B \-b Assume current directory is the base (root) of the package tree. When this option is not specified, \fImanilist\fR will look for a \fI.package\fR file to indicate the root directory of the package (also called the top) and complain if it does not find it. .TP .B \-c Check files against those listed in MANIFEST.new (or whatever file specified via the \fB\-f\fR option) and report discrepancies via the \fI%c\fR macro. .TP .B \-d Dump included and excluded suffix lists on stderr, extensions being space separated. A good way to know the default lists is to run: \fImanilist \-f /dev/null \-bd. .TP .B \-f\fI manifest Specify an alternate manifest file, the default being to use MANIFEST.new. .TP .B \-h Print the usage help message and exit. .TP .B \-i\fI extensions Add new extensions to the included suffix list. The \fIextensions\fR argument must list the suffixes separated by spaces, as in \fB\-i\fI '.ph .pl'\fR to add both \fI.ph\fR and \fI.pl\fR to the existing suffixes. Note that the argument needs to be quoted to protect spaces against shell interpretation. .TP .B \-n Do not use any manifest file. Rather scan the directories and act as with all the files there were already listed in a manifest. .TP .B \-p\fI format Set the new printing format, which has the form \fIselection\fR:\fIstring\fR, with \fIselection\fR being a list of single letters specifying which files from the manifest are to be used for reports, and \fIstring\fR being a message to print as report, with some macro substitutions. It is also possible to have column formatting by specifying a '|' inside the string to delimit the different columns you wish to see. See also \fB\-C\fR and \fB\-L\fR for more formatting parameters. .TP .B \-s\fI string Specify the \fIstring\fR part of the printing format (see \fB\-p\fR for a general description of the \fIformat\fR). Available macros are listed further down the manual page. .TP .B \-t Start from the top directory (the root directory of the distribution) regardless of the current directory. There must be a \fI.package\fR file to indicate what the top directory is. .TP .B \-w\fI selection Specifiy the \fIselection\fR part of the printing format. Available selections will be discussed later. .TP .B \-x\fI extensions Add new extensions to the excluded suffix list. The \fIextensions\fR argument must list the suffixes separated by spaces, as in \fB\-x\fI '.s .p'\fR to add both \fI.s\fR and \fI.p\fR to the existing list. Note that the argument needs to be quoted to protect spaces against shell interpretation. .TP .B \-C\fI separator Give the column separator, which is to be used in place of the '|' character in the report format string. By default, it is a single space. .TP .B \-I\fI included Specify a new list of suffixes to be included in the reports. This overrides the original default list (whereas \fB\-i\fR is used to \fIadd\fR suffixes to the list). Suffixes must be space separated. .TP .B \-L\fI colsize When using column formatting (the '|' character being used to denote columns), this option may be used to specify the maximum column width, separating each width by a single ','. Leaving a width unspecified does not impose any limit on its width. For instance, if the format string is \fI%n|%d|%t\fR, one could limit the middle column (descriptions from MANIFEST.new) to 40 characters and the name column (first one) to 15 characters, leaving the last one with no imposed limits, by using \fB\-L\fI 15,40,\fR. .TP .B \-V Print version number and exit. .TP .B \-X\fI excluded Specify a new list of suffixes to be excluded in the reports. This overrides the original default list (whereas \fB\-x\fR is used to \fIadd\fR suffixes to the list). Suffixes must be space separated. .SH USING FORMATS The flexibility of \fImanilist\fR is brought by its use of a dynamic formatting string for providing its reports. It is possible to specify a format via the \fB\-p\fR option or just parts of it: the text string via \fB\-s\fR and the file selection with \fB\-w\fR. .SS "File Selection" .PP The leading part of the formatting string tells \fImanilist\fR which files you wish to see in the final report. Available selectors are: .sp .PD 0 .TP 5 .B A All the files but the excluded ones (i.e. those files whose suffix is listed in the exclusion list). This is the default action. .TP .B a All the files included and/or excluded (shortcut for \fIix\fR). Note that files which are neither included nor excluded will not appear in the report. .TP .B d Report only for directories. .TP .B f Report only for files. .TP .B i Only included files are listed. .TP .B m Only those files or directories found in the manifest are listed. .TP .B n Only those files or directories \fInot\fR found in the manifest are listed. .TP .B x Only excluded files are listed. .PD .PP When you specify more than one letter, the resulting report depends on the nature of the selection. For \fId\fR, \fIf\fR, \fIm\fR and \fIn\fR, a logical union is performed. This means specifying \fIfd\fR or \fImn\fR is the same as not specifying anything, but it's less efficient since \fImanilist\fR is forced to perform the checks it would otherwise bypass. The \fIi\fR and \fIx\fR selectors are special: by default, all the files not excluded are reported. Specifying \fIx\fR also asks for excluded files. Specifying \fIi\fR restricts the report to the included files. Using both at the same time (\fIix\fR) will force a report for files which are included or excluded. .SS "Macro Substitution" .PP The string part of the report format can make use of the following macros: .sp .PD 0 .TP 5 %c A character coding the status of the file. .TP %d Description from the manifest file, if any. .TP %n Name of the file (its path from the top directory). .TP %s Size of the file, in bytes. .TP %t Time stamp of the last modification. .PD .SS "File Status" .PP The \fI%c\fR macro, giving a single character coding the file status, can expand into one of the following. .PD 0 .TP 5 \&. The file is up to date (not newer than \fIpatchlevel.h\fR). .TP - The file is present in the manifest but is missing. .TP > The file has been modified since last patch (newer than \fIpatchlevel.h\fR). .TP + The file exists but is not listed in the manifest. .TP o The file exists but is not listed in the manifest and is older than \fIpatchlevel.h\fR .TP x The file is listed in the manifest and exists, but has been excluded. Naturally, this will appear in the report only if the \fIx\fR selector is given in the report format. .TP ? The file is listed in the manifest, does not exist, and was excluded. .PD .SH EXAMPLES The command .in +5 .nf .sp \fImanilist -ct -p 'ni:%n'\fR .sp .fi .in -5 will list all the source files from your distribution which are not listed in your MANIFEST.new file. Note that this includes only "source" files, that is to say files whose extension is listed in the inclusion list. If you do not wish this restriction, replace the formatting string with \fIn:%n\fR (only the excluded files will not appear). .PP To build an initial MANIFEST file, use: .in +5 .nf .sp \fImanilist -n -p 'Af:%n' > MANIFEST\fR .sp .fi .in -5 from the top directory. You will eventually want to fill in descriptions for each file listed in the manifest. .SH FILES .PD 0 .TP 20 MANIFEST.new Default manifest file, listing files and giving a small description for each of them. .PD .SH AUTHOR Raphael Manfredi .SH "SEE ALSO" manifake(1), makedist(1), pat(1). dist_3.5-36.001/bin/packinit.man0000644000175000017500000001022510473666773016477 0ustar srivastasrivasta''' $Id: packinit.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: packinit.man,v $ ''' Revision 3.0.1.4 1995/07/25 13:31:38 ram ''' patch56: fixed a typo ''' ''' Revision 3.0.1.3 1995/05/12 11:57:38 ram ''' patch54: updated my e-mail address ''' ''' Revision 3.0.1.2 1994/10/29 15:45:17 ram ''' patch36: added new variables cext, shext, changelog and changercs ''' ''' Revision 3.0.1.1 1994/01/24 13:54:31 ram ''' patch16: now documents variables set in .package by packinit ''' ''' Revision 3.0 1993/08/18 12:04:06 ram ''' Baseline for dist 3.0 netwide release. ''' ''' .TH PACKINIT 1 ram .SH NAME packinit \- initialize or update your .package file .SH SYNOPSIS .B packinit .SH DESCRIPTION .B Packinit will create (or update) a \fI.package\fR file, so that all the .B dist tools can be smart and know some basic things about your package, such as its revision number, or the e-mail address of its maintainer. .PP .I Packinit should be run from the top level directory of your package, before using any other \fIdist\fR tool. Later on, you may rerun it to update some of its values. .I Packinit will create a single file and leave the remaining of your directory undisturbed. .SH VARIABLES .I Packinit defines the following variables in your \fI.package\fR file: .TP 15 .PD 0 baserev The baseline revision number. .TP cext The list (space separated) of file extensions identifying potential holders of C symbols. This is added to the default .[chyl] extension lookup. Shell-style patterns may be used. .TP changelog The name of the \fIChangeLog\fR file managed by \fIpatlog\fR. .TP changercs Boolean stating whether RCS logs are to be made part of \fIChangeLog\fR. .TP copyright Name of the file used for Copyright expansion. .TP ftpdir Directory where patches are located on the FTP site. .TP ftpsite Name of the FTP site where patches may be retrieved from. .TP list_addr Address of the package mailing list where users may post messages to. .TP list_manager Type of list manager attached to the list administrative request address. .TP list_name Name of the package users mailing list. .TP list_request Address where subscribe and unsubscribe requests for the package mailing list should be sent to. .TP list_sub Format of the subscribe requests. .TP list_unsub Format of the unsubscribe requests. .TP list_users A boolean string set to 'true' when there is a mailing list set up for discussion about the package. .TP mailagent A boolean string set to 'true' when people are allowed to retrieve patches via mailagent \fI@SH mailpatch\fR commands. .TP maintloc E-mail address of the package maintainer, preferably in Internet format. .TP maintname Full name of the package maintainer. .TP mydiff Name of the \fIdiff\fR program to be used when computing a patch. .TP newsgroups Newsgroup list where new patches should be posted to, empty for no postings. .TP orgname Full name of the organization where the package maitainer resides, or path to a file containing that name. .TP package Name of the package. .TP packver Version of the \fIpackinit\fR program that built the \fI.package\fR file. .TP patchbranch Name of the RCS branch used to store subsequent updates of a file after a baseline has been released. .TP recipients People who should be sent newly issued patches. .TP shext The list (space separated) of file extensions identifying potential holders of shell symbols. This is added to the default .SH extension lookup. Shell-style patterns may be used. Note that only .SH extensions are looked up by Configure for automatic shell extraction with variable substitutions, no matter what this variable is set to. .PD .SH FILE .TP 15 \&.package File holding all the package-related values .SH AUTHORS Larry Wall (version 2.0) .br Raphael Manfredi .SH "SEE ALSO" dist(1). dist_3.5-36.001/bin/svn-revision0000755000175000017500000000231311474516061016551 0ustar srivastasrivasta#!/bin/sh # # $Id: svn-revision 12303 2006-11-11 08:11:46Z cbiere $ # # Copyright (c) 2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # Computes SVN current revision number, if possible, emitting it in # the form of a #define for C perusal. # LC_ALL=C export LC_ALL TOP="$1" FILE="$2" if [ "x$FILE" = x ]; then FILE="&1" oldrev='' else oldrev=`grep REVISION "$FILE" 2>/dev/null | head -n1 | cut -d' ' -f4` fi if test -d "$TOP/.svn"; then revnum=`svn info "$TOP" 2>/dev/null | grep '^Revision' | head -n1 | cut -d' ' -f2` else revnum="$oldrev" # keep as is fi if [ "x$revnum" = "x$oldrev" ]; then exit 0 fi { stamp=`date +"%Y-%m-%d %H:%M:%d %z"` cat < "$FILE" dist_3.5-36.001/bin/manicheck.man0000644000175000017500000000255210473666773016623 0ustar srivastasrivasta''' $Id: manicheck.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: manicheck.man,v $ ''' Revision 3.0 1993/08/18 12:04:02 ram ''' Baseline for dist 3.0 netwide release. ''' ''' .TH MANICHECK 1 ram .SH NAME manicheck \- check manifest accuracy .SH SYNOPSIS .B manicheck .SH DESCRIPTION .I Manicheck compares the files listed in your MANIFEST.new (or MANIFEST if that file is not present) with the files within your distribution. It will report files listed in the manifest but not present or files missing from your manifest file. .SH FILES .I Manicheck produces the following temporary files: .TP 20 .PD 0 check.expected lists filenames from manifest .TP check.present lists all potential source files .PD .PP If MANIFEST is not 100% accurate, the following files may be created: .TP 20 .PD 0 check.extra files not listed in manifest .TP check.want files missing from manifest .PD .SH AUTHOR Harlan Stenn .SH "SEE ALSO" manifake(1), makedist(1), manilist(1). dist_3.5-36.001/patchlevel.h0000644000175000017500000000014410473675450015717 0ustar srivastasrivasta/* dist-3.0 - 18 Aug 1993 */ /* dist-3.5 - 25 Aug 2006 */ #define VERSION 3.5 #define PATCHLEVEL 0 dist_3.5-36.001/revision.h0000644000175000017500000000021111474210760015410 0ustar srivastasrivasta/* * THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT * * Generated by ./bin/svn-revision. */ #define REVISION "$Revision: 36 $" dist_3.5-36.001/pat/0002755000175000017500000000000012645366701014205 5ustar srivastasrivastadist_3.5-36.001/pat/patdiff.SH0000755000175000017500000001430211344533734016054 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patdiff (with variable substitutions)" cat >patdiff < # # $Log: patdiff.SH,v $ # Revision 3.0.1.2 1994/01/24 14:30:36 ram # patch16: now prefix error messages with program's name # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.1 1993/08/19 06:42:35 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:43 ram # Baseline for dist 3.0 netwide release. # \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; !GROK!THIS! cat >>patdiff <<'!NO!SUBS!' $RCSEXT = ',v' unless $RCSEXT; $TOPDIR = ''; # We are at top-level directory $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless $#ARGV >= 0; &usage unless &Getopts("ahnV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } &readpackage; ©right'init($copyright) if -f $copyright; system 'mkdir', 'bugs' unless -d 'bugs'; if (-f 'patchlevel.h') { open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n"; while () { $bnum = $1 if /^#define\s+PATCHLEVEL\s+(\d+)/; } die "$progname: malformed patchlevel.h file.\n" if $bnum eq ''; ++$bnum; } else { $bnum=1; } if ($opt_a) { open(MANI,"MANIFEST.new") || die "$progname: can't read MANIFEST.new: $!\n"; @ARGV = (); while () { chop; ($_) = split(' '); next if -d; push(@ARGV,$_); } close MANI; } foreach $file (@ARGV) { next if ($file =~ /^patchlevel.h$/); # Skip patchlevel.h if (! -f $file) { print "$progname: $file not found.\n"; next; } $files = &rcsargs($file); @files = split(' ',$files); $new=''; $revs=0; $rlog = `rlog -rlastpat- $files 2>&1`; ($lastpat) = ($rlog =~ /lastpat: ([\d.]+)/); ($revs) = ($rlog =~ /selected revisions: (\d+)/); if (!$revs) { print "$progname: no cil has been done on $file.\n" ;; } elsif ($revs == 1) { ($base) = ($rlog =~ /.*\nrevision\s+(\S+)/); ($a,$b,$c,$d) = split(/\./,$base); if ($d ne '') { if (!$opt_n) { print "$progname: no changes in $file since last patch. (Did you cil it?)\n"; next; # Skip file with no changes } else { $new='foo'; } } else { $revs=0; $rlog = `rlog -r$revbranch- $files 2>&1`; ($revs) = ($rlog =~ /selected revisions: (\d+)/); if (!$revs) { print "$progname: no changes in $file since base version. (Did you cil it?)\n"; next; # Skip file with no changes } else { ($new) = ($rlog =~ /\nrevision\s*(\d+\.\d+\.\d+\.\d+)/); } } } else { ($new) = ($rlog =~ /\nrevision\s*(\d+\.\d+\.\d+\.\d+)/); } if ($new ne '') { ($fname = $file) =~ s|.*/||; $fname = substr($fname, 0, 11); # For filsystems with short names open(PATCH,">>bugs/$fname.$bnum") || die "Can't make patch"; print PATCH "\nIndex: $file\n"; open(CO,"co -p -rlastpat $files 2>/dev/null |"); while () { if (/\$Header/ || /\$Id/) { print PATCH "Prereq: $lastpat\n"; last; } } close CO; if (!$opt_n) { if ($mydiff eq '') { open(DIFF,"rcsdiff -c -rlastpat -r$new $files |") || die "$progname: can't fork rcsdiff: $!\n"; while () { if ($. == 1) {s|\*\*\* \S+ |*** $file.old |;} if ($. == 2) {s|--- \S+ |--- $file |;} s|Lock[e]r:.*\$|\$|; # Use [e] to make it safe on itself print PATCH; } close DIFF; system 'rcs', "-Nlastpat:$new", @files; } else { ©right'expand("co -p -rlastpat $file", "/tmp/pdo$$"); ©right'expand("co -p -r$new $file", "/tmp/pdn$$"); open(DIFF, "$mydiff /tmp/pdo$$ /tmp/pdn$$ |") || die "Can't run $mydiff"; while () { # Contextual or unified diff if ($. == 1) { s|\*\*\* \S+ |*** $file.old | || s|--- \S+ |--- $file.old |; } if ($. == 2) { s|--- \S+ |--- $file | || s|\+\+\+ \S+ |+++ $file |; } s|Lock[e]r:.*\$|\$|; # Remove locker mark print PATCH; } close DIFF; system 'rcs', "-Nlastpat:$new", @files; unlink "/tmp/pdn$$", "/tmp/pdo$$"; } } else { if ($mydiff eq '') { open(DIFF,"rcsdiff -c -rlastpat $files |") || die "Can't run rcsdiff"; while () { if ($. == 1) {s|\*\*\* \S+ |*** $file.old |;} if ($. == 2) {s|--- \S+ |--- $file |;} s|Lock[e]r:.*\$|\$|; # Remove locker mark print PATCH; } close DIFF; } else { system "co -p -rlastpat $files >/tmp/pdo$$"; system "cp $file /tmp/pdn$$"; open(DIFF, "$mydiff /tmp/pdo$$ /tmp/pdn$$ |") || die "$progname: can't fork $mydiff: $!\n"; while () { # Contextual or unified diff if ($. == 1) { s|\*\*\* \S+ |*** $file.old |; s|--- \S+ |--- $file.old |; } if ($. == 2) { s|--- \S+ |--- $file |; s|\+\+\+ \S+ |+++ $file |; } s|Lock[e]r:.*\$|\$|; # Remove locker mark print PATCH; } close DIFF; unlink "/tmp/pdn$$", "/tmp/pdo$$"; } } } } sub usage { print STDERR <>patdiff $grep -v '^;#' ../pl/rcsargs.pl >>patdiff $grep -v '^;#' ../pl/copyright.pl >>patdiff $grep -v '^;#' ../pl/tilde.pl >>patdiff $grep -v '^;#' ../pl/profile.pl >>patdiff chmod +x patdiff $eunicefix patdiff dist_3.5-36.001/pat/patclean.SH0000755000175000017500000001150011344533734016223 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patclean (with variable substitutions)" cat >patclean <>patclean <<'!NO!SUBS!' $RCSEXT = ',v' unless $RCSEXT; $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless $#ARGV >= 0; &usage unless &Getopts("ahnmV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } $RCSEXT = ',v' unless $RCSEXT; $ENV{'DIST'} = '/dev/null'; # Disable ~/.dist_profile chop($pwd = `pwd`) unless -f '.package'; until (-f '.package') { die "$progname: no .package file! Run packinit.\n" unless $pwd; chdir '..' || die "$progname: can't cd ..: $!\n"; $pwd =~ s|(.*)/(.*)|$1|; $prefix = $2 . '/' . $prefix; } if ($prefix) { for (@ARGV) { s/^/$prefix/ unless m|^[-/]|; } } # We now are at the top level &readpackage; if ($opt_n) { &newer; # Look for files newer than patchlevel.h } elsif ($opt_a) { open(MANI,"MANIFEST.new") || die "$progname: can't read MANIFEST.new: $!\n"; @ARGV = (); while () { s|^\./||; next if m|^patchlevel.h|; # This file is built by hand chop; ($_) = split(' '); next if -d; push(@ARGV,$_); } close MANI; } elsif ($opt_m) { open(MODS,"bugs/.mods$bnum") || die "$progname: no modification found.\n"; @ARGV = (); while () { next if m|^patchlevel.h$|; # This file is built by hand chop; ($_) = split(' '); push(@ARGV,$_); } close MODS; } # Set a temporary file for check outs $TMPFILE = "/tmp/cl$$.tmp"; # Now loop over each file specified, doing a 'rcsclean' foreach $file (@ARGV) { if (-f $file) { $files = &rcsargs($file); @files = split(' ', $files); $rlog = `rlog -rlastpat- $files 2>&1`; ($revs) = ($rlog =~ /selected revisions: (\d+)/); if (!$revs) { print "$progname: $file has never been checked in--checking in...\n"; system 'perl', '-S', 'patcil', '-p', $file; $revs = 2; # At least null trunk + new fresh revision } # Look whether there is a branch if ($revs == 1) { $rlog = `rlog -r$revbranch $files 2>&1`; ($revs) = ($rlog =~ /selected revisions: (\d+)/); $revs++; # add the base revision } # We must only give the name of the RCS revision file, i.e. $files[1] if ($revs == 1) { system "co -q -p$baserev $files[1] > $TMPFILE"; } else { system "co -q -p$revbranch $files[1] > $TMPFILE"; } if ($? == 0) { system 'cmp', '-s', $file, $TMPFILE; if ($? == 0) { unlink $file; print "$progname: $file removed.\n"; } else { # Check in file and make sure all was ok system 'perl', '-S', 'patcil', '-p', $file; system "co -q -p$revbranch $files[1] > $TMPFILE"; if ($? == 0) { system 'cmp', '-s', $file, $TMPFILE; if ($? == 0) { unlink $file; print "$progname: $file removed.\n"; } else { print "$progname: $file NOT removed.\n"; } } else { print "$progname: could not check out--$file NOT removed.\n"; } } } else { print "$progname: no revision--$file NOT removed.\n"; } } } unlink "$TMPFILE"; sub usage { print STDERR <>patclean $grep -v '^;#' ../pl/package.pl >>patclean $grep -v '^;#' ../pl/rcsargs.pl >>patclean $grep -v '^;#' ../pl/tilde.pl >>patclean $grep -v '^;#' ../pl/profile.pl >>patclean chmod +x patclean $eunicefix patclean dist_3.5-36.001/pat/patftp.SH0000755000175000017500000000563611344533734015747 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patftp (with variable substitutions)" cat >patftp < # # $Log: patftp.SH,v $ # Revision 3.0.1.3 1994/01/24 14:30:43 ram # patch16: now prefix error messages with program's name # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.2 1993/08/24 12:16:57 ram # patch3: removed useless orgname variable # # Revision 3.0.1.1 1993/08/19 06:42:36 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:44 ram # Baseline for dist 3.0 netwide release. # \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; !GROK!THIS! cat >>patftp <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless &Getopts("hV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } $RCSEXT = ',v' unless $RCSEXT; chdir '..' if -d '../bugs'; &readpackage; if ($#ARGV < 0) { open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n"; while () { $argv = $1 if /^#define\s+PATCHLEVEL\s+(\d+)/; } close PL; die "$progname: malformed patchlevel.h file.\n" if $argv eq ''; @ARGV = $argv; } else { for (@ARGV) { s/^patch//; } $argv = &rangeargs(@ARGV); @ARGV = split(' ',$argv); } if ($#ARGV < 0) { print STDERR "$progname: no patches specified.\n"; &usage; } elsif ($#ARGV) { print "$progname: copying $package $baserev patches $argv to $ftpdir...\n"; } else { print "$progname: copying $package $baserev patch $argv to $ftpdir...\n"; } chdir 'bugs' || die "$progname: can't cd to bugs: $!\n"; until ($#ARGV < 0) { $patnum = shift; `cp patch$patnum $ftpdir`; } sub usage { print STDERR <>patftp $grep -v '^;#' ../pl/rangeargs.pl >>patftp $grep -v '^;#' ../pl/tilde.pl >>patftp $grep -v '^;#' ../pl/profile.pl >>patftp chmod +x patftp $eunicefix patftp dist_3.5-36.001/pat/Makefile.SH0000755000175000017500000001477311474560157016173 0ustar srivastasrivasta: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-43] : $X-Id: Jmake.tmpl 47 2010-11-28 22:23:13Z rmanfredi $ case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac CURRENT=pat DIR=`echo $CURRENT/ | sed -e 's/\.\///g'` echo "Extracting ${DIR}Makefile (with variable substitutions)" INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'` INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'` DATE=`date` $spitshell >Makefile <>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files # $X-Id: Jmake.rules 18 2006-12-27 10:35:09Z rmanfredi $ ######################################################################## # Start of Jmakefile # $X-Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $X-Log: Jmakefile,v $ # Revision 3.0.1.3 1995/07/24 09:57:21 ram # patch56: was missing an entry for the patlog program # # Revision 3.0.1.2 1994/01/24 13:42:48 ram # patch16: added dependency generation stage # # Revision 3.0.1.1 1993/08/24 12:09:05 ram # patch3: added patnotify and patsnap # # Revision 3.0 1993/08/18 12:10:32 ram # Baseline for dist 3.0 netwide release. # BASE = // cil base diff make clean col name ftp send \ index post notify snap log PAT = \ pat \ patcil \ patbase \ patdiff \ patmake \ patclean \ patcol \ patname \ patftp \ patsend \ patindex \ patpost \ patnotify \ patsnap \ patlog all:: $(PAT) local_realclean:: $(RM) $(PAT) pat: pat.SH /bin/sh pat.SH patcil: patcil.SH /bin/sh patcil.SH patbase: patbase.SH /bin/sh patbase.SH patdiff: patdiff.SH /bin/sh patdiff.SH patmake: patmake.SH /bin/sh patmake.SH patclean: patclean.SH /bin/sh patclean.SH patcol: patcol.SH /bin/sh patcol.SH patname: patname.SH /bin/sh patname.SH patftp: patftp.SH /bin/sh patftp.SH patsend: patsend.SH /bin/sh patsend.SH patindex: patindex.SH /bin/sh patindex.SH patpost: patpost.SH /bin/sh patpost.SH patnotify: patnotify.SH /bin/sh patnotify.SH patsnap: patsnap.SH /bin/sh patsnap.SH patlog: patlog.SH /bin/sh patlog.SH local_install:: $(PAT) @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \ for i in $(PAT); do \ (set -x; $(INSTALL) -c -m 555 \ $$i $(INSTALL_PREFIX)$(SCRIPTDIR)) || exit 1;\ done local_deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for i in $(PAT); do \ (set -x; $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/$$i); \ done local_install.man:: pat.man @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \ $(INSTALL) -c -m 444 pat.man $(INSTALL_PREFIX)$(MANSRC)/pat.$(L) local_deinstall.man:: $(RM) $(INSTALL_PREFIX)$(MANSRC)/pat.$(L) PATSH = \ pat.SH \ patcil.SH \ patbase.SH \ patdiff.SH \ patmake.SH \ patclean.SH \ patcol.SH \ patname.SH \ patftp.SH \ patsend.SH \ patindex.SH \ patpost.SH \ patnotify.SH \ patsnap.SH \ patlog.SH depend:: local_depend local_depend:: ($(SED) '/^# DO NOT DELETE/q' Makefile && \ grep '^\$$grep' $(PATSH) | \ $(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \ ) > Makefile.new cp Makefile Makefile.bak cp Makefile.new Makefile $(RM) Makefile.new ######################################################################## # Common rules for all Makefiles -- do not edit all:: clean: local_clean realclean: local_realclean clobber: local_clobber local_clean:: if test -f core; then $(RM) core; fi $(RM) *~ *.o local_realclean:: local_clean local_clobber:: local_realclean $(RM) Makefile config.sh install:: local_install install.man:: maybe_install.man deinstall:: local_deinstall deinstall.man:: maybe_deinstall.man install.man-yes: local_install.man install.man-no: deinstall.man-yes: local_deinstall.man deinstall.man-no: !NO!SUBS! case "$installmansrc" in '') man=no;; *) man=yes;; esac $spitshell >>Makefile <>Makefile <<'!NO!SUBS!' Makefile.SH: Jmakefile -@if test -f $(TOP)/.package; then \ if test -f Makefile.SH; then \ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ fi; \ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ else touch $@; fi Makefile: Makefile.SH /bin/sh Makefile.SH tags:: $(CTAGS) -w *.[ch] $(CTAGS) -xw *.[ch] > tags local_clobber:: $(RM) tags depend:: ######################################################################## # Empty rules for directories with no sub-directories -- do not edit local_install:: @echo "install in $(CURRENT) done." local_deinstall:: @echo "deinstall in $(CURRENT) done." local_install.man:: @echo "install.man in $(CURRENT) done." local_deinstall.man:: @echo "deinstall.man in $(CURRENT) done." Makefiles:: Makefiles.SH:: ######################################################################## # Dependencies generated by make depend # DO NOT DELETE THIS LINE -- make depend relies on it # Put nothing here or make depend will gobble it up .FORCE_DEPEND:: @echo "You must run 'make depend' in $(TOP) first."; exit 1 !NO!SUBS! chmod 644 Makefile $eunicefix Makefile dist_3.5-36.001/pat/patmake.SH0000755000175000017500000002640611344533734016071 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patmake (with variable substitutions)" cat >patmake < # Contribution by: Graham Stoney # # $Log: patmake.SH,v $ # Revision 3.0.1.5 1995/09/25 09:21:19 ram # patch59: now calls patsend with -i to add more instructions # # Revision 3.0.1.4 1994/10/29 16:43:09 ram # patch36: a lot of setup is now performed by patlog # patch36: added various escapes in strings for perl5 support # # Revision 3.0.1.3 1994/01/24 14:30:55 ram # patch16: now prefix error messages with program's name # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.2 1993/08/24 12:18:59 ram # patch3: now asks for patch mailing/posting after all patches edited # patch3: patch release notification is done via new patnotify # patch3: random cleanup, removed old RCS logs # # Revision 3.0.1.1 1993/08/19 06:42:38 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:45 ram # Baseline for dist 3.0 netwide release. # \$defeditor='$defeditor'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; \$mailer = '$mailer'; !GROK!THIS! cat >>patmake <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless &Getopts("hV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } &readpackage; &readusers; $FILEOVERHEAD = 40; # Name of files, Index, Prereq $MAXPATSIZE = 50000; # Maximum allowed size for a patch $PATOVERHEAD = 2500; # Litterature $FIRST_PAT = 3000; # Give space for first patch (descriptions) if (-f 'patchlevel.h') { open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n"; while () { if (/^#define\s+PATCHLEVEL\s+(\d+)/) { $last = $1; $patchline = $.; # Record PATCHLEVEL line } } die "$progname: malformed patchlevel.h file.\n" if $last eq ''; $bnum = $last + 1; } else { $patchline = 1; $bnum = 1; $last = ''; } @ARGV = <[Mm]akefile*>; $mf = ''; if ($#ARGV > 0) { while (<>) { $mf .= $_ if /^[a-z.]+\s*:/; # Rules in makefile } } $after = ''; $after .= "\t\tConfigure -ders\n" if -f 'Configure'; $after .= "\t\tmake depend\n" if $mf =~ /^depend:/m; $after .= "\t\tmake\n" if $mf; $after .= "\t\tmake test\n" if $mf =~ /^test:/m; $after .= "\t\tmake install\n" if $mf =~ /^install:/m; $after .= "\t\tmake install.man\n" if $mf =~ /^install\.man:/m; chdir 'bugs' if -d 'bugs'; die "$progname: patch #$bnum already exists.\n" if -f "patch$bnum"; @patlist=<*.$bnum>; die "$progname: no diff files for patch #$bnum.\n" if $patlist[0] =~ /^\*/ || $patlist[0] eq ''; # Whether they asked for a changelog file or not, call patlog. # This will create at least the .pri and .subj and .clog files that we need. # If a changelog file is needed, it will update it and create the necessary # patch before we go on and put all those patches together. # Note that we make use of the '-r' option, in case they have already # run patlog themselves and made the necessary adjustments. Since -r supersedes # -u, it's safe to allow ~/.dist_profile processing anyway. chdir '..' if -d '../bugs'; system 'perl', '-S', 'patlog', '-r'; # Must be called from top-level dir chdir 'bugs' if -d 'bugs'; @patlist=<*.$bnum>; # Reget it, in case Changes.xx appeared due to patlog # Look for size of each diff file for (@patlist) { ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($_); $size{$_} = $size; } # Sort the array, biggest sizes first sub revnum { $size{$a} < $size{$b} ? 1 : $size{$a} > $size{$b} ? -1 : 0; } @patlist = sort revnum @patlist; # Put files in a patch for (@patlist) { $i=1; # Find the patch in which the current file can go # Divide size by 15 to count the 3 spaces added in front of each line while (($newtot = int($tot[$i] + $size{$_} + $size{$_}/15 + $FILEOVERHEAD)) > $MAXPATSIZE-$PATOVERHEAD-($i == 1 ? $FIRST_PAT : 0) && $tot[$i]) { $i++; } # Adding $_ to patch $i giving $newtot bytes $tot[$i] = $newtot; # Update size of kit $i $list[$i] .= " $_"; # Add file to the kit $i } $numpat = $#list; # Number of patches to generate if ($numpat > 1) { print "$progname: Warning: generating $numpat patches.\n"; sleep(1); } $hah = " (hah!)" if $bnum == 1; $patbase = $bnum; # First patch generated open(PRIORITY, ".pri$bnum"); chop($priority = ); close PRIORITY; $priority = 'LOW' unless $priority; for ($i = 1; $i <= $numpat; $i++) { # For all patches... open(PATCH,">patch$bnum") || die "Can't create patch #$bnum"; chop($date=`date`); print PATCH "System: $package version $baserev Patch #: $bnum "; print PATCH "Priority: $priority\n" unless $priority eq ''; # Print subjects only for first patch if ($i == 1) { open(SUBJECTS, ".subj$bnum"); print PATCH while ; close SUBJECTS; } else { print PATCH "Subject: patch #$patbase, continued\n"; } print PATCH "Date: $date From: $maintname <$maintloc> Description: "; # Print description and repeat-by only for first patch if ($i == 1) { open(LOGS, ".clog$bnum"); $_ = ; $_ = ; $_ = ; # Skip first three lines print PATCH while ; close LOGS; print PATCH "Repeat-By: \n"; } else { print PATCH "\tSee patch #$patbase.\n\n"; } print PATCH " Fix: From rn, say \"| patch -p -N -d DIR\", where DIR is your $package source directory. Outside of rn, say \"cd DIR; patch -p -N "; if ($mailagent ne 'false') { print PATCH " If you send a mail message of the following form it will greatly speed processing: Subject: Command \@SH mailpatch PATH $package $baserev LIST ^ note the c where PATH is a return path FROM ME TO YOU either in Internet notation, or in bang notation from some well-known host, and LIST is the number of one or more patches you need, separated by spaces, commas, and/or hyphens. Saying 35- says everything from 35 to the end. To get some more detailed instructions, send me the following mail: Subject: Command \@SH mailhelp PATH "; } if ($ftpsite) { print PATCH " You can also get the patches via anonymous FTP from $ftpsite. "; } # Print patchlevel at the top of each patch print PATCH " Index: patchlevel.h "; if ($last eq '') { `echo "#define PATCHLEVEL 1" >patchlevel.h`; `cp /dev/null patchlevel.h.null`; print PATCH `diff -c patchlevel.h.null patchlevel.h`; unlink 'patchlevel.h', 'patchlevel.h.null'; } else { print PATCH "Prereq: $last ${patchline}c${patchline} < #define PATCHLEVEL $last --- > #define PATCHLEVEL $bnum "; } $last = $bnum; # Update last patch push(@patset, $bnum); # Record set of generated patch(es) @ARGV = split(' ', $list[$i]); while (<>) { print PATCH; } print PATCH "\n*** End of Patch $bnum ***\n"; close PATCH; # Update patchlevel.h file $editor = $ENV{'VISUAL'}; $editor = $ENV{'EDITOR'} unless $editor; $editor = $defeditor unless $editor; $editor = 'vi' unless $editor; system $editor, "patch$bnum"; if (-s "patch$bnum") { system 'chmod', '-w', "patch$bnum"; # Protect newly created patch chdir '..'; `echo "#define PATCHLEVEL 0" >patchlevel.h` unless -f 'patchlevel.h'; open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n"; open(PLN,">patchlevel.h+") || die "$progname: can't create new patchlevel.h: $!\n"; while () { if (/^#define\s+PATCHLEVEL\s+(\d+)/) { $bnum = $1; $bnum++; # Update patch level print PLN "#define PATCHLEVEL $bnum\n"; } else { print PLN; # Simply copy other lines } } close PLN; close PL; `mv -f patchlevel.h+ patchlevel.h`; die "$progname: malformed patchlevel.h file.\n" if $bnum eq ''; } else { unlink "patch$bnum"; die "$progname: aborted.\n"; } chdir 'bugs' || die "$progname: cannot cd to bugs: $!\n"; # Find priority for next patch in loop $priority=''; open(PATCH, "patch$bnum") || die "Cannot re-open patch #$bnum !\n"; while () { /^Priority:\s*(\S+)\s*$/ && ($priority = $1); } close PATCH; $bnum++; # For next patch in loop } utime time, time, 'patchlevel.h'; # Reset timestamp on patchlevel if (@patset == 1) { $bnum = pop(@patset); $patch = "patch #$bnum"; } else { $bmin = shift(@patset); $bmax = pop(@patset); $bnum = "$bmin-$bmax"; $patch = "patches #$bmin thru #$bmax"; } # Post generated patches if ($newsgroups) { print "\nDo you wish to post $patch to $newsgroups? [y] "; $ans = ; system 'patpost', $bnum unless $ans =~ /^n/i; } # Mail generated patches if ($recipients) { print "\n"; if (0 == ($recipients =~ tr/ //)) { print "Do you wish to send $patch to $recipients? [y] "; } else { print "The following people are on the recipient list:\n\n"; foreach $addr (split(' ', $recipients)) { print "\t$addr\n"; } print "\nDo you wish to send $patch to them? [y] "; } $ans = ; system 'patsend', '-i', $bnum, $recipients unless $ans =~ /^n/i; } # Copy patches to FTP directory if ($ftpdir) { print "\nDo you wish to copy $patch to $ftpdir? [y] "; $ans = ; system 'patftp', $bnum unless $ans =~ /^n/i; } # Notify people about it. if ($notify) { print "\n"; if (0 == ($notify =~ tr/ //)) { print "Do you wish to notify $notify? [y] "; } else { print "The following people are on the notify list:\n\n"; foreach $addr (split(' ', $notify)) { print "\t$addr\n"; } print "\nDo you wish to notify them? [y] "; } $ans = ; system 'patnotify', $notify unless $ans =~ /^n/i; } sub usage { print STDERR <>patmake $grep -v '^;#' ../pl/users.pl >>patmake $grep -v '^;#' ../pl/tilde.pl >>patmake $grep -v '^;#' ../pl/profile.pl >>patmake chmod +x patmake $eunicefix patmake dist_3.5-36.001/pat/patcol.SH0000755000175000017500000001503111344533734015721 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patcol (with variable substitutions)" cat >patcol <>patcol <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless $#ARGV >= 0; &usage unless &Getopts("acd:f:hnmsCRS:V"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } $RCSEXT = ',v' unless $RCSEXT; $NEWMANI = 'MANIFEST.new' unless $NEWMANI = $opt_f; chop($pwd = `pwd`) unless -f '.package'; until (-f '.package') { die "$progname: no .package file! Run packinit.\n" unless $pwd; chdir '..' || die "$progname: can't cd ..: $!"; $pwd =~ s|(.*)/(.*)|$1|; $prefix = $2 . '/' . $prefix; } if ($prefix) { for (@ARGV) { s/^/$prefix/ unless m|^[-/]|; } } # We now are at the top level &readpackage; undef $opt_C unless -f $copyright; ©right'init($copyright) if $opt_C; &makedir($opt_d) if $opt_d; undef $opt_c unless $opt_d; # Disable -c if not -d undef $opt_R unless $opt_d; # Disable -R if not -d push(@sw, '-q') if $opt_s; # Let RCS work quietly if ($opt_n) { &newer; # Look for files newer than patchlevel.h } elsif ($opt_a) { open(MANI, $NEWMANI) || die "No $NEWMANI found.\n"; @ARGV = (); while () { s|^\./||; next if m|^patchlevel.h| && !$opt_d; # This file is built by hand chop; ($_) = split(' '); next if -d; push(@ARGV,$_); } close MANI; } elsif ($opt_m) { open(MODS,"bugs/.mods$bnum") || die "$progname: no modification found.\n"; @ARGV = (); while () { next if m|^patchlevel.h$|; # This file is built by hand chop; ($_) = split(' '); next if -d; push(@ARGV,$_); } close MODS; } elsif ($opt_S) { &readsnapshot($opt_S); foreach $file (sort keys %Snap) { push(@ARGV, $file); } } # Now loop over each file specified, doing a 'co -l' foreach $file (@ARGV) { if ($opt_c && -f $file) { ©_file($file, $opt_d); next; } # Continue only if file does not exist or option -d was used. if (! -f $file || $opt_d) { $files = &rcsargs($file); @files = split(' ', $files); if ($opt_S && ($rev = $Snap{$file}) ne '') { # Use snapshot file &col($rev); next; } $rlog = `rlog -rlastpat- $files 2>&1`; ($revs) = ($rlog =~ /selected revisions: (\d+)/); if (!$revs) { if ($opt_d) { ©_file($file, $opt_d); } else { print STDERR "$progname: $file has never been checked in\n"; } } else { # Look whether there is a branch if ($revs == 1) { $rlog = `rlog -r$revbranch $files 2>&1`; ($revs) = ($rlog =~ /selected revisions: (\d+)/); $revs++; # add the base revision (trunk) } if ($revs == 1) { &col($baserev); } else { &col($revbranch); } } } } # Run co -l on @files, unlock file if it fails and retry. # If '-d' option was used, we check out in the specified # directory, after having made all the necessary directories # in the path name (which should be relative to the top). sub col { local($rev) = shift; # Revision to be checked out. if (! $opt_d) { if (system 'co', "-l$rev", @sw, @files) { print "$progname: unlocking and trying again...\n" unless $opt_s; system 'rcs', '-u', @sw, @files; system 'co', "-l$rev", @sw, @files unless $?; } } else { local($name) = $files[0]; # First element is file name $_ = $name; s|(.*)/.*|\1| && &makedir("$opt_d/$_"); if ($opt_C) { ©right'expand("co -p @sw -r$rev $files[1]", "$opt_d/$name"); } else { system "co -p -r$rev @sw $files[1] > $opt_d/$name"; } system 'perl', '-pi', '-e', 's|Lock[e]r:.*\$|\$|;', "$opt_d/$name" if $opt_R; # If RCS file has x bits set, add them on new file -x $files[1] && chmod(0755, "$opt_d/$name"); } } # Copy file into directory, eventually performing copyright expansion... sub copy_file { local($file, $dir) = @_; local($base) = $file =~ m|^(.*)/.*|; &makedir("$dir/$base"); if ($opt_C) { ©right'expand("cat $file", "$dir/$file"); } else { system 'cp', "$file", "$dir/$file"; } system 'perl', '-pi', '-e', 's|Lock[e]r:.*\$|\$|;', "$dir/$file" if $opt_R; -x $file && chmod(0755, "$dir/$file"); print "$progname: $file has been copied\n" unless $opt_s; } sub usage { print STDERR <>patcol $grep -v '^;#' ../pl/package.pl >>patcol $grep -v '^;#' ../pl/rcsargs.pl >>patcol $grep -v '^;#' ../pl/copyright.pl >>patcol $grep -v '^;#' ../pl/makedir.pl >>patcol $grep -v '^;#' ../pl/snapshot.pl >>patcol $grep -v '^;#' ../pl/tilde.pl >>patcol $grep -v '^;#' ../pl/profile.pl >>patcol chmod +x patcol $eunicefix patcol dist_3.5-36.001/pat/patchlevel.h0000644000175000017500000000234410473316164016501 0ustar srivastasrivasta/* * This is a prototypical patchlevel.h file. Only the line defining * the PATCHLEVEL symbol is taken into account when patching, so be * sure to make changes to this file ONLY when you start a new release * and, of course, before running patcil... * * This file must appear in your MANIFEST.new, but it will never be * checked in by the pat tools. It is automatically updated when a new * patch is issued. * * When using the '-n' option in some pat* scripts, this file is * taken as a timestamp. So it is best to avoid manual editing unless * you know what you are doing. */ /* * $Id: patchlevel.h 1 2006-08-24 12:32:52Z rmanfredi $ * * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi * * You may redistribute only under the terms of the Artistic Licence, * as specified in the README file that comes with the distribution. * You may reuse parts of this distribution only within the terms of * that same Artistic Licence; a copy of which may be found at the root * of the source tree for dist 4.0. * * $Log: patchlevel.h,v $ * Revision 3.0 1993/08/18 12:10:39 ram * Baseline for dist 3.0 netwide release. * */ #define VERSION 3.0 /* For instance */ #define PATCHLEVEL 0 /* This line is a mandatory */ dist_3.5-36.001/pat/patpost.SH0000755000175000017500000001040611344533734016132 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patpost (with variable substitutions)" cat >patpost < # # $Log: patpost.SH,v $ # Revision 3.0.1.4 1995/05/12 12:25:58 ram # patch54: added explicit From: header line pointing to the maintainer # # Revision 3.0.1.3 1994/01/24 14:32:09 ram # patch16: now prefix error messages with program's name # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.2 1993/08/24 12:19:48 ram # patch3: added ~name expansion for orgname # patch3: random cleanup # # Revision 3.0.1.1 1993/08/19 06:42:41 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:47 ram # Baseline for dist 3.0 netwide release. # \$inews='${inews-/usr/lib/news/inews}'; \$orgname='$orgname'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; !GROK!THIS! cat >>patpost <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless $#ARGV >= 0; &usage unless &Getopts("hrV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } $RCSEXT = ',v' unless $RCSEXT; if ($inews eq 'inews') { $inews = '/usr/lib/news/inews' if -f '/usr/lib/news/inews'; } chdir '..' if -d '../bugs'; &readpackage; $orgname = &tilda_expand($orgname); chop($orgname = `cat $orgname`) if $orgname =~ m|^/|; if ($opt_r) { $repost = ' (REPOST)'; } while ($_ = shift) { if (/^(patch)?[1-9][\d\-]*$/) { s/^patch//; push(@argv,$_); } else { push(@newsgroups,$_); } } $newsgroups = join(',',@newsgroups) unless $#newsgroups < 0; &usage unless $newsgroups; @ARGV = @argv; open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n"; while () { $maxnum = $1 if /^#define\s+PATCHLEVEL\s+(\d+)/; } close PL; die "$progname: malformed patchlevel.h file.\n" if $maxnum eq ''; if ($#ARGV < 0) { @patseq = &patseq($maxnum); $lastpat = pop(@patseq); $argv = &rangeargs("$lastpat-$maxnum"); } else { $argv = &rangeargs(@ARGV); } @ARGV = split(' ',$argv); $argv =~ s/ $//; if ($#ARGV < 0) { print STDERR "$progname: no patches specified.\n"; &usage; } elsif ($#ARGV) { print "$progname: posting $package $baserev patches $argv to $newsgroups...\n"; } else { print "$progname: posting $package $baserev patch $argv to $newsgroups...\n"; } chdir 'bugs' || die "$progname: can't cd to bugs: $!\n"; fork && exit; until ($#ARGV < 0) { $patnum = shift; open(PATCH,"patch$patnum") || die "$progname: can't open patch$patnum: $!\n"; open(XHEAD,"|$inews -h") || die "$progname: can't fork $inews: $!\n"; print XHEAD "From: $maintloc ($maintname) Newsgroups: $newsgroups Subject: $package $baserev patch #$patnum$repost Summary: This is an official patch for $package $baserev. Please apply it. Expires: References: Sender: Distribution: Organization: $orgname Keywords: "; while () { print XHEAD; } close PATCH; close XHEAD; die "$progname: could not post patch$patnum.\n" if $?; } sub usage { print STDERR <>patpost $grep -v '^;#' ../pl/rangeargs.pl >>patpost $grep -v '^;#' ../pl/patseq.pl >>patpost $grep -v '^;#' ../pl/tilde.pl >>patpost $grep -v '^;#' ../pl/profile.pl >>patpost chmod +x patpost $eunicefix patpost dist_3.5-36.001/pat/patsend.SH0000755000175000017500000001323611344533734016102 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patsend (with variable substitutions)" cat >patsend < # # $Log: patsend.SH,v $ # Revision 3.0.1.6 1995/09/25 09:22:02 ram # patch59: new -i option to add more instructions for end-users # # Revision 3.0.1.5 1994/01/24 14:32:46 ram # patch16: now prefix error messages with program's name # patch16: don't feed mailer with more than 50 addresses at a time # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.4 1993/08/25 14:08:01 ram # patch6: now asks for recipient list edition by default # patch6: new -q option to suppress that # # Revision 3.0.1.3 1993/08/24 12:21:59 ram # patch3: new -u option # patch3: added Precedence and X-Mailer headers in mail message # patch3: added ~name expansion for orgname # # Revision 3.0.1.2 1993/08/19 07:10:19 ram # patch3: was not correctly writing the To: header field # # Revision 3.0.1.1 1993/08/19 06:42:42 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:49 ram # Baseline for dist 3.0 netwide release. # \$orgname='$orgname'; \$mailer='$mailer'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; !GROK!THIS! cat >>patsend <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless &Getopts("hiquV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } chdir '..' if -d '../bugs'; &readpackage; &readusers if $opt_u; $orgname = &tilda_expand($orgname); chop($orgname = `cat $orgname`) if $orgname =~ m|^/|; while ($_ = shift) { if (/^(patch)?[1-9][\d,-]*$/) { s/^patch//; push(@argv,$_); } else { push(@dest,$_); } } $dest = join(' ',@dest); $dest .= " $recipients" if $opt_u; &usage unless $dest; # Offer to edit the address list unless -q unless ($opt_q) { select((select(STDOUT), $| = 1)[0]); print "Do you wish to edit the address list? [y] "; $ans = ; unless ($ans =~ /^n/i) { @to = split(' ', $dest); &listedit(*to); $dest = join(' ', @to); } } $to = join(', ', split(' ', $dest)); @ARGV = @argv; open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n"; while () { $maxnum = $1 if /^#define\s+PATCHLEVEL\s+(\d+)/; } close PL; die "$progname: malformed patchlevel.h file.\n" if $maxnum eq ''; if ($#ARGV < 0) { @patseq = &patseq($maxnum); $lastpat = pop(@patseq); $argv = &rangeargs("$lastpat-$maxnum"); } else { $argv = &rangeargs(@ARGV); } @ARGV = split(' ',$argv); $argv =~ s/ $//; if ($#ARGV < 0) { print STDERR "$progname: no patches specified.\n"; &usage; } elsif ($#ARGV) { print "$progname: sending $package $baserev patches $argv to $dest...\n"; } else { print "$progname: sending $package $baserev patch $argv to $dest...\n"; } chdir 'bugs' || die "$progname: can't cd to bugs: $!\n"; fork && exit; $opt = '-odq' if $mailer =~ /sendmail/; until ($#ARGV < 0) { $patnum = shift; # I hate broken mailers! Bust it up into smaller groups of people... @dest = split(' ', $dest); while (@smalldest = splice(@dest, 0, 50)) { $to = join(', ', @smalldest); # Sensible To: for sendmail $smalldest = join(' ', @smalldest); open(MAILER, "|$mailer $opt $smalldest") || die "$progname: can't fork $mailer: $!\n"; print MAILER "To: $to Subject: $package $baserev patch #$patnum Precedence: bulk X-Mailer: dist [version $version PL$patchlevel] Organization: $orgname "; print MAILER "$package version $baserev has been recently upgraded with the following patch, which is being mailed directly to you as you requested when running Configure. If you are not interested in having future patches mailed directly to you, please send me the following mail: Subject: Command \@SH package - $package $baserev -- $progname speaking for $maintname <$maintloc>. " if ($opt_i || $opt_u); print MAILER "[The latest patch for $package version $baserev is #$maxnum.] "; open(PATCH,"patch$patnum") || die "$progname: can't open patch$patnum: $!\n"; while () { print MAILER; } close PATCH; close MAILER; die "$progname: could not mail patch$patnum.\n" if $?; } } sub usage { print STDERR <>patsend $grep -v '^;#' ../pl/rangeargs.pl >>patsend $grep -v '^;#' ../pl/users.pl >>patsend $grep -v '^;#' ../pl/patseq.pl >>patsend $grep -v '^;#' ../pl/tilde.pl >>patsend $grep -v '^;#' ../pl/editor.pl >>patsend $grep -v '^;#' ../pl/listedit.pl >>patsend $grep -v '^;#' ../pl/profile.pl >>patsend chmod +x patsend $eunicefix patsend dist_3.5-36.001/pat/patnotify.SH0000755000175000017500000001464511344533734016466 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patnotify (with variable substitutions)" cat >patnotify <>patnotify <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless &Getopts("hquV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } chdir '..' if -d '../bugs'; &readpackage; &readusers if $opt_u; $dest = join(' ', @ARGV); $dest .= " $notify" if $opt_u; &usage unless $dest; # Offer to edit the address list unless -q unless ($opt_q) { select((select(STDOUT), $| = 1)[0]); print "Do you wish to edit the address list? [y] "; $ans = ; unless ($ans =~ /^n/i) { @to = split(' ', $dest); &listedit(*to); $dest = join(' ', @to); } } if (-f 'patchlevel.h') { open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n"; while () { if (/^#define\s+PATCHLEVEL\s+(\d+)/) { $last = $1; } } die "$progname: malformed patchlevel.h file.\n" if $last eq ''; } else { die "$progname: no patchlevel.h.\n"; } @patches = &patseq($last); # Compute patches sequence $lastpat = pop(@patches); warn "$progname: missing last .logs and .mods files\n" if $lastpat eq ''; $missing = $last - $lastpat + 1; $these = $missing == 1 ? 'this' : 'these'; $patches = $missing == 1 ? 'patch' : 'patches'; $through = $missing == 1 ? $lastpat : "$lastpat thru " . ($lastpat+$missing-1); $have = $missing == 1 ? 'has' : 'have'; $patlist = "$lastpat-"; # They'll get everything up to the end ($Patches = $patches) =~ s/^p/P/; $opt = ($mailer =~ /sendmail/) ? '-odq' : ''; chdir 'bugs' || die "$progname: can't cd to bugs: $!\n"; # Find out priority of last patch set $priority = 'UNKNOWN'; open(PATCH, "patch$lastpat") || die "$progname: can't open patch #$lastpat: $!\n"; while () { /^Priority:\s*(\S+)\s*$/ && ($priority = $1); } close PATCH; # Look for the .clog description and prepare the patch description # for inclusion in the notification, so that they can figure out whether # they really need that patch set. if (-f ".clog$lastpat") { open(LOGS, ".clog$lastpat") || die "$progname: can't open .clog$lastpat: $!\n"; $_ = . . ; # Skip first three lines $clog = ''; while () { $clog .= $_; } close LOGS; } else { warn "$progname: missing last .clog file in bugs directory\n"; } print "$progname: sending notification of $missing new $patches to $dest...\n"; fork && exit; # I hate broken mailers! Bust it up into smaller groups of people... @dest = split(' ', $dest); while (@smalldest = splice(@dest, 0, 50)) { $to = join(', ', @smalldest); # Sensible To: for sendmail $smalldest = join(' ', @smalldest); open(MAILER, "|$mailer $opt $smalldest") || die "$progname: can't fork $mailer: $!\n"; print MAILER "To: $to Subject: $Patches $through for $package version $baserev $have been released. Precedence: bulk X-Mailer: dist [version $version PL$patchlevel] This is just a quick note to let you know that $package version $baserev has been recently upgraded and that $patches $through $have been released. If you are actively using $package, I strongly suggest you upgrade by applying $these $patches, whose priority is $priority. You can fetch $these $patches automatically by sending me the following mail: Subject: Command \@SH mailpatch - $package $baserev $patlist ^ note the c And if you wish to have future patches mailed directly to you, you can add: \@SH package - $package $baserev - mailpatches If you are not interested in receiving any information about future patches, please send me the following mail: Subject: Command \@SH package - $package $baserev "; print MAILER " Following is the $patches description: $clog" if $clog; print MAILER " -- $progname speaking for $maintname <$maintloc>. "; close MAILER; } sub usage { print STDERR <>patnotify $grep -v '^;#' ../pl/users.pl >>patnotify $grep -v '^;#' ../pl/patseq.pl >>patnotify $grep -v '^;#' ../pl/editor.pl >>patnotify $grep -v '^;#' ../pl/listedit.pl >>patnotify $grep -v '^;#' ../pl/tilde.pl >>patnotify $grep -v '^;#' ../pl/profile.pl >>patnotify chmod +x patnotify $eunicefix patnotify dist_3.5-36.001/pat/patindex.SH0000755000175000017500000000325410473316164016255 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patindex (with variable substitutions)" $spitshell >patindex < # # $Log: patindex.SH,v $ # Revision 3.0.1.1 1993/08/19 06:42:37 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:44 ram # Baseline for dist 3.0 netwide release. # zcat='$zcat' test='$test' sed='$sed' grep='$grep' !GROK!THIS! $spitshell >>patindex <<'!NO!SUBS!' if test -d bugs; then cd bugs fi for i in patch? patch??; do if $test -f $i; then echo "=== $i ===" $grep '^Subject: ' $i | $sed 's/^patch\(.*\):Subject/\1/' fi done for i in patch?.Z patch??.Z; do if $test -f $i; then name=`echo $i | $sed "s|\.Z$||"` echo "=== $name ===" $zcat $i | $grep '^Subject: ' | $sed 's/^patch\(.*\):Subject/\1/' fi done !NO!SUBS! chmod 755 patindex $eunicefix patindex dist_3.5-36.001/pat/patname.SH0000755000175000017500000001114711344533734016070 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patname (with variable substitutions)" cat >patname <>patname <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless $#ARGV >= 0; &usage() unless &Getopts("ahnmv:V"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } $RCSEXT = ',v' unless $RCSEXT; $ENV{'DIST'} = '/dev/null'; # Disable ~/.dist_profile chop($pwd = `pwd`) unless -f '.package'; until (-f '.package') { die "$progname: no .package file! Run packinit.\n" unless $pwd; chdir '..' || die "$progname: can't cd ..: $!\n"; $pwd =~ s|(.*)/(.*)|$1|; $prefix = $2 . '/' . $prefix; } if ($prefix) { for (@ARGV) { s/^/$prefix/ unless m|^[-/]|; } } # We now are at the top level &readpackage; unless ($opt_v) { print STDERR "$progname: version number must be specified using -v.\n"; &usage; } if ($opt_n) { &newer; # Look for files newer than patchlevel.h } elsif ($opt_a) { open(MANI,"MANIFEST.new") || die "$progname: can't read MANIFEST.new: $!\n"; @ARGV = (); while () { s|^\./||; next if m|^patchlevel.h|; # This file is built by hand chop; ($_) = split(' '); next if -d; push(@ARGV,$_); } close MANI; } elsif ($opt_m) { open(MODS,"bugs/.mods$bnum") || die "$progname: no modification found.\n"; @ARGV = (); while () { next if m|^patchlevel.h$|; # This file is built by hand chop; ($_) = split(' '); push(@ARGV,$_); } close MODS; } # Now loop over each file specified, doing a 'rcsfreeze' foreach $file (@ARGV) { $files = &rcsargs($file); @files = split(' ', $files); $rlog = `rlog -rlastpat- $files 2>&1`; ($revs) = ($rlog =~ /selected revisions: (\d+)/); if (!$revs) { print "$progname: $file has never been checked in--checking in...\n"; system 'perl', '-S', 'patcil', '-p', $file; $revs = 2; # At least null trunk + new fresh revision } # Look whether there is a branch if ($revs == 1) { $rlog = `rlog -r$revbranch $files 2>&1`; ($revs) = ($rlog =~ /selected revisions: (\d+)/); $revs++; # add the base revision } # If working file exists, make sure latest version was checked in if (-f $file) { if ($revs == 1) { $delta = `rcsdiff -r$baserev $files 2>/dev/null`; } else { $delta = `rcsdiff -r$revbranch $files 2>/dev/null`; } if ($delta ne '') { # File changed; check it in. system 'perl', '-S', 'patcil', '-p', $file; if ($revs > 1) { # Have to re-run rlog after a new ci $rlog = `rlog -r$revbranch $files 2>&1`; } } } # Now assign symbolic revision number if ($revs == 1) { system 'rcs', "-N$opt_v:$baserev", @files; } else { ($lastrev) = ($rlog =~ /revision $revbranch\.(\d+)/); system 'rcs', "-N$opt_v:$revbranch.$lastrev", @files; } } sub usage { print STDERR <>patname $grep -v '^;#' ../pl/package.pl >>patname $grep -v '^;#' ../pl/rcsargs.pl >>patname $grep -v '^;#' ../pl/tilde.pl >>patname $grep -v '^;#' ../pl/profile.pl >>patname chmod +x patname $eunicefix patname dist_3.5-36.001/pat/pat.SH0000755000175000017500000001025711344533734015230 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/pat (with variable substitutions)" cat >pat < # # $Log: pat.SH,v $ # Revision 3.0.1.5 1994/10/29 16:37:53 ram # patch36: now unlinks all the files created by patlog in bugs # # Revision 3.0.1.4 1994/01/24 14:29:17 ram # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.3 1993/08/25 14:04:35 ram # patch6: removal of patch temporary files did not work with gaps # # Revision 3.0.1.2 1993/08/24 12:14:39 ram # patch3: now removes older patch temporary files within bugs # # Revision 3.0.1.1 1993/08/19 06:42:31 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:36 ram # Baseline for dist 3.0 netwide release. # \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; !GROK!THIS! cat >>pat <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless $#ARGV >= 0; &usage unless &Getopts("ahmnV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } &readpackage; if (-f 'patchlevel.h') { open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n"; while () { $bnum = $1 if /^#define\s+PATCHLEVEL\s+(\d+)/; } die "$progname: malformed patchlevel.h file.\n" if $bnum eq ''; ++$bnum; } else { $bnum=1; } if ($opt_n) { &newer; # Look for files newer than patchlevel.h } elsif ($opt_a) { open(MANI,"MANIFEST.new") || die "No MANIFEST.new found.\n"; @ARGV = (); while () { s|^\./||; next if m|^patchlevel.h|; # This file is built by hand chop; ($_) = split(' '); next if -d; push(@ARGV,$_); } close MANI; } elsif ($opt_m) { open(MODS,"bugs/.mods$bnum") || die "$progname: no modification found.\n"; @ARGV = (); while () { next if m|^patchlevel.h$|; # This file is built by hand chop; ($_) = split(' '); push(@ARGV,$_); } close MODS; } # Remove older patch temporary files @patlist = &patseq($bnum - 1); foreach $cpat (@patlist) { unlink ; unlink ; } # Since we're about to launch other pat exectuables, disable ~/.dist_profile # to protect them if they added some weird switches we don't need... $ENV{'DIST'} = '/dev/null'; # Disable ~/.dist_profile system 'perl', '-S', 'patcil', '-p', @ARGV; # Update MANIFEST if necessary, then patcil it. if (-f 'MANIFEST' && `diff MANIFEST.new MANIFEST 2>/dev/null` ne '') { system 'cp', 'MANIFEST.new', 'MANIFEST'; system 'perl', '-S', 'patcil', '-p', 'MANIFEST'; push(@ARGV, 'MANIFEST'); } system 'perl', '-S', 'patdiff', @ARGV; system 'perl', '-S', 'patmake'; sub usage { print STDERR "Usage: $progname [-ahmnV] [filelist]\n"; print STDERR " -a : all the files in MANIFEST.new\n"; print STDERR " -h : print this message and exit\n"; print STDERR " -m : all the modified files (which have been patciled)\n"; print STDERR " -n : all the files newer than patchlevel.h\n"; print STDERR " -V : print version number and exit\n"; exit 1; } !NO!SUBS! $grep -v '^;#' ../pl/newer.pl >>pat $grep -v '^;#' ../pl/package.pl >>pat $grep -v '^;#' ../pl/patseq.pl >>pat $grep -v '^;#' ../pl/tilde.pl >>pat $grep -v '^;#' ../pl/profile.pl >>pat chmod +x pat $eunicefix pat dist_3.5-36.001/pat/Jmakefile0000644000175000017500000000341511474560045016014 0ustar srivastasrivasta/* * Jmakefile for patching tools. */ ;# $Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: Jmakefile,v $ ;# Revision 3.0.1.3 1995/07/24 09:57:21 ram ;# patch56: was missing an entry for the patlog program ;# ;# Revision 3.0.1.2 1994/01/24 13:42:48 ram ;# patch16: added dependency generation stage ;# ;# Revision 3.0.1.1 1993/08/24 12:09:05 ram ;# patch3: added patnotify and patsnap ;# ;# Revision 3.0 1993/08/18 12:10:32 ram ;# Baseline for dist 3.0 netwide release. ;# /* BASE is used to give the extensions for pat* files. Usually, '//' can be * used to specify a null expansion pattern, but some of those new smart cpp * now think it's a up-to-end-of-line comment--why do they do that to us? */ BASE = /^^/ cil base diff make clean col name ftp send \ index post notify snap log /* PAT is derived from BASE and is the list of all the files to produce */ PAT = \ |expand f!$(BASE)! pat!f \ -expand \\ NoManPages() /* There is a single man page for all tools */ SimpleShellScriptTarget($(PAT)) InstallMultipleFlags($(PAT),$(SCRIPTDIR),-m 555) InstallManPage(pat,$(MANSRC)) PATSH = \ |expand f!$(PAT)! !f.SH \ -expand \\ depend:: local_depend local_depend:: ($(SED) '/^# DO NOT DELETE/q' Makefile && \ grep '^\$$grep' $(PATSH) | \ $(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \ ) > Makefile.new cp Makefile Makefile.bak cp Makefile.new Makefile $(RM) Makefile.new dist_3.5-36.001/pat/patcil.SH0000755000175000017500000003336311344533734015723 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patcil (with variable substitutions)" $cat >patcil < # # $Log: patcil.SH,v $ # Revision 3.0.1.4 1994/10/29 16:42:12 ram # patch36: now honors the VISUAL and EDITOR environment variables # patch36: newer RCS programs chop trailing spaces in log messages # patch36: separated V/E and v/e commands # patch36: new 'v' command to edit the file being patcil'ed # patch36: added hook for 'V' command (not implemented yet) # # Revision 3.0.1.3 1994/01/24 14:30:04 ram # patch16: now prefix error messages with program's name # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.2 1993/08/25 14:05:35 ram # patch6: moved geteditor to ../pl/editor.pl # # Revision 3.0.1.1 1993/08/19 06:42:33 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:40 ram # Baseline for dist 3.0 netwide release. # \$defeditor = '$defeditor'; \$pager = '$pager'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; !GROK!THIS! cat >>patcil <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless $#ARGV >= 0; &usage unless &Getopts("abfhnpqsV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } $RCSEXT = ',v' unless $RCSEXT; $PAGER = $ENV{'PAGER'} || "$pager"; $EDITOR = &geteditor; system 'mkdir', 'RCS' unless -d 'RCS'; chop($pwd = `pwd`) unless -f '.package'; until (-f '.package') { die "$progname: no .package file! Run packinit.\n" unless $pwd; chdir '..' || die "Can't cd .."; $pwd =~ s|(.*)/(.*)|$1|; $prefix = $2 . '/' . $prefix; } if ($prefix) { for (@ARGV) { s/^/$prefix/ unless m|^[-/]|; } } # We now are at the top level &readpackage; if (-f 'patchlevel.h') { open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n"; while () { $bnum = $1 if /^#define\s+PATCHLEVEL\s+(\d+)/; } die "$progname: malformed patchlevel.h file.\n" if $bnum eq ''; ++$bnum; } else { $bnum=1; } system 'mkdir', 'bugs' unless -d 'bugs'; open(LOGS,">>bugs/.logs$bnum"); # Remember logs for patmake open(MODS,">>bugs/.mods$bnum"); # Remember modified files push(@sw,'-q') if $opt_q; push(@sw,'-f') if $opt_f; if ($opt_a) { open(MANI,"MANIFEST.new") || die "$progname: can't read MANIFEST.new: $!\n"; @ARGV = (); while () { chop; s|^\./||; next if m|^patchlevel.h|; # Special file ($_) = split(' '); next if -d; push(@ARGV,$_); } close MANI; } elsif ($opt_n) { &newer; } @filelist = @ARGV; sub CLEANUP { print "$progname: Warning: restore $ARGV\n"; exit 1; } if ($opt_s) { open(TTY,">/dev/tty"); select(TTY); $| = 1; select(stdout); $SIG{'INT'} = 'CLEANUP'; while (<>) { if (/^(.*)\$Log[:\$]/) { $comment = $1; $comment =~ s/\s+$//; # Newer RCS chop spaces on emtpy lines $len = length($comment); print; $lastnl = 1; logline: while (<>) { $c = substr($_,0,$len); last logline unless $c eq $comment; $_ = substr($_,$len,999); if ($lastnl) { unless (/^\s*Revision\s+\d/) { $_ = $comment . $_; last logline; } $lastnl = 0; } else { $lastnl = 1 if /^\s*$/; } } } } continue { print; if ($ARGV ne $oldargv) { print TTY "$progname: stripping $ARGV...\n"; $oldargv = $ARGV; } } $SIG{'INT'} = 'DEFAULT'; close TTY; } if ($opt_b) { $flist = &rcsargs(@filelist); @flist=split(' ',$flist); system 'rcs', '-u', @flist; system 'rcs', "-l$revbranch", @flist; system 'ci', '-l', "-r$revbranch", @sw, @flist; exit 0; } open(MANI,"MANIFEST.new") || die "$progname: can't open MANIFEST.new: $!\n"; while () { # Find how many spaces the user wants before comments $space || /(\S+\s+)\S+/ && ($space = length($1)); ($file,$file_comment) = m|(\S+)\s+(.*)|; $inmani{$file} = 1; # File is listed in MANIFEST $comment{$file} = $file_comment; # Save comments } close MANI; $space = 29 unless $space; # Default value file: foreach $file (@filelist) { $files = &rcsargs($file); @files = split(' ',$files); $file = $files[1] if $file =~ /\.$RCSEXT$/; unless ($inmani{$file}) { print "$file does not appear to be in your MANIFEST.new--add? [y] "; $ans = ; if ($ans !~ /^n/i) { print "MANIFEST.new comment? "; $file_comment = ; chop($file_comment); $spacenum = $space - length($file); $blank = " "; $blank = " " x $spacenum unless $spacenum < 1; `echo '${file}${blank}$file_comment' >>MANIFEST.new`; if (-f 'MANIFEST') { print "(Also adding file to your MANIFEST)\n"; # Add a (new) at the end, so the two manifests will # differ and thus manifest will get patched correctly. `echo '${file}${blank}$file_comment (new)' >>MANIFEST`; print MODS "MANIFEST\n"; } } else { $file_comment = ""; # No file, no comment } } $is_first = 0; # Suppose this is not the first cil $revs = 0; # Makes revs a numeric variable $rlog = `rlog -r$baserev -r$revbranch $files 2>&1`; ($total) = ($rlog =~ /total revisions: (\d+)/); ($revs) = ($rlog =~ /selected revisions: (\d+)/); $comment = &rcscomment($file); if (!$revs) { if ($total) { if ($rlog !~ /locks:\s*;/) { system 'rcs', '-u', @files; # unlock branch } # New trunck revision system 'rcs', '-l', @files; # lock trunk } else { $file_comment = $comment{$file} if $inmani{$file}; if ($comment ne '') { &feed($file_comment, 'rcs', '-i', "-c$comment", @files); } else { &feed($file_comment, 'rcs', '-i', @files); } } if ($opt_p) { # check in null as trunk revision rename($file, "$file.xxx"); `cp /dev/null $file` unless -f $file; &cil_col("empty\n", $baserev); system 'rcs', "-Nlastpat:$baserev", @files; rename("$file.xxx", $file); $mess = &getlog($file); next file if $mess eq 'nope'; system 'rcs', '-u', @files; # Unlock trunck &feed($mess, 'ci', "-l$revbranch", @sw, @files) unless $?; } else { $is_first = 1; # This is the first cil $mess = &getlog($file); next file if $mess eq 'nope'; &cil_col($mess, $baserev); system 'rcs', "-Nlastpat:$baserev", @files; } } else { if (!$opt_f) { if ($revs == 1) { $delta = `rcsdiff -r$baserev $files 2>/dev/null`; } else { $delta = `rcsdiff -r$revbranch $files 2>/dev/null`; } if ($delta eq '') { # No change in file print "$progname: no changes in $file since last patcil.\n"; next; # Skip file } } if ($revs == 1) { $mess = &getlog($file); next file if $mess eq 'nope'; &cil_cil($mess, $revbranch); } else { $mess = &getlog($file); next file if $mess eq 'nope'; &cil_col($mess, $revbranch); } } } # Used for the first revisions on a branch sub cil_cil { local($mess) = shift(@_); local($rev) = shift(@_); if (&feed($mess, 'ci', @sw, "-l$rev", @files)) { print "$progname: unlocking and trying again...\n"; system 'rcs', '-u', @files; &feed($mess, 'ci', @sw, "-l$rev", @files) unless $?; } } # Run a ci -l on the file. If this fails, try to lock the file first. # If this fails again, try again with a separate checkout. sub cil_col { local($mess) = shift(@_); local($rev) = shift(@_); if (&feed($mess, 'ci', @sw, "-l$rev", @files)) { print "$progname: locking and trying again...\n"; if ($rev =~ /\d+\.\d+\.\d+/) { system 'rcs', "-l$rev", @files; # Lock branch } else { system 'rcs', '-l', @files; # Lock trunck } if (&feed($mess, 'ci', @sw, "-l$rev", @files)) { print "$progname: trying again with separate checkout...\n"; if (&feed($mess, 'ci', @sw, "-r$rev", @files)) { system 'rcs', "-u$rev", @files unless $?; system 'co', "-l$rev", @files unless $?; } else { print "$progname: sorry, giving up...\n"; } } } } sub feed { local($mess) = shift(@_); open(FORK,"|-") || exec @_; print FORK $mess; close FORK; $?; } sub getlog { local($file) = @_; local($mess) = ''; local($prefix) = "patch$bnum: "; local($prompt) = $comment; local($len); $prompt = '>> ' unless $prompt; $prefix = '' if $is_first; print "Type log message for $file (finish with ., CR for previous):\n"; try: for (;;) { line: for (print "$prompt$prefix";;print "$prompt$prefix") { if ($always) { print "\n"; $line = ''; } else { $line = ; } if ($line =~ /^\.?$/) { if ($mess) { last line; } else { $line = 'p'; } } if ($line =~ /^[h?]$/) { print " CR or . Terminate log message. ! Start command in a subshell. D Print out diff listing since last patch. N Give name of the current file. E Call editor for log message with a diff listing. V Call editor for file with a context diff added to HISTORY. X Extract HISTORY and append it to current log message. a Always use this message. d Print out diff listing since last patcil. f Forget message I have so far. h or ? This help message. l List what I have so far. n Forget this file; go to next file if any. p Append previous message. r Print out the rlog for this file. e Call editor for log message. v Call editor for file. x Toggle patch# prefix. "; next line; } if ($line =~ /^!(.*)$/) { $_ = $1; $_ = ($ENV{'SHELL'} || "/bin/sh") if $1 eq ''; system $_; next line; } if ($line =~ /^E$/) { $mess .= "\n" . `rcsdiff -c -rlastpat $files`; } if ($line =~ /^e$/) { $mess = &edit($mess); next line; } if ($line =~ /^V$/) { ######## FIXME ######### # Will do something like: # &add_history($file, `rcsdiff -c -rlastpat $files`); # HISTORY # Extract or add this. Create it if not already there. # $Log # $EndLog <<-- stops HISTORY and COPYRIGHT lookup ######################## print "HISTORY processing not implemented yet.\n"; print "(You have to use 'E' to get old 'V' processing).\n"; next line; } if ($line =~ /^v$/) { system $EDITOR, $file; next line; } if ($line =~ /^r$/) { system "rlog $files | $PAGER"; next line; } if ($line =~ /^D$/) { if ($revs == 0) { print "Sorry. There is no revision for this file yet.\n"; } else { system "rcsdiff -c -rlastpat $files | $PAGER"; } next line; } if ($line =~ /^d$/) { if ($revs == 0) { print "Sorry. There is no revision for this file yet.\n"; } elsif ($revs == 1) { system "rcsdiff -c -r$baserev $files | $PAGER"; } else { system "rcsdiff -c -r$revbranch $files | $PAGER"; } next line; } if ($line =~ /^N$/) { print "Typing log message for $file.\n"; next line; } if ($line =~ /^f$/) { $mess = ''; next line; } if ($line =~ /^a$/) { $always++ if $mess || $prevmess; next line; } if ($line =~ /^n$/) { $mess = 'nope'; last line; } if ($line =~ /^l$/) { foreach $line (split(/\n/,$mess)) { print $prompt,$line,"\n"; } next line; } if ($line =~ /^p$/) { $mess .= $prevmess; foreach $line (split(/\n/,$prevmess)) { print $prompt,$line,"\n"; } next line; } if ($line =~ /^X$/) { foreach $line (split(/\n/, &xtract_history($file))) { $mess .= $prompt . $line . "\n"; print $prompt,$line,"\n"; } next line; } if ($line =~ /^x$/) { $prefix = $prefix ? '' : "patch$bnum: "; next line; } $mess .= $prefix . $line; $len = length($comment . $prefix . $line); if ($len > 80) { print "(Warning: last line longer than 80 chars)\n"; } elsif ($len > 72) { # In case of vi with line numbers print "(Warning: last line longer than 72 chars)\n"; } if (length($mess) > 511) { print "You'll have to trim to less than 512 chars...\n"; sleep(3); $mess = &edit($mess); } } $mess = $prevmess if $mess eq ''; if (!$mess) { print "No previous message, try again.\n"; next try; } if (length($mess) > 511) { print "Sorry, that's too long; RCS won't take it. Try again...\n"; next try; } last try; } unless ($is_first) { print LOGS $mess unless $mess eq 'nope'; print MODS "$file\n"; } $prevmess = $mess unless $mess eq 'nope'; $mess; # Returned value } sub edit { local($text) = join("\n", @_); open(TMP,">/tmp/cil$$") || die "Can't create /tmp/cil$$"; print TMP $text; close TMP; system $EDITOR, "/tmp/cil$$"; $text = `cat /tmp/cil$$`; unlink "/tmp/cil$$"; $text; } sub usage { print STDERR <>patcil $grep -v '^;#' ../pl/package.pl >>patcil $grep -v '^;#' ../pl/rcsargs.pl >>patcil $grep -v '^;#' ../pl/comment.pl >>patcil $grep -v '^;#' ../pl/editor.pl >>patcil $grep -v '^;#' ../pl/tilde.pl >>patcil $grep -v '^;#' ../pl/profile.pl >>patcil chmod +x patcil $eunicefix patcil dist_3.5-36.001/pat/patbase.SH0000755000175000017500000000621511344533734016062 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patbase (with variable substitutions)" cat >patbase < # # $Log: patbase.SH,v $ # Revision 3.0.1.3 1994/01/24 14:29:24 ram # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.2 1993/08/24 12:15:58 ram # patch3: random cleanup # # Revision 3.0.1.1 1993/08/19 06:42:32 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:38 ram # Baseline for dist 3.0 netwide release. # \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; !GROK!THIS! cat >>patbase <<'!NO!SUBS!' $progname = &profile; # My name require 'getopts.pl'; &usage unless $#ARGV >= 0; &usage unless &Getopts("ahV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } &readpackage; $RCSEXT = ',v' unless $RCSEXT; $TOPDIR = ''; # We are at the top-level directory if ($opt_a) { open(MANI,"MANIFEST.new") || die "No MANIFEST.new found.\n"; @ARGV = (); while () { chop; s|^\./||; next if m|^patchlevel.h|; # Special file ($_) = split(' '); next if -d; push(@ARGV,$_); } close MANI; } foreach $file (@ARGV) { $files = &rcsargs($file); @files = split(' ',$files); $revs=0; $rlog = `rlog -r$baserev -r$revbranch $files 2>&1`; ($revs) = ($rlog =~ /selected revisions: (\d+)/); if (!$revs) { print "$progname: $file has never been checked in--checking in...\n"; system 'perl', '-S', 'patcil', $file; } elsif ($revs == 1) { print "Last revision for $file is $baserev.\n"; system 'rcs', "-Nlastpat:$baserev", @files; } else { ($lastrev) = ($rlog =~ /revision $revbranch\.(\d+)/); print "Last revision for $file is $revbranch.$lastrev.\n"; system 'rcs', "-Nlastpat:$revbranch.$lastrev", @files; } } sub usage { print STDERR "Usage: $progname [-ahV] [filelist]\n"; print STDERR " -a : all the files in MANIFEST.new\n"; print STDERR " -h : print this message and exit\n"; print STDERR " -V : print version number and exit\n"; exit 1; } !NO!SUBS! $grep -v '^;#' ../pl/package.pl >>patbase $grep -v '^;#' ../pl/rcsargs.pl >>patbase $grep -v '^;#' ../pl/comment.pl >>patbase $grep -v '^;#' ../pl/tilde.pl >>patbase $grep -v '^;#' ../pl/profile.pl >>patbase chmod +x patbase $eunicefix patbase dist_3.5-36.001/pat/pat.man0000644000175000017500000004042210473666773015477 0ustar srivastasrivasta.rn '' }` ''' $Id: pat.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: pat.man,v $ ''' Revision 3.0.1.7 1997/02/28 16:32:45 ram ''' patch61: documents contents of the message sent by patnotify ''' ''' Revision 3.0.1.6 1995/09/25 09:20:41 ram ''' patch59: new -i option for patsend to add extra instructions ''' ''' Revision 3.0.1.5 1995/05/12 12:25:28 ram ''' patch54: updated my e-mail address ''' ''' Revision 3.0.1.4 1994/10/29 16:38:31 ram ''' patch36: documents new patlog script and the files it uses ''' patch36: the RCS layer section has been extended slightly ''' ''' Revision 3.0.1.3 1993/08/27 14:40:19 ram ''' patch7: random cleanup ''' ''' Revision 3.0.1.2 1993/08/25 14:05:02 ram ''' patch6: new -q option for patsend and patnotify ''' ''' Revision 3.0.1.1 1993/08/24 12:15:42 ram ''' patch3: added patnotify and patsnap ''' patch3: patcol has a new -S option ''' patch3: the users file built by mailagent is now listed under FILES ''' ''' Revision 3.0 1993/08/18 12:10:37 ram ''' Baseline for dist 3.0 netwide release. ''' .de Sh .br .ne 5 .PP \fB\\$1\fR .PP .. .de Sp .if t .sp .5v .if n .sp .. ''' ''' Set up \*(-- to give an unbreakable dash; ''' string Tr holds user defined translation string. ''' .ie n \{\ .tr \(*W-\*(Tr .ds -- \(*W- .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch .ds L" "" .ds R" "" .ds L' ' .ds R' ' 'br\} .el\{\ .ds -- \(em\| .tr \*(Tr .ds L" `` .ds R" '' .ds L' ` .ds R' ' 'br\} .TH PAT 1 ram .SH NAME pat \- patch generator tools .SH SYNOPSIS .B pat [ .B \-ahmnV ] [ .I filelist ] .br .B patcil [ .B \-abfhnpqsV ] [ .I filelist ] .br .B patdiff [ .B \-ahnV ] [ .I filelist ] .br .B patbase [ .B \-ahV ] [ .I filelist ] .br .B patlog [ .B \-hnruV ] .br .B patmake [ .B \-hV ] .br .B patsend [ .B \-hiquV ] [ .I patchlist ] [ .I recipients ] .br .B patnotify [ .B \-hquV ] [ .I recipients ] .br .B patpost [ .B \-hrV ] .I patchlist .I newsgroups .br .B patftp [ .B \-hV ] [ .I patchlist ] .br .B patname [ .B \-ahnmV ] .B \-v .I version [ .I filelist ] .br .B patsnap [ .B \-ahV ] [ .B \-o .I snapshot ] [ .I filelist ] .br .B patcol [ .B \-achnmsCV ] [ .B \-d .I directory ] [ .B \-f .I mani ] [ .B \-S .I snap ] [ .I filelist ] .br .B patclean [ .B \-ahnmV ] [ .I filelist ] .br .B patindex .SH DESCRIPTION .I Pat and its associated programs generate patches for any package that has been stored under RCS. These programs hide many of the details of RCS that get in your way when constructing and maintaining a package. All you need to do to create a new patch is to edit your files, run pat, and furnish some descriptions to RCS and in the generated patch file. Details such as how to initialize a new RCS file, what the comment string should be, how create a new branch, how to deal with subdirectories, how to do diffs and how to organize the patch file are handled automatically. .PP Before using any of the pat programs you must initialize your package by running packinit in the top-level directory of your package. This produces a .package file that all of the dist programs make use of. .PP In any of the programs that want a filelist, if you specify .B \-a instead, all files in MANIFEST.new will be processed. In any of the programs that want a patchlist, a null patchlist means the current patch. You may use hyphens, commas and spaces to delimit patch numbers. If the right side of a hyphen is the null string, the current patchlevel is assumed as the maximum value. All the programs invoked with \fB\-h\fR will print a small usage message with the meaning of each available options. The \fB\-V\fR option gives the current version number. .PP Pat itself is a wrapper program that calls patcil, patdiff, and patmake. Usually you can just invoke pat and ignore all the others. Pat will update the MANIFEST file, if necessary (it will be an exact copy of the MANIFEST.new file, provided that a MANIFEST already existed), eventually calling patcil on it. .PP If you specify .B \-n instead of a filelist, pat will find all files that are newer than patchlevel.h, put you into an editor to trim down the list, then use that file list. If every file of the list is removed, \fIpat\fR will be aborted. .PP .I Patcil is used to do a ci -l on any listed files. (It is assumed that you always want to keep your files checked out.) In addition to the .B \-a switch, there is a .B \-b switch which does a quick checkin of a set of files. Instead of calling rcs on each file, it calls rcs on the whole list of files. This is useful for checking in a trunk revision. When you are checking in a new trunk revision you might also want to use the .B \-s flag which will strip out old RCS Log entries from the previous revision so that you can start over fresh. You probably should also use a .B \-f which is passed through to the ci to force unchanged files to be checked in. To check in a new trunk revision, I say .nf patcil -s -f -a .fi .PP Patcil will ask for the log entry instead of letting ci do it, and has a little prompter built in that lets you manipulate the message in various ways. Type h for a listing of what you can do. One of the nicest things is that you can pop up into an editor, optionally with a diff listing of the changes since the last patch, in case you've forgotten what you changed. If you type a CR as the first thing, it includes the previous log message. Exit the prompter with a CR. .PP There are two different ways to use patcil. You can either call patcil yourself, or let pat call it for you. It doesn't matter how many times you call patcil before running pat, since patdiff knows what the last patch base is to compare with. Patcil can be called in any of your directories; the other programs must be called in your top-level directory (or in bugs, when meaningful). .PP When you are creating a new file at a given patchlevel, you must patcil it with the .B \-p option. Otherwise, it will simply be checked-in as a new trunk revision. The name of the file will be added to the MANIFEST.new if it does not already appear in it. If the name is found along with a description, that description will be passed through to rcs to properly initialize the RCS file. .PP .I Patbase can be used to reset the patch base to the current version when you've scrapped the previous patch sequence and are making a new distribution kit. What it really does is an rcs -Nlastpat:REV, where REV is the current revision. If patdiff blows up and you want to set the patch base back to some previous version, you have to call rcs -Nlastpat:REV yourself. .PP .I Patdiff actually does the diffs that go into the patch, comparing whatever version -Nlastpat points to with the most recently checked in version. It then updates -Nlastpat to point to the current version. It leaves the diff sitting in the bugs subdirectory for patmake to pick up. It can either use rcsdiff, or a diff command of your choice specified when you run packinit, in case your diff is better than rcsdiff. .PP .I Patlog is invoked by \fIpatmake\fR usually, to update the \fIChangeLog\fR file (or whatever name that file has been given when you ran \fIpackinit\fR). It will gather log messages and launch an editor for you to make the necessary updates. If you have configured your package to also include RCS logs in the \fIChangeLog\fR, another editor session will be launched for those too. Finally, a final log is built as a candidate entry for \fIChangeLog\fR, which you may also modify as you wish. .PP When you don't have configured a \fIChangeLog\fR file, \fIpatlog\fR will only gather the information it needs to pass on to \fIpatmake\fR and will exit. If you wish to call it yourself, you must do that after a least one sucessfull \fIpatdiff\fR run. I recommend using the \fB\-n\fR option the first time, and then use the \fB\-u\fR option along with \fB\-n\fR on subsequent runs to recreate files only when needed. The \fB\-r\fR option (which supersedes \fB\-u\fR) prevents \fIpatlog\fR from recreating an existing file, even if it is out of date. .PP .I Patlog will call \fIpatcil\fR and \fIpatdiff\fR on your \fIChangeLog\fR file (after having stuffed the candidate log entry you edited at the top of the file), unless prevented to do so by the \fB\-n\fR option. This means the issued patch will update \fIChangeLog\fR with current patch information, as you would expect it. .PP .I Patmake combines all the pieces of the patch into one file and invokes an editor so you can add the subject and description. It throws all your log messages in as Subjects and as Description, under the assumption that it's easier to delete what you don't want than to remember everything you did. You'll also want to expand each item in the Description so they don't just repeat the Subject lines. If you have a \fIChangeLog\fR file, this must have been done already, or your \fIChangeLog\fR will not accurately represent what is described in the patch, given that it has already been updated when \fIpatmake\fR puts together all the pieces (see the note about \fIpatlog\fR above). .PP Big patches will be split in order to keep size of each patch to a reasonable size. This is handled automatically, so you don't have to bother with it. The priority of each patch is merely intuited by \fIpatmake\fR, given the assumption that small changes have a great priority. .PP Patsend, patpost and patftp are used to distribute your patches to the world. .I Patsend mails a set of patches to a set of recipients. The \fB\-u\fR switch adds all the currently registered users who have asked for patches to be mailed to them, as well as the recipients specified while running \fIpackinit\fR. The \fB\-i\fR switch includes information with the patch about how the user may deregister themselves so they do not receive future patches automatically; this is also the default when the \fB\-u\fR switch is used. .I Patpost posts a set of patches to a set of newsgroups. .I Patftp merely copies the patch into your public ftp directory. .PP .I Patnotify simply notifies users that a new patch has been released so that they can retrieve it by themselves from an archive site or via e-mail if they are interested. The \fB\-u\fR switch can be used to include all the currently registered users who have asked for such a notification. The message includes the patch priority and description, as well as instructions on how to automatically request the patch (which will work only if you have \fImailagent\fR installed). .PP Both \fIpatsend\fR and \fIpatnotify\fR let you edit the address list before actually sending anything, unless you add the \fB\-q\fR option. .PP .I Patname can be used to tag a set of files with a symbolic name (specified with \fB\-v\fR). This will set the name for the most recent revision of each file. .PP .I Patsnap will get a snapshot of your release by creating a SNAPSHOT file (name can be changed via \fB\-o\fR) listing the file names and the latest RCS revision number for that file. Such snapshots can be used to identify the release at some random patchlevel and then later be able to retrieve it by feeding the snapshot file to \fIpatcol\fR. .PP .I Patcol will check out a locked version of a file, eventually in an alternate directory (specified with \fB\-d\fR, thus mirroring the distribution tree). All the files which have no RCS counterpart (e.g. patchlevel.h) will be simply copied by patcol. This is used by makedist to fake the distribution before making the kits. By default, patcol will not do the copyright expansion processing, but clients like \fImakedist\fR force it by using its \fB\-C\fR option. Alternatively, you may force copying of the checked-out version into a directory by using the \fB\-c\fR switch in conjunction with \fB\-d\fR (or that former switch is simply ignored). .PP .I Patcol can also take its file list from a SNAPSHOT file via the \fB\-S\fR switch, in which case it will check out the files using the RCS version specified by the snapshot file, such as one created by \fIpatsnap\fR. You may instead specify \fB-a\fR, \fB\-m\fR or \fB\-n\fR to respectively use all the files in MANIFEST.new, all the modified files (the one which have been \fIpatcil\fRed), or all the files newer than \fIpatchlevel.h\fR. .PP .I Patclean will remove the working files after having checked in all the changes. You may restores your working files by using patcol. .PP .I Patindex may be used from the top level directory or within the \fIbugs\fR directory. It will list all the patches and their \fISubject:\fR lines. This program knows about compressed patches and will decompress them while producing the listing. ''' ''' R C S L a y e r ''' .SH RCS LAYER This section describes the RCS layer, in case something in the tools breaks, so that you may fix your RCS files and restart the operation. .PP All the patch tools get the main RCS trunk revision number out of your \&\fI.package\fR files, say it's 2.5. Then, at the time you ran \fIpackinit\fR, you have chosen a branch for patches, usually number 1, which means all your modifications will be stored on the 2.5.1 RCS branch. The tools will create the branch for you when the time comes. .PP Each last released revision is tagged with an RCS \fIlastpat\fR symbol. When the patch is built by \fIpatdiff\fR, the lattest version on the 2.5.1 branch is compared with the one tagged as \fIlastpat\fR. This is why you may safely issue more than one \fIpatcil\fR beffore issuing the patch and still have it all worked out. Of course \fIpatdiff\fR will move the \fIlastpat\fR tag to the lattest branch revision after processing a given file. .PP All the log messages and the modified files are kept in your \fIbugs\fR directory, in hidden files (name starting with a dot). Those logs will be collected when the patch is issued and the modified files are used by \&\fIpat\fR's \fB\-m\fR switch. .PP .I Patdiff collects its patch hunks under the \fIbugs\fR directory, in files terminating with a \fI.nn\fR extension, where \fInn\fR represents the current patch level + 1. (Which is going to be the next patchlevel when the patch will be made by \fIpatmake\fR, unless it is too big to fit in one file). .PP .I Patlog prepares a set of files for \fIpatmake\fR: the \fI.clog\fR file collects the information that will go under the Description: section within the patch, and \fI.xlog\fR ones collect the \fIChangeLog\fR candidate entry. Finally, \fI.rlog\fR files store the RCS information that is to be included in the \fIChangeLog\fR, if requested. Note that the topmost three lines are garbage and are ignored by all the tools handling those files. .PP In order to start up a new baseline (i.e. to change the RCS trunk revision number), you need to rerun \fIpackinit\fR and change that number. Then issue a new \fIpatcil\fR, probably with the \fB\-s\fR, \fB\-a\fR and \fB\-f\fR options... .SH FILES .PD 0 .TP 15 bugs/*.[0-9]+ Diffs for each file, gathered by \fIpatmake\fR to create a patch .TP bugs/patch* Issued patches (can be compressed with \fIcompress\fR only) .TP bugs/.clog[0-9]+ Description to be filled into the patch (or the first part if the patch is split into several parts). .TP bugs/.logs[0-9]+ Log messages for that patch .TP bugs/.mods[0-9]+ Files modified in that patch (checked in with \fIpatcil\fR) .TP bugs/.pri[0-9]+ The priority of the next patch, computed by \fIpatlog\fR for \fIpatmake\fR's perusal. .TP bugs/.rlog[0-9]+ The RCS logs computed by \fIpatlog\fR. .TP bugs/.subj[0-9]+ The Subject: lines for the next patch, computed by \fIpatlog\fR for \fIpatmake\fR's perusal. .TP bugs/.xlog[0-9]+ The candidate entry for \fIChangeLog\fR. .TP users File filled in by \fImailagent\fR's "@SH package" command, normally issued by Configure, recording some of the users who kindly registered themselves. .PD .SH ENVIRONMENT .PD 0 .TP 15 PAGER Which pager to use in patcil (overrides default) .TP EDITOR What editor should be used (overrides default) .TP VISUAL Same role as EDITOR but this one is checked first .PD .SH SEE ALSO makedist(1), metaconfig(1). .SH BUGS Most of this should be built into RCS. .SH AUTHORS Larry Wall (version 2.0). .br Raphael Manfredi . .rn }` '' dist_3.5-36.001/pat/README0000644000175000017500000001175310473316164015065 0ustar srivastasrivastaThis is the root directory for pat tools. This directory contains an automatic patch generator. You must have RCS to use this. You must also have run packinit in the top level directory of your package to create a .package file. When you've modified a file in your package, the pat program is used to control the whole process. The other programs can be called by hand, but usually needn't be. Run pat from the top level directory of your package. The pat, patcil, patdiff, and patbase programs take a list of filenames as arguments. Alternately, a -a means all files listed in MANIFEST. Patcil will create an RCS directory if necessary. However, it may not check in things which require special initializaton properly. For example, if you want to check in a shell script, you'd better make your RCS directory yourself and then say rcs -i -c'# ' blurfl.xsh before running pat or patcil. Otherwise the RCS log may not be commented properly. Unless of course you are using a standard extension (like .c for a C file) or have placed the proper comments in front of the $Log marker within the file itself--patcil will then correctly guess the type of comment required. Patdiff will create a bugs directory in your top level directory, and will want to find a patchlevel.h file in that same directory. Everything is done from that top level directory--don't put any patchlevel.h or bugs directories in your subdirectories. Each subdirectory has its own RCS directory though. Patpost, patsend and patftp may be used to post to Usenet, mail to someone, or copy patches to your ftp directory. They take a destination and a list of patches to process. Those pat tools are an hopefully enhanced version of the tools that came with Larry Wall's dist 2.0. There are however a few new scripts: - patclean, which checks in the mods and removes the working files. - patcol, which restores the files removed by a patclean. - patname, which sets a symbolic version number. Here is the way I am using the pat tools... First, I set up a MANIFEST.new file. If you are converting an existing distribution to use dist, the manifake script will convert a MANIFEST into a MANIFEST.new (removing the possible archive number column). Then I run packinit to modify the version number and set up things correctly. The package is then ready to be placed under pat control. I make sure the file patchlevel.h is correctly set and I run: patcil -f -a -s touch patchlevel.h find . -name "*~" -exec /bin/rm -f {} \; -print There is a prototypical patchlevel.h file in this directory, so you might want to have a look at it. [If you are planning on using the mailagent to send the patches (and sort your mail -- that's its primary goal now), the you must make sure the patchelevel.h file is locatated in the root directory of your package. The mailagent program is available separately, and was posted on the comp.sources.misc newsgroup] Now everything is ready. The distribution is frozen, the bugs directory has been created. I issue a makedist -v to create the distribution kits. Eventually I set up the mailagent so that people can request for the distribution automatically. If I want to create a directory containing the lattest sources (to be able to `kit' them to someone using the kit program -- posted to comp.sources.unix), I use: makedist -c -@ for instance, for dist 2.9 at PL26 makedist -c dist-2.9@26 which I can then send to people directly with kit (which is NOT part of this release). As I receive patches or find some bugs, I edit the files and make the modifications. When I want to issue an official patch, I run: pat -n and one or more patches are issued. You can compress the patches in the bugs subdirectory, since the mailpatch program knows about that. Also patindex will correctly uncompress them. When I need to clean up the distribution directory, I use: patclean -a which checks in every changes and removes the working files. The whole set of working files can then be restored by: patcol -a Sometimes, I made a couple of modification and I don't want to issue a patch right now. I then run: patcil -a which checks in the changes. You can run this as many times as you want, because patcil will skip unchanged file and remembers the last time you issued a patch. If you are still using RCS 4.3, be sure you use makedist and not your own shell archiver, as the $Locker symbol has an annoying expansion which makes patch to fail when applyed. I'm not sure this was correctly fixed with RCS 5.5 as I am not using it yet for various reasons. In any case, if you are using the copyright expansion feature (i.e. the stuffing of the COPYRIGHT token surrounded by '@' -- can't do it here or it will get expanded...), then you must use makedist to make sure the copyright is properly written in all your files. Distributing files with an un-expanded COPYRIGHT token in them would be a disaster, since the patching system will also expand them before building a patch and some of your hunks may not apply correctly. dist_3.5-36.001/pat/patlog.SH0000755000175000017500000002426711344533734015740 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patlog (with variable substitutions)" cat >patlog <>patlog <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless &Getopts("hnruV"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } &readpackage; if (-f 'patchlevel.h') { open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n"; while () { if (/^#define\s+PATCHLEVEL\s+(\d+)/) { $last = $1; $patchline = $.; # Record PATCHLEVEL line } } die "$progname: malformed patchlevel.h file.\n" if $last eq ''; $bnum = $last + 1; } else { $patchline = 1; $bnum = 1; $last = ''; } chdir 'bugs' if -d 'bugs'; die "$progname: patch #$bnum already exists.\n" if -f "patch$bnum"; @patlist=<*.$bnum>; die "$progname: no diff files for patch #$bnum.\n" if $patlist[0] =~ /^\*/ || $patlist[0] eq ''; # Set up a proper editor, for later perusal $editor = $ENV{'VISUAL'}; $editor = $ENV{'EDITOR'} unless $editor; $editor = $defeditor unless $editor; $editor = 'vi' unless $editor; # The following used to be done in patmake. Only we do not really need to # compute the subject lines for the generated patch here, we do it nonetheless # to avoid code duplication in patmake. if (-s ".logs$bnum") { $logs = ''; open(LOGS,".logs$bnum"); while () { unless ($logseen{$_}) { $logs .= $_; $logseen{$_}++; $logsnum++; # One more log } } close LOGS; $subj = $logs; $logs =~ s/^patch\d+:\s*/\t/gm; $logs =~ s/\n/\n\n/gm; $subj =~ s/^patch\d+:\s*/Subject: /gm; } else { $subj = "Subject: \n"; } # Try to guess the priority of the patch if (-s ".mods$bnum") { open(MODS, ".mods$bnum"); while () { chop; unless ($fileseen{$_}) { $fileseen{$_}++; $modsnum++; # One more modified file } } close MODS; } $modsnum++ unless $modsnum; # Avoid divisions by zero $mean = $logsnum / $modsnum; if ($mean > 0.7 && $mean < 1.3) { $priority = "MEDIUM"; } elsif ($mean <= 0.7) { $priority = "HIGH"; # Small changes } else { $priority = "LOW"; # Big changes } # Save priority for patmake open(PRIORITY, ">.pri$bnum") || die "$progname: can't create .pri$bnum: $!\n"; print PRIORITY $priority, "\n"; close PRIORITY; # Save subject lines for patmake open(SUBJECTS, ">.subj$bnum") || die "$progname: can't create .subj$bnum: $!\n"; print SUBJECTS $subj; close SUBJECTS; # # Generate description file, then edit it so that the user may fixup things. # unless (($opt_r && -f ".clog$bnum") || ($opt_u && &uptodate(".clog$bnum"))) { open(CHANGES, ">.clog$bnum") || die "$progname: can't create .clog$bnum: $!\n"; print CHANGES <.rlog$bnum") || die "$progname: can't create .rlog$bnum: $!\n"; print RCS <.xlog$bnum") || die "$progname: can't create .xlog$bnum: $!\n"; print LOG <\n\n"; print LOG ". Description:\n\n"; &addlog(".clog$bnum"); if ($changercs) { print LOG ". Files changed:\n\n"; &addlog(".rlog$bnum"); } close LOG; } system $editor, ".xlog$bnum"; exit(0) if $opt_n; # # Changelog file update, checking in and diff computation. # print "$progname: updating $changelog...\n"; chdir('..') || die "$progname: can't go back to ..: $!\n"; if (-f $changelog) { rename($changelog, "$changelog.bak") || die "$progname: can't rename $changelog into $changelog.bak: $!\n"; } open(LOG, ">$changelog") || die "$progname: can't create $changelog: $!\n"; &addlog("bugs/.xlog$bnum"); if (-f "$changelog.bak") { open(OLOG, "$changelog.bak") || die "$progname: can't open $changelog.bak: $!\n"; print LOG while ; close OLOG; } close LOG; print "$progname: checking in $changelog and computing diff...\n"; # It is safe to run a patcil and a patdiff now, since the Changelog file has # been updated anyway: any log done while checking that file in will not # appear in the patch log nor the Changelog. system 'perl', '-S', 'patcil', '-p', $changelog; system 'perl', '-S', 'patdiff', $changelog; exit 0; # All done. # Returns true if .clog and .rlog (it it exists) are newer than .xlog. sub newertmp { return 1 unless -f ".xlog$bnum"; # To force regeneration return 1 if &newer(".clog$bnum", ".xlog$bnum") || (!$changercs || &newer(".rlog$bnum", ".xlog$bnum")); 0; } # Returns true if $file is newer than the reference file $ref. sub newer { local($file, $ref) = @_; (stat($file))[9] >= (stat($ref))[9]; } # Retursn true if $file is up-to-date with respect to .logs and .mods. sub uptodate { local($file) = @_; return 0 unless -f $file; # Cannot be up-to-date if missing &newer($file, ".logs$bnum") && &newer($file, ".mods$bnum"); } # Add file to the LOG descriptor, skipping the first three lines of that file. sub addlog { local($file) = @_; open(FILE, $file) || die "$progname: can't reopen $file: $!\n"; $_ = ; $_ = ; $_ = ; print LOG while ; close FILE; } # Build RCS logs, for each file listed in the %fileseen array, into %rcslog. # Common RCS log messages are grouped under the same entry. sub buildlogs { local($log); local(@files); local($first); local(%invertedlog); foreach $file (keys %fileseen) { $log = &rcslog($file); next if $log eq ''; $invertedlog{$log} .= "$file "; } foreach $log (keys %invertedlog) { @files = split(' ', $invertedlog{$log}); $first = (sort @files)[0]; $rcslog{$first} = join(', ', @files) . ': ' . $log; } } # Grab log for a given file by parsing its $Log section. Only comments # relevant to the patch are kept. This relies on the presence of the patchxx: # leading string in front of each comment. # If not sufficient (because people don't use patchxx prefixes), then we'll # need a more sophisticated algorithm parsing revisions lines to see where we # left of at the last patch. sub rcslog { local($file) = @_; open(FILE, "../$file") || warn "$me: can't open $file: $!\n"; local($_); local($comment, $len); local($pcomment) = "patch$bnum:"; local($plen) = length($pcomment); local($c); local($lastnl) = 1; local($kept); # Relevant part of the RCS comment which is kept file: while () { if (/^(.*)\$Log[:\$]/) { $comment = $1; $comment =~ s/\s+$//; # Newer RCS chop spaces on emtpy lines $len = length($comment); while () { $c = substr($_, 0, $len); last file unless $c eq $comment; $_ = substr($_, $len, 9_999); if ($lastnl) { last file unless /^\s*Revision\s+\d/; $lastnl = 0; } elsif (/^\s*$/) { $lastnl = 1; } else { s/^\s*//; # Older RCS will have space here $c = substr($_, 0, $plen); last file unless $c eq $pcomment; # Comment for that patch is kept after space cleanup $_ = substr($_, $plen, 9_999); s/^\s*//; s/\s*$//; $_ .= '.' unless /\.$/; s/^(.)/\U$1/; # Ensure upper-cased to start sentence s/^/ / if $kept; $kept .= $_; # Will be reformatted later on } } } } close FILE; $kept; } # Format line to fit in 80 columns (70 + 8 for the added leading tabs). # Rudimentary parsing to break lines after a , or a space. sub format { local($_) = @_; local($tmp); local($msg); while (length($_) > 70) { $tmp = substr($_, 0, 70); $tmp =~ s/^(.*)([,\s]).*/$1/; $msg .= "\t$tmp" . ($2 eq ',' ? ',' : '') . "\n"; $_ = substr($_, length($tmp), 9_999); $_ =~ s/^\s+//; } $msg .= "\t$_\n"; $msg; } sub usage { print STDERR <>patlog $grep -v '^;#' ../pl/tilde.pl >>patlog $grep -v '^;#' ../pl/profile.pl >>patlog chmod +x patlog $eunicefix patlog dist_3.5-36.001/pat/patsnap.SH0000755000175000017500000000621511344533734016111 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting pat/patsnap (with variable substitutions)" cat >patsnap <>patsnap <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless $#ARGV >= 0; &usage unless &Getopts("aho:V"); $SNAPSHOT = 'SNAPSHOT'; # Default snapshot file name if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } &readpackage; $RCSEXT = ',v' unless $RCSEXT; $TOPDIR = ''; # We are at the top-level directory $SNAPSHOT = $opt_o if $opt_o; if ($opt_a) { open(MANI,"MANIFEST.new") || die "$progname: can't read MANIFEST.new: $!\n"; @ARGV = (); while () { chop; s|^\./||; next if m|^patchlevel.h|; # Special file ($_) = split(' '); next if -d; push(@ARGV,$_); } close MANI; } open(SNAPSHOT, ">$SNAPSHOT") || die "$progname: can't create $SNAPSHOT: $!\n"; foreach $file (@ARGV) { $files = &rcsargs($file); @files = split(' ',$files); $revs=0; $rlog = `rlog -r$baserev -r$revbranch $files 2>&1`; ($revs) = ($rlog =~ /selected revisions: (\d+)/); if (!$revs) { print "$progname: $file has never been checked in--skipping\n"; next; } elsif ($revs == 1) { print "$progname: last revision for $file is $baserev.\n"; print SNAPSHOT "$file\t$baserev\n"; } else { ($lastrev) = ($rlog =~ /revision $revbranch\.(\d+)/); print "$progname: last revision for $file is $revbranch.$lastrev.\n"; print SNAPSHOT "$file\t$revbranch.$lastrev\n"; } } close SNAPSHOT; sub usage { print STDERR <>patsnap $grep -v '^;#' ../pl/rcsargs.pl >>patsnap $grep -v '^;#' ../pl/comment.pl >>patsnap $grep -v '^;#' ../pl/tilde.pl >>patsnap $grep -v '^;#' ../pl/profile.pl >>patsnap chmod +x patsnap $eunicefix patsnap dist_3.5-36.001/MANIFEST0000644000175000017500000012331712630137447014554 0ustar srivastasrivastaArtistic The Artistic Licence ChangeLog Where changes are recorded. Configure Portability tool Credits Traditional "thank you" list Jmakefile Description of the main Makefile Known_bugs A list of known bugs MANIFEST This list of files Makefile.SH A makefile to run subsidiary makefiles README Basic instructions Wishlist Features I would like to add bin/ Some binary tools bin/Jmakefile Generic makefile description for bin bin/Makefile.SH Jmake-generated configured makefile bin/manicheck.SH Check manifest accuracy bin/manicheck.man Manual page for manicheck bin/manilist.SH Produces reports based on manifest bin/manilist.man Manual page for manilist bin/packinit.SH Creates a .package file describing your package bin/packinit.man Manual page for packinit bin/perload Build dynamically loaded perl scripts bin/svn-revision Updates the top "revision.h" file if needed dist.man Introduction to dist install.SH Installation script with a BSD-like syntax jmake/ Where makefile generator is stored jmake/Jmakefile High level makefile description for jmake jmake/Makefile.SH Generated makefile for jmake jmake/NOTES Quick description of the internal syntax jmake/README Welcome to jmake jmake/bindex.SH Script to build an index of rules jmake/files/ Where rules for jmake are held jmake/files/Jmake.rules Generic rules for jmake jmake/files/Jmake.tmpl Template used by jmake to produce Makefile.SH jmake/fixcpp.SH Wrapper around cpp to fix buggy backslash hanling jmake/jmake.SH The makefile generator jmake/jmake.man Manual page for jmake jmake/jmkmf.SH Wrapper for jmake jmake/jmkmf.man Manual page for jmkmf kit/ Where distribution tools are stored kit/Jmakefile Jmake's description of kit builder's makefile kit/Makefile.SH Builds kit builder kit/README Instructions on makedist kit/kitpost.SH Post shell archive kits kit/kitpost.man Manual page for kitpost kit/kitsend.SH Mail shell archive kits kit/kitsend.man Manual page for kitsend kit/makeSH Does most of turning a script into an SH file kit/makeSH.man Manual page for same kit/makedist.SH Makes a set of kits in the current directory kit/makedist.man Manual page for same kit/manifake.SH Makes a MANIFEST.new file out of a MANIFEST kit/manifake.man Manual page for same lib/ Some library support files lib/C/ Some useful C routines lib/C/Jmakefile Generic makefile for C lib routines lib/C/Makefile.SH Produces Makefile for C lib routines lib/C/fake/ Fake implementations of real routines lib/C/fake/Jmakefile Generic makefile for faked C routines lib/C/fake/Makefile.SH Jmake-generated configured makefile lib/C/fake/dup2.C A dup2() replacement lib/C/fake/getopt.C A getopt() replacement lib/C/fake/rename.C A rename() replacement for files lib/C/fake/scandir.C A scandir() replacement lib/C/fake/setsid.C A setsid() pale imitation lib/Jmakefile Generic makefile description for lib lib/Makefile.SH Jmake-generated configured makefile lib/errnolist.a Awk script to build sys_errnolist[] lib/errnolist.mk Rule files to add for errnolist.c lib/errnolist.sh Script to build errnolist.c lib/makedepend.sh Script to make dependecies, Larry Wall's way lib/makedir.sh Emulates 'mkdir -p' mcon/ Where metaconfig tools are stored mcon/INTRO Quick introduction for newcommers mcon/Jmakefile The file used by jmake to produce the Makefile mcon/Makefile.SH Builds metaconfig mcon/NOTES Documents the changes in metaconfig mcon/README Instructions on using metaconfig mcon/U/ Holds Units for metaconfig mcon/U/AAAAA.U Does magic before Head.U mcon/U/Alpha_mieee.U Can -mieee be passed to cc? mcon/U/Assert.U Generates the "static_assert.h" file for tests mcon/U/Begin.U "Beginning of configuration questions" mcon/U/Checkcc.U A unit for checking the C compiler for sanity mcon/U/Chk_MANI.U MANIFEST checks mcon/U/Chk_whoami.U A unit which checks for conflicts mcon/U/Compile.U Unit for performing compile and link tests mcon/U/Config_h.U Makes config.h.SH--bizarrity here mcon/U/Config_sh.U Makes config.sh mcon/U/Configdir.U Creates .config directory to store persistent info mcon/U/Cppsym.U Makes program to test for cpp symbols mcon/U/Cross.U Unit for cross-compiling support mcon/U/Csym.U Determines whether C symbol is defined mcon/U/End.U "End of configuration questions" mcon/U/Extract.U .SH file extraction mcon/U/Extractall.U Support for the -S Configure option mcon/U/Filexp.U Makes program to do tilde expansion mcon/U/Findhdr.U Locate header files mcon/U/Finish.U A unit which always goes last mcon/U/GCC_pipe.U Is the -pipe option supported by gcc? mcon/U/Getfile.U Get file/directory name mcon/U/Guess.U Hazard guesses as to overall philosophy mcon/U/Head.U First unit, does "#!/bin/sh" et al mcon/U/Inhdr.U Defines a look-for-header function mcon/U/Init.U Magically gathers ?Init: lines from other units mcon/U/Inlibc.U Defines an is-in-libc? function mcon/U/Instruct.U Prints instructions mcon/U/Largefile.U Which cc flags are required for large file support? mcon/U/Loc.U Look for common programs mcon/U/Loc_sed.U Full path of sed interpreter, even when portable mcon/U/Magic_h.U Makes confmagic.h--bizarrity here mcon/U/MailAuthor.U Offers user to register himself mcon/U/MailList.U Offers user to subscribe to users list mcon/U/Mips.U Are we on a MIPS system? mcon/U/Mkdirp.U Unit producing shell script to "mkdir -p" mcon/U/Mksymlinks.U Unit to generate symlink to source tree mcon/U/Myinit.U For copying to private U directories mcon/U/Myread.U Makes program to do read with shell escape mcon/U/Nothing.U For empty dependencies mcon/U/Null.U Zeroes out variables. Probably unnecessary mcon/U/Obsol_h.U Warnings about obsolete C symbols mcon/U/Obsol_sh.U Warnings about obsolete shell symbols mcon/U/Oldconfig.U Looks for old config.sh file mcon/U/Oldsym.U Try to propagate symbols mcon/U/Options.U Configure option parsing mcon/U/Prefixit.U Fixes path prefix in variables in case it changed mcon/U/Prefixup.U Fixes vars with path prefix using ~name expansion mcon/U/Rcs.U Some stupid redefinitions to keep RCS happy mcon/U/Sendfile64.U Is sendfile() working with the largefile flags? mcon/U/Setvar.U Set a variable with some sanity checks mcon/U/Signal.U Utilities for sig_name.U mcon/U/Tr.U Builds a tr script to handle lower and upper classes mcon/U/Trylink.U Compiles and links a test program mcon/U/Typedef.U Defines a typedef lookup function mcon/U/Unix.U Common UNIX settings and assumptions mcon/U/Warn.U Summarizes warnings emitted during Configure run mcon/U/Warn_v7EXT.U V7 has some ideosyncracies mcon/U/Warn_v7ND.U V7 has no O_NDELAY read mcon/U/Whoa.U Warning function mcon/U/abortsig.U Which signal is sent by abort()? mcon/U/active.U Find the news active file mcon/U/afs.U Look whether AFS is running or not mcon/U/alignbytes.U Check for alignment constraints mcon/U/archlib.U Where architecture-dependent files are installed mcon/U/archname.U Computes the architecture name (cpu-osname) mcon/U/baserev.U Base revision of package mcon/U/basicshell.U Which basic shell is available mcon/U/bin.U Find where to install public executables mcon/U/bitpbyte.U Computes the number of bits in a byte mcon/U/byteorder.U Computes the byte order (big-endian?) mcon/U/cc.U Which C compiler should be used? mcon/U/ccflags.U Any additional C flags? mcon/U/cf_email.U Computes user's e-mail address mcon/U/cf_name.U Computes user's full name mcon/U/cf_who.U Who configured the sytem, where and when mcon/U/charorder.U Character order within a byte mcon/U/charsize.U What is the size of "char"? mcon/U/contains.U Makes status-returning grep mcon/U/cpp_stuff.U Some cpp stuff mcon/U/cpp_trad.U Checks how to get traditional cpp behaviour mcon/U/cppfilecom.U Running cpp while preserving C comments mcon/U/cppstdin.U Check how to invoke the C pre-processor mcon/U/d_NOFILE.U Maximum # of file descriptors mcon/U/d_NeWS.U Old NeWS stuff mcon/U/d_PORTAR.U Do we know about portable archives? mcon/U/d_SHM_MAC.U SHMLBA macro stuff mcon/U/d_access.U Do we have access()? mcon/U/d_alarm.U Do we have alarm()? mcon/U/d_arc4random.U Do we have arc4random()? mcon/U/d_attribut.U Checks wether your cc groks __attribute__ mcon/U/d_backtrace.U Do we have backtrace()? mcon/U/d_bcmp.U Do we have bcmp() or memcmp()? mcon/U/d_bcopy.U Do we have bcopy() or memcpy()? mcon/U/d_bfd_lib.U Is the BFD library available? mcon/U/d_bindtxtcode.U Do we have bind_textdomain_codeset()? mcon/U/d_brokstat.U Check whether stat() macros are broken mcon/U/d_bsdjmp.U Do we have BSD _setjmp() and _longjmp()? mcon/U/d_bsearch.U Do we have bsearch()? mcon/U/d_built_bswap32.U Is __builtin_bswap32() available? mcon/U/d_built_bswap64.U Is __builtin_bswap64() available? mcon/U/d_built_clz.U Is __builtin_clz() available? mcon/U/d_built_ctz.U Is __builtin_ctz() available? mcon/U/d_built_memcmp.U Is __builtin_memcmp() available? mcon/U/d_built_popcount.U Is __builtin_popcount() available? mcon/U/d_byacc.U Is byacc available? mcon/U/d_bzero.U Do we have bzero() or memset()? mcon/U/d_casti32.U Can the compiler cast large flots to 32-bit ints? mcon/U/d_castneg.U Can the C compiler cast negative to unsigned? mcon/U/d_cbrt.U Do we have cubic root cbrt()? mcon/U/d_charsprf.U How is sprintf() defined? mcon/U/d_chown.U Do we have chown()? mcon/U/d_chroot.U Do we have chroot()? mcon/U/d_chsize.U Size of a char mcon/U/d_ckeypad.U Do we have the curses keypad()? mcon/U/d_clearenv.U Do we have clearenv()? mcon/U/d_clock_getres.U Do we have clock_getres()? mcon/U/d_clock_gettime.U Do we have clock_gettime()? mcon/U/d_closedir.U Do we have closedir()? mcon/U/d_closefrom.U Do we have closefrom()? mcon/U/d_const.U Can cc grok the const keyword? mcon/U/d_crypt.U Does crypt() exist? mcon/U/d_csh.U csh path mcon/U/d_ctermid.U Do we have ctermid()? mcon/U/d_cuserid.U Do we have cuserid()? mcon/U/d_datastart_symbol.U Whether linker defines the "__data_start" symbol mcon/U/d_dbl_dig.U Is DBL_DIG defined in or ? mcon/U/d_debugging.U Conditionally defines -DDEBUGGING mcon/U/d_deflate.U Do we have zlib's deflate()? mcon/U/d_devpoll.U Can we use /dev/poll? mcon/U/d_difftime.U Do we have difftime()? mcon/U/d_dirent_d_namlen.U Does struct dirent has a member d_namlen? mcon/U/d_dirent_d_type.U Does struct dirent has a member d_type? mcon/U/d_dirfd.U Do we have dirfd()? mcon/U/d_dladdr.U Do we have dladdr()? mcon/U/d_dlerror.U Do we have dlerror()? mcon/U/d_dliterphdr.U Do we have dl_iterate_phdr()? mcon/U/d_dlopen.U Do we have dlopen()? mcon/U/d_dosuid.U Do they want setuid emulation? mcon/U/d_drem.U Do we have drem()? mcon/U/d_dup2.U Do we have dup2()? mcon/U/d_end_symbol.U Whether linker defines the "end" symbol mcon/U/d_eofpipe.U Will EOF be seen on closed pipes? mcon/U/d_epoll.U Can we use epoll_xxx() routines? mcon/U/d_etext_symbol.U Whether linker defines the "etext" symbol mcon/U/d_euc2jis.U Do we have euc2jis()? mcon/U/d_fast_assert.U Can we use fast assertions? mcon/U/d_fchdir.U Do we have fchdir()? mcon/U/d_fchmod.U Do we have fchmod()? mcon/U/d_fchown.U Do we have fchown()? mcon/U/d_fcntl.U Do we have fcntl()? mcon/U/d_fd_set.U Do we have the fd set manipulation macros? mcon/U/d_fdatasync.U Do we have fdatasync()? mcon/U/d_fdopendir.U Do we have fdopendir()? mcon/U/d_ffs.U Do we have ffs()? mcon/U/d_fgetpos.U Do we have fgetpos()? mcon/U/d_flexfnam.U Long filenames? mcon/U/d_flock.U Do we have flock()? mcon/U/d_fmod.U Do we have fmod()? mcon/U/d_fork.U Do we have fork()? mcon/U/d_fsetpos.U Do we have fsetpos()? mcon/U/d_fstatat.U Do we have fstatat()? mcon/U/d_fsync.U Do we have fsync()? mcon/U/d_ftime.U Do we have ftime()? mcon/U/d_ftrncate.U Do we have ftruncate()? mcon/U/d_gconvert.U Do we have gconvert() or gcvt()? mcon/U/d_getaddrinfo.U Do we have etaddrinfo()? mcon/U/d_getcontext.U Do we have getcontext()? mcon/U/d_geteuid.U Do we have geteuid()? mcon/U/d_getgrps.U Do we have getgroups()? mcon/U/d_gethbynm.U Do we have gethostbyname()? mcon/U/d_gethent.U Do we have gethostent()? mcon/U/d_gethid.U Do we have gethostid()? mcon/U/d_gethname.U What is the C function to get host name? mcon/U/d_getifaddrs.U Do we have getifaddrs() and freeifaddrs()? mcon/U/d_getinvent.U Do we have getinvent()? mcon/U/d_getlogin.U Do we have getlogin()? mcon/U/d_getnameinfo.U Do we have getnameinfo()? mcon/U/d_getopt.U Do we have getopt()? mcon/U/d_getpagsz.U Computes system's page size mcon/U/d_getpgid.U Do we have getpgid()? mcon/U/d_getpgrp.U Do we have getpgrp()? mcon/U/d_getpgrp2.U Do we have getpgrp2()? (DG/UX) mcon/U/d_getppid.U Do we have getppid()? mcon/U/d_getprior.U Do we have getpriority()? mcon/U/d_getprogname.U Do we have getprogname()? mcon/U/d_getpwent.U How is passwd info gotten? mcon/U/d_getpwnam.U Do we have getpwnam()? mcon/U/d_getpwuid.U Do we have getpwuid()? mcon/U/d_getrlimit.U Do we have getrlimit()? mcon/U/d_gettext.U Checks whether gettext() is available mcon/U/d_gettext.U Do we have gettext()? mcon/U/d_getuid.U Do we have getuid()? mcon/U/d_getwd.U Do we have getwd()? mcon/U/d_gnugettext.U Do we have GNU gettext()? mcon/U/d_gnulibc.U Are we using the GNU C library? mcon/U/d_group.U Do we have group()? mcon/U/d_havetlib.U Where is termlib? mcon/U/d_herror.U Do we have herror()? mcon/U/d_hidnet.U Do hiddennet stuff? mcon/U/d_hstrerror.U Do we have hstrerror()? mcon/U/d_htonl.U Do we have htonl() and friends? mcon/U/d_iconv.U Do we have iconv()? mcon/U/d_ieee754.U De we have IEEE-754 floats? mcon/U/d_inetaton.U Do we have inet_aton()? mcon/U/d_inetd.U Should internet communication be done via inetd? mcon/U/d_inflate.U Do we have zlib's inflate()? mcon/U/d_initstate.U Do we have initstate()? mcon/U/d_internet.U Use internet addresses? mcon/U/d_iptos.U Do we have IP TOS support? mcon/U/d_ipv6.U Do we have IPv6 support? mcon/U/d_isascii.U Do we have isascii()? mcon/U/d_itimer.U Do we have setitimer()? mcon/U/d_keepsig.U Will signal handlers need to be rearmed? mcon/U/d_kevent_udata.U Is udata within struct kevent an integer? mcon/U/d_killpg.U Do we have killpg()? mcon/U/d_kqueue.U Do we have kqueue()? mcon/U/d_link.U Do we have link()? mcon/U/d_linuxstd.U Do we have Linux standard I/O structures? mcon/U/d_locale_charset.U Do we have locale_charset()? mcon/U/d_locconv.U Do we have localeconv()? mcon/U/d_lockf.U Do we have lockf()? mcon/U/d_lstat.U Do we have lstat()? mcon/U/d_madvise.U Do we have madvise()? mcon/U/d_mblen.U Do we have mblen()? mcon/U/d_mbstowcs.U Do we have mbstowcs()? mcon/U/d_mbtowc.U Do we have mbtowc()? mcon/U/d_memalign.U Do we have memalign()? mcon/U/d_memccpy.U Do we have memccpy()? mcon/U/d_memchr.U Do we have memchr()? mcon/U/d_memcmp.U Do we have memcmp()? mcon/U/d_memcpy.U Do we have memcpy()? mcon/U/d_memmove.U Do we have memmove()? mcon/U/d_mempcpy.U Do we have mempcpy()? mcon/U/d_memset.U Do we have memset()? mcon/U/d_mkdir.U Do we have mkdir()? mcon/U/d_mkfifo.U Do we have mkfifo()? mcon/U/d_mktime.U Do we have mktime()? mcon/U/d_mmap.U Do we have mmap()? mcon/U/d_msem_lck.U Do we have msem_lock()? mcon/U/d_msg.U Do we have full msg(2) support? mcon/U/d_msg_flags.U Does struct msghdr have a msg_flags member? mcon/U/d_msgctl.U Do we have msgctl()? mcon/U/d_msgget.U Do we have msgget()? mcon/U/d_msgrcv.U Do we have msgrcv()? mcon/U/d_msgsnd.U Do we have msgsnd()? mcon/U/d_msync.U Do we have msync()? mcon/U/d_munmap.U Do we have munmap()? mcon/U/d_nanosleep.U Do we have nanosleep()? mcon/U/d_newsadm.U Who is news administrator? mcon/U/d_nice.U Do we have nice()? mcon/U/d_nls.U Do we support NLS? mcon/U/d_nolnbuf.U Is stdout line buffered? mcon/U/d_normsig.U signal() vs sigset() mcon/U/d_open3.U Do we have the 3 arguments form for open()? mcon/U/d_openat.U Do we have openat()? mcon/U/d_passwd.U Do we have passwd()? mcon/U/d_pathconf.U Do we have pathconf()? mcon/U/d_pause.U Do we have pause()? mcon/U/d_perror.U Do we have perror()? mcon/U/d_pidcheck.U Is kill(pid, 0) allowed for PID checks? mcon/U/d_pipe.U Do we have pipe()? mcon/U/d_pipe2.U Do we have pipe2()? mcon/U/d_poll.U Do we have poll()? mcon/U/d_popen.U Do we have popen()? mcon/U/d_portable.U How portable do we want to be? mcon/U/d_posix_fadvise.U Do we have posix_fadvise()? mcon/U/d_posix_memalign.U Do we have posix_memalign()? mcon/U/d_pread.U Do we have pread()? mcon/U/d_preadv.U Do we have preadv()? mcon/U/d_proginvocname.U Do we have program_invocation_name variables? mcon/U/d_psignal.U Do we have psignal()? mcon/U/d_ptattr_setstack.U Do we have pthread_attr_setstack()? mcon/U/d_pwrite.U Do we have pwrite()? mcon/U/d_pwritev.U Do we have pwritev()? mcon/U/d_random.U Do we have random()? mcon/U/d_raster.U Is this a Raster Tech machine? mcon/U/d_rdchk.U Is rdchk() there to check for input? mcon/U/d_readdir.U Do we have readdir()? mcon/U/d_readlink.U Do we have readlink()? mcon/U/d_recvmsg.U Do we have recvmsg()? mcon/U/d_regcmp.U Do we have regcmp() or re_comp()? mcon/U/d_regcomp.U Do we have POSIX regcomp()? mcon/U/d_regparm.U Can we use __attribute__((__regparm__(n)))? mcon/U/d_rename.U Do we have rename()? mcon/U/d_rmdir.U Do we have rmdir()? mcon/U/d_rusage.U Do we have getrusage()? mcon/U/d_sa_interrupt.U Can SA_INTERRUPT be used in sigaction()? mcon/U/d_safebcpy.U Can bcopy() handle overlapping blocks? mcon/U/d_safemcpy.U Can memcpy() handle overlapping blocks? mcon/U/d_sanemcmp.U Can we compare 8th bit in chars with memcmp()? mcon/U/d_sbrk.U Do we have sbrk()? mcon/U/d_scandir.U Do we have scandir()? mcon/U/d_scannl.U Does scanf() groks '\n' correctly? mcon/U/d_sched_yield.U Do we have sched_yield()? mcon/U/d_scorfl.U Keep scoreboards by full name? mcon/U/d_select.U Do we have select()? mcon/U/d_sem.U Do we have full sem(2) support? mcon/U/d_semctl.U Do we have d_semctl()? mcon/U/d_semget.U Do we have semget()? mcon/U/d_semop.U Do we have semop()? mcon/U/d_sendfile.U Do we have sendfile()? mcon/U/d_sendmsg.U Do we have sendmsg()? mcon/U/d_setegid.U Do we have setegid()? mcon/U/d_setenv.U Do we have setenv()? mcon/U/d_seteuid.U Do we have seteuid()? mcon/U/d_setgrps.U Do we have setgroups()? mcon/U/d_setlnbuf.U Do we have setlinebuf()? mcon/U/d_setlocale.U Do we have setlocale()? mcon/U/d_setpgid.U Do we have setpgid()? mcon/U/d_setpgrp.U Do we have setpgrp()? mcon/U/d_setpgrp2.U Do we have setpgrp2()? (DG/UX) mcon/U/d_setprior.U Do we have setpriority()? mcon/U/d_setproctitle.U Do we have setproctitle()? mcon/U/d_setprogname.U Do we have setprogname()? mcon/U/d_setregid.U Do we have setregid()? mcon/U/d_setreuid.U Do we have setreuid()? mcon/U/d_setrgid.U Do we have setrgid()? mcon/U/d_setrlimit.U Do we have setrlimit()? mcon/U/d_setruid.U Do we have setruid()? mcon/U/d_setsid.U Do we have setsid()? mcon/U/d_sgndchr.U Are chars signed? mcon/U/d_shm.U Do we have full shm(2) support? mcon/U/d_shmat.U Do we have shmat()? mcon/U/d_shmctl.U Do we have shmctl()? mcon/U/d_shmdt.U Do we have shmdt()? mcon/U/d_shmget.U Do we have shmget()? mcon/U/d_sigaction.U Do we have sigaction()? mcon/U/d_sigaltstack.U Do we have sigaltstack()? mcon/U/d_sigblock.U Do we have sigblock()? mcon/U/d_sighold.U Do we have sighold()? mcon/U/d_siglist.U Do we have sys_siglist[]? mcon/U/d_sigprocmask.U Do we have sigprocmask()? mcon/U/d_sigsetjmp.U Do we have sigsetjmp()? mcon/U/d_sigsetmk.U Do we have sigsetmask()? mcon/U/d_sigvec.U BSD reliable signals supported? mcon/U/d_sjis2jis.U Do we have sjis2jis()? mcon/U/d_sockaddr_in_sin_len.U Is there a sin_len within struct sockaddr_in? mcon/U/d_sockaddr_un.U Is struct sockaddr_un available? mcon/U/d_socker_get.U Has socker_get() to listen to privileged ports? mcon/U/d_socket.U BSD socket interface supported? mcon/U/d_speedopt.U Optimize speed vs memory? mcon/U/d_srandom.U Do we have srandom()? mcon/U/d_stat.U Do we have stat()? mcon/U/d_statblks.U Does stat know about blksize and blocks? mcon/U/d_statfs.U Do we have statfs()? mcon/U/d_statvfs.U Do we have statvfs()? mcon/U/d_stdstdio.U How standard is stdio? mcon/U/d_strcasestr.U Do we have strcasestr()? mcon/U/d_strccmp.U Do we have strcasecmp()? mcon/U/d_strchr.U Use strchr() or index()? mcon/U/d_strcoll.U Do we have strcoll()? mcon/U/d_strcspn.U Do we have strcspn()? mcon/U/d_strctcpy.U Do we do struct copies? mcon/U/d_strdup.U Do we have strdup()? mcon/U/d_strerror.U Do we have strerror()? mcon/U/d_strftime.U Do we have strftime()? mcon/U/d_strlcat.U Do we have strlcat()? mcon/U/d_strlcpy.U Do we have strlcpy()? mcon/U/d_strstr.U Do we have strtr()? mcon/U/d_strtod.U Do we have strtod()? mcon/U/d_strtok.U Do we have strtok()? mcon/U/d_strtol.U Do we have strtol()? mcon/U/d_strtoul.U Do we have strtoul()? mcon/U/d_strxfrm.U Do we have strxfrm()? mcon/U/d_su_chown.U Do we need to be root to do a chown? mcon/U/d_symlink.U Does symlink() exist? mcon/U/d_sync_atomic.U Are __sync_synchronize() and friends available? mcon/U/d_syscall.U Do we have syscall()? mcon/U/d_sysconf.U Do we have sysconf()? mcon/U/d_sysctl.U Do we have sysctl()? mcon/U/d_syslog.U Do we have syslog()? mcon/U/d_system.U Do we have system()? mcon/U/d_table.U De we have table()? mcon/U/d_tcgtpgrp.U Do we have tcgetpgrp()? mcon/U/d_tcstpgrp.U Do we have tcsetpgrp()? mcon/U/d_time.U Do we have time()? mcon/U/d_times.U Do we have a times() function? mcon/U/d_tminsys.U Is struct tm in ? mcon/U/d_truncate.U Do we have truncate()? mcon/U/d_tzmin.U Do we use tz_minuteswest? mcon/U/d_tzname.U Do we have tzname[]? mcon/U/d_uctx_mctx.U Do we have a uc_mcontext field in struct ucontext? mcon/U/d_uctx_mctx_gregs.U Do we have uc_mcontext.gregs[] in struct ucontext? mcon/U/d_ulimit.U Do we have ulimit()? mcon/U/d_umask.U Do we have umask()? mcon/U/d_unsetenv.U Do we have unsetenv()? mcon/U/d_usendir.U Use our own ndir routines? mcon/U/d_usleep.U Do we have usleep()? mcon/U/d_uwait.U Is there a 'union wait' declaration around here? mcon/U/d_vfork.U vfork() vs fork() mcon/U/d_voidsig.U How is signal() declared? mcon/U/d_volatile.U Does our C compiler support "volatile"? mcon/U/d_vprintf.U Do we have vprintf()? mcon/U/d_vsnprintf.U Do we have vsnprintf()? mcon/U/d_wait3.U Do we have wait3()? mcon/U/d_wait4.U Do we have wait4()? mcon/U/d_waitpid.U Do we have waitpid() system call? mcon/U/d_wcstombs.U Do we have wcstombs()? mcon/U/d_wctomb.U Do we have wctomb()? mcon/U/d_wifstat.U Can we safely use WIFEXITED() and friends? mcon/U/d_xdrs.U Do we have XDR serialization routines? mcon/U/defeditor.U Find default editor mcon/U/doublesize.U What is the size of "double"? mcon/U/ebcdic.U Check for an EBCDIC system mcon/U/enablenls.U Shall we enable NLS? mcon/U/errnolist.U See if we need our own .c to get sys_errnolist[] mcon/U/etc.U Where administrative executable should go mcon/U/fieldn.U Compute included filename position in cpp output mcon/U/filexp_path.U Finds location of filexp made by Filexp.U mcon/U/floatsize.U What is the size of "float"? mcon/U/fpostype.U What is the type for file positions? mcon/U/fpu.U What kind of Sun fpu is in use? mcon/U/gccvers.U Computes the version of the GCC compiler mcon/U/gidtype.U What is the type of gids? mcon/U/groupstype.U What is the type for groups in getgroups()? mcon/U/h_fcntl.U Do we need to include fcntl.h? mcon/U/h_sysfile.U Do we need to include sys/file.h? mcon/U/i_alloca.U Shall we include ? mcon/U/i_arpainet.U Shall we include ? mcon/U/i_db.U Shall we include ? mcon/U/i_dbm.U Shall we include ? mcon/U/i_dirent.U Shall we include mcon/U/i_dld.U Shall we include ? mcon/U/i_dlfcn.U Shall we include ? mcon/U/i_execinfo.U Shall we include ? mcon/U/i_fcntl.U Shall we include ? mcon/U/i_float.U Shall we include ? mcon/U/i_gdbm.U Shall we include ? mcon/U/i_grp.U Shall we include ? mcon/U/i_iconv.U Shall we include ? mcon/U/i_ifaddrs.U Shall we include ? mcon/U/i_inttypes.U Shall we include ? mcon/U/i_invent.U Shall we include ? mcon/U/i_langinfo.U Shall we include ? mcon/U/i_libcharset.U Shall we include ? mcon/U/i_libintl.U Shall we include ? mcon/U/i_limits.U Shall we include ? mcon/U/i_linux_netlink.U Shall we include ? mcon/U/i_linux_rtnetlink.U Shall we include ? mcon/U/i_locale.U Shall we include ? mcon/U/i_malloc.U Shall we include ? mcon/U/i_math.U Shall we include ? mcon/U/i_memory.U Shall we include ? mcon/U/i_mswsock.U Shall we include ? mcon/U/i_ndbm.U Shall we include ? mcon/U/i_netdb.U Shall we include ? mcon/U/i_neterrno.U Shall we include ? mcon/U/i_netif.U Shall we include ? mcon/U/i_netroute.U Can we include ? mcon/U/i_niin.U Shall we include ? mcon/U/i_niip.U Shall we include ? mcon/U/i_poll.U Shall we include ? mcon/U/i_pthread.U Shall we include ? mcon/U/i_pwd.U Shall we include ? mcon/U/i_regex.U Shall we include ? mcon/U/i_sched.U Shall we include ? mcon/U/i_sfio.U Shall we include ? mcon/U/i_stddef.U Shall we include ? mcon/U/i_stdlib.U Shall we include ? mcon/U/i_string.U or ? mcon/U/i_sysdir.U Shall we include ? mcon/U/i_sysfile.U Do we need ? mcon/U/i_sysioctl.U Include or ? mcon/U/i_sysipc.U Shall we include ? mcon/U/i_sysmman.U Do we have to include ? mcon/U/i_sysmount.U Shall we include ? mcon/U/i_sysndir.U Shall we include ? mcon/U/i_sysparam.U Shall we include ? mcon/U/i_syspoll.U Shall we include ? mcon/U/i_sysresrc.U Shall we include ? mcon/U/i_sysselct.U Shall we include ? mcon/U/i_syssem.U Shall we include ? mcon/U/i_syssendfile.U Shall we include ? mcon/U/i_syssock.U Shall we include ? mcon/U/i_sysstat.U Shall we include mcon/U/i_sysstatvfs.U Shall we include ? mcon/U/i_syssysctl.U Shall we include ? mcon/U/i_systable.U De we have to include ? mcon/U/i_systimeb.U Is struct timeb defined in ? mcon/U/i_systimes.U Shall we include ? mcon/U/i_systwgcf.U Shall we include ? mcon/U/i_systypes.U Do we have to include ? mcon/U/i_sysun.U Shall we include ? mcon/U/i_sysutsname.U Shall we include ? mcon/U/i_sysvfs.U Shall we include ? mcon/U/i_syswait.U Is there a ? mcon/U/i_termio.U Include or ? mcon/U/i_time.U Which time.h should we include? mcon/U/i_ucontext.U Shall we include mcon/U/i_unistd.U Include ? mcon/U/i_utime.U Include ? mcon/U/i_values.U Shall we include mcon/U/i_varhdr.U Choose between and mcon/U/i_vfork.U Include ? mcon/U/i_whoami.U Include ? mcon/U/i_winsock2.U Shall we include ? mcon/U/i_ws2tcpip.U Shall we include ? mcon/U/i_zlib.U Shall we include ? mcon/U/ilp.U Supported integer-long-pointer architecture. mcon/U/inc.U Where to put public include files? mcon/U/install.U Look for a BSD-compatible install mcon/U/intsize.U What is the size of "int"? mcon/U/ipc.U Choose IPC mechanism mcon/U/issymlink.U How to test for symlink status from the shell mcon/U/kernel.U Compute the kernel pathname mcon/U/lex.U Use lex or flex? mcon/U/lib.U Where to put public library files ? mcon/U/libc.U Where is libc? mcon/U/libdbm.U Look for a suitable dbm library mcon/U/libflex.U Locate flex library mcon/U/libnlist.U Locate an nlist library mcon/U/libnm.U New math library? mcon/U/libpth.U Set path to locate libraries mcon/U/libs.U Optional libraries? mcon/U/libyacc.U Locate yacc library mcon/U/lintlib.U Where lint library should be placed mcon/U/lns.U Are symbolic links supported by ln? mcon/U/locale.U Configuration of I18N files mcon/U/locdist.U Find distribution names for news mcon/U/longsize.U What is the size of "long"? mcon/U/lseektype.U What is the type of lseek()? mcon/U/maildir.U Where is mail spooled mcon/U/mailer.U What delivers mail? mcon/U/mailfile.U What filename in maildir? mcon/U/make.U Does make set the $(MAKE) macro? mcon/U/mallocsrc.U Use malloc included in kit? mcon/U/man1dir.U Where to put traditional section 1 manpage sources mcon/U/man3dir.U Where to put traditional section 3 manpage sources mcon/U/manfmt.U Formatted man directories mcon/U/mansrc.U Where to put manual pages source mcon/U/mboxchar.U How to determine if file is mailbox mcon/U/mkdep.U How to generate makefile dependencies? mcon/U/models.U Large vs small, split I&D, etc mcon/U/modetype.U What is the type for file modes? mcon/U/msgmerge_update.U Does msgmerge --update work? mcon/U/myhostname.U How to determine hostname from shell mcon/U/n.U How to suppress newline with echo mcon/U/nametype.U How to get user's fullname mcon/U/nblock_io.U Support for non-blocking I/O mcon/U/newslevel.U What version of news are we running? mcon/U/newslib.U Where is the news library? mcon/U/newsspool.U Where is news spooled? mcon/U/nis.U Do we have to deal with NIS (former YP)? mcon/U/nlist_pfx.U nlist() related stuff mcon/U/official.U Are we making an official build with no local ref? mcon/U/orderlib.U Shall we order components libraries? mcon/U/orgname.U What is the organizaton name? mcon/U/packadmin.U E-mail address of the package administrator mcon/U/package.U Gets package name from .package magically mcon/U/pager.U What's the pager, more or less? mcon/U/patchlevel.U Grab current patchlevel out of patchlevel.h mcon/U/perlpath.U The full path of perl mcon/U/pidtype.U What is the type of a PID? mcon/U/pkgsrc.U Computes the absolute package source directory mcon/U/prefix.U Installation prefix setting (none, /usr/local) mcon/U/prefshell.U Preferred user shell mcon/U/privlib.U Where is the private library? mcon/U/prototype.U Do we support prototypes? mcon/U/ptrsize.U What is the size of a pointer? mcon/U/randbits.U How many bits in rand()? mcon/U/randfunc.U Which random number function shall we use? mcon/U/rcs_branch.U Does RCS know about the -b switch? mcon/U/registers.U How many register declarations to use mcon/U/rootid.U Root user id mcon/U/sbrksmart.U Can sbrk() be used to release core? mcon/U/sbrktype.U What is the return type of sbrk()? mcon/U/scriptdir.U Where to put public scripts mcon/U/selecttype.U What type for select() file bitfields? mcon/U/sh.U Where the shell is located mcon/U/shm_for.U More shared memory stuff mcon/U/sig_name.U Signal names mcon/U/sitearch.U Where user-installed arch-dependant files should go mcon/U/sitelib.U Where user-installed regular library files should go mcon/U/sizetype.U What is the type for byte size? mcon/U/so.U Shared object extension mcon/U/sockopt.U Check for socket options mcon/U/spitshell.U Shell comment stripper, maybe mcon/U/src.U Build and source tree separation support mcon/U/ssizetype.U What is the signed type for byte size? mcon/U/startperl.U Do we start perl with #! or what? mcon/U/startsh.U How to guarantee sh startup mcon/U/stdchar.U Are chars unsigned in stdio? mcon/U/sunscanf.U Is this Sun's version of scanf()? mcon/U/sysman.U Where is the man(1) located? mcon/U/trnl.U Finds appropriate value for a newline in tr mcon/U/uidtype.U What is the type of uids? mcon/U/usenm.U Shall we use the costly nm extraction? mcon/U/usesocks.U Defines USE_SOCKS when SOCKS is to be used mcon/U/usrinc.U Where are include files located? mcon/U/vaproto.U How do we prototype varargs, with ...? mcon/U/voidflags.U How supported is void? mcon/U/warnflags.U Any additional cc warning flags? mcon/U/yacc.U Which compiler-compiler to use? mcon/configure GNU configure-like wrapper to metaconfig's Configure mcon/files/ Templates for new units mcon/files/Internal.U Template for special units with internal symbols mcon/files/README Why those templates are here... mcon/files/d_function.U Template for C defines mcon/files/dir.U Template to get a directory mcon/files/file.U Template get a file mcon/files/i_include.U Template for include files mcon/files/keyword.U Template for keyword checking mcon/files/locate.U Template to locate a file mcon/files/question.U Template for setvar questions mcon/files/rcshead.U Template for unit head mcon/files/shell.U Template for non-setvar questions mcon/files/type.U Template for type lookup mcon/makegloss.SH Extracts Glossary from Unit files mcon/man/ Manual pages for metaconfig et al. mcon/man/Jmakefile Generic makefile description for manual pages mcon/man/Makefile.SH Jmake-generated makefile for manual pages mcon/man/mconfig.SH Manual page for metaconfig mcon/man/mlint.SH Manual page for metalint mcon/man/mxref.SH Manual page for metaxref mcon/mconfig.SH Writes Configure scripts for you mcon/mlint.SH Lints metaconfig units mcon/mxref.SH Builds symbol cross-reference files mcon/pl/ Perl library for metaconfig et al. mcon/pl/common.pl Common control lines extraction mcon/pl/configure.pl Generates Configure mcon/pl/cosmetic.pl Some cosmetic fixes mcon/pl/depend.pl Metaconfig-only dependencies mcon/pl/eval.pl Built-in interpreter mcon/pl/extract.pl Dependency extractor engine mcon/pl/files.pl Extracts files from MANIFEST.new mcon/pl/gensym.pl Dynamic symbol generator mcon/pl/init.pl Initialization of dependency control array mcon/pl/lint.pl Lint-only dependencies mcon/pl/locate.pl Locate units mcon/pl/makefile.pl Builds temporary Makefiles mcon/pl/obsolete.pl Deals with obsolete symbols mcon/pl/order.pl Re-order units within Configure mcon/pl/tsort.pl Topological sort mcon/pl/wanted.pl Set up Wanted file mcon/pl/xref.pl Metaxref-only dependencies mcon/pl/xwant.pl Metaxref symbol extraction pat/ Where patching tools are stored pat/Jmakefile High level makefile description for pat pat/Makefile.SH Makefile for pat tools pat/README Instructions for patch/developping tools pat/pat.SH Check in, do diffs, make patch, send it pat/pat.man Manual page for patch tools pat/patbase.SH To set the base for future differences pat/patchlevel.h Prototypical patchlevel.h pat/patcil.SH Check in the latest changes pat/patclean.SH Check in latest changes and remove files pat/patcol.SH Check out working file pat/patdiff.SH Find the differences since last patch pat/patftp.SH Put patches in ftp pub directory pat/patindex.SH Create an index of patches sent out pat/patlog.SH Handles the ChangeLog file pat/patmake.SH Put together a patch file pat/patname.SH Assign symbolic name to a revision pat/patnotify.SH Notifies that new patches have been released pat/patpost.SH Send patches via news pat/patsend.SH Sends patches via mail pat/patsnap.SH Builds RCS snapshot file patchlevel.h The current patchlevel for dist pl/ Directory for public perl libraries pl/comment.pl Perl library to find comment in front of $Log pl/copyright.pl Perl library to expand copyright pl/editor.pl Perl library to compute suitable editor name pl/fullname.pl Perl library to get full name pl/listedit.pl Perl library to edit list of items pl/logname.pl Perl library to get login name pl/makedir.pl Perl library to emulate 'mkdir -p' pl/manifake.pl Perl library to build a MANIFEST.new if none found pl/newer.pl Perl library to Find files newer than patchlevel.h pl/package.pl Perl library to read .package pl/patseq.pl Perl library to compute issued patch sequence pl/profile.pl Perl library to get ~/.dist_profile pl/rangeargs.pl Perl library to expand number lists pl/rcsargs.pl Perl library to expand rcs filename lists pl/snapshot.pl Perl library to parse RCS snapshot file pl/tilde.pl Perl library to perform ~name expansion pl/users.pl Perl library to parse users file revision.h The current SVN revision number for dist dist_3.5-36.001/Wishlist0000644000175000017500000000452010473316164015144 0ustar srivastasrivasta*** List of wishes for dist version 3.0 *** ======================================================================= If you wish to implement one of the following, you're welcome :-). In that case, please let me know about it. I will probably integrate your changes in my version (after some sanity checks, because I can't maintain something I don't understand). This list has no priority order whatsoever, so you may pick up one of the following suggestion and start working on it. In that case, you may want to get all the official patches for dist 3.0 first and make sure nobody is already working on that topic. ======================================================================= *** jmake Make the names used more uniform. For instance, 'Simple' appears in many rules, but with different meanings, thus making the Jmakefile harder to understand at a first glance. Allow per-system compilation rules, so that objects and source file do not inter-mix but are kept in separate directories. *** metaconfig Write some "generic" templates for writing new units, so that the user only needs to fill up some fields. For instance, there could be a template for d_* and i_* units. [That's done, they are under mcon/files. Now I only need to write the generator on top of them] Make Configure know about cross-compiling. Make Configure know about VPATH for separate object directory, with proper support from jmake. Implement the ?I: and ?L: lines. The ?I: fills in inclwanted for you, while ?L: fills in the libswanted variable. For instance, when using a socket() call, one may need to look at -lbsd. If d_socket.U lists 'bsd' within its ?L: line, then the libswanted variable will be correctly set. [Note: there are some hooks for this already] Build a library of PD routines that may be otherwise missing on some older systems, eg: getopt(). Those routines will be automagically added to the package by relying on ?P: lines, something like: ?P:getopt (HAS_GETOPT): getopt.c which would include getopt.c in the package (under some PD dir) when getopt is used and HAS_GETOPT is *not* used within the sources, in order to achieve transparent implementation. *** metalint Process '@' pre-processor lines, and signal mismatches, unrecognized commands, etc... Also warn when testing wantedness of unknown symbols or obsolete ones, etc... *** pat tools Clean that stuff. dist_3.5-36.001/jmake/0002755000175000017500000000000012645366677014524 5ustar srivastasrivastadist_3.5-36.001/jmake/NOTES0000644000175000017500000001257210473316164015323 0ustar srivastasrivastaThe syntax in Jmake.rules is not elegant at all, but: - It is easy to parse (like sendmail.cf or troff files). - The rules are not supposed to change very often. - It is simple enough to be mastered in five minutes. :-) Here is a small description: o To deal with various cpp implementations: Final @!\ means: end of line, next line starts at the left margin. Final @@\ means: end of line, next line is to be indented by one tab. The conversion occurs during Pass1. o Symbol definitions >SYMBOL: defines the symbol (Pass 1). ?SYMBOL:: keeps iff SYMBOL is defined (Pass 2). %SYMBOL:: keeps iff SYMBOL is not defined (Pass 2). The ?SYM can be nested (logical AND), as in: ?SYMBOL:%TOKEN:text /* Keeps text if SYMBOL and not TOKEN */ To implement a logical OR, see below. o Commands Commands can be passed to 'jmake'. They start with a leading '|'. Available commands are: |suffix : adds to the .SUFFIXES: list in the makefile (Pass 1 & 2). |rule:: adds to the building rule section (Pass 1 & 2). |rule: : same as before, with a leading tab. |skip: skips text until a line starting with '-skip' is found (Pass 2). |expand : expand lines until '-expand' with (Pass 2). |once : text up to '-once' appears only the first time (Pass 1). Thus, a way to implement a logical OR could be: /* Implements SYMBOL or not TOKEN */ ?SYMBOL:text /* Keeps text if SYMBOL */ %SYMBOL:|skip %TOKEN:text /* Keeps text if not TOKEN */ -skip Actually, this is ugly, because the text has to appear twice. Fortunately, I did not use it. :-) The '|' commands cannot be nested. In particular, due to the simple implementation of '|skip', it is impossible to put '|skip' inside a skipped part. However, a '|once' section may have '|skip' sections. But actually, as you have surely already guessed, the best way to implement a logical OR is to use De Morgan's Law: not (p or q) <=> not p and not q /* Implements SYMBOL or not TOKEN (attempt #2) */ %SYMBOL:?TOKEN:|skip text /* If SYMBOL or not TOKEN */ -skip Who said they don't care ? ;-) o Expansion Expansion is done with the 'expand' command. It has been provided to avoid some cumbersome writings in makefiles when you have to repeat some silly lines that only differ in file names, for instance. Let's look at an example first: |expand a!foo bar! b!yes no! !a:: echo !a, !b -expand Then two rules will be printed, and the values of (a,b) for the first will be (foo, yes), for the second (bar, no). Substitution is controled by the '!' character. If the word to be substituted is part of another one, detach with the ^^ construct as in: !b^^c. It is possible to use Makefile macros in the , and they will be expanded by jmake. If this is not what you want, escape the first '$' sign (this is a Makefile escape, i.e. you must double the '$', not precede it with a backslash). A // stands for the null substitution value. Here is another example which shows how the macro Expand can be used. It is defined in Jmake.rules as: #define Expand(rule, pattern) @!\ |expand pattern @!\ rule @!\ -expand So we can write in the Jmakefile: |skip A = foo bar -skip #define Rule @!\ $(DIR)/!a^^.o: !a^^.o @@\ $(CC) -c !a^^.c @@\ $(MV) !a^^.o $(DIR) Expand(Rule, a!$(A)!) which will generate in Makefile.SH: $(DIR)/foo.o: foo.o $(CC) -c foo.c $(MV) foo.o $(DIR) $(DIR)/bar.o: bar.o $(CC) -c bar.c $(MV) bar.o $$(DIR) The 'A' declaration has been surrounded by skip, so that it does not appear in the generated Makefile.SH, but it will be taken into account by jmake for the substitution in the pattern. The number of expansions is determined by the number of possible values for the _first_ parameter. If other parameters have less substitution values, they will get void ones. It is possible to add a regular expression at the end of '-expand'. This regular expression will be removed from the final set of expansion at the end of each line. It is also possible to do substitutions in the expanded item, by using the syntax (if 'f' is the expanded variable) !f:

= where

and are two regular expressions (without spaces). The pattern

will be replaced by pattern (only the first occurrence will be replaced). Finally, you may refer in the expanded section to variables whose value is computed via another expansion, which makes it easy to define generic Jmakefiles. Example: SRC = foo.c bar.c OBJ = \ |expand f!$(SRC)! !f:\.c=\.o \ -expand \\ INC = \ |expand f!$(OBJ)! !f:\.o=\.h \ -expand \\ which will generate in Makefile.SH: SRC = foo.c bar.c OBJ = \ foo.o \ bar.o INC = \ foo.h \ bar.h Do not forget to protect special characters in your regular expressions such as backslash, point, etc... o Once The once command is tagged with a name. The first time the name appears, the once construct is ignored and the text up to '-once' will be copied in the generated Makefile.SH. However, future occurences of the same name will be ignored (once will behave like skip). Example: |once this_is_a_name -once o Initializations +: Puts the whole line in the initialization section (Pass 1 & 2). ++SYMBOL : Adds to the SYMBOL macro (Pass 1 and 2). o User-defined variables CFLAGS: added flags to C compiler DPFLAGS: cpp flags to be added to mkdep for dependency LDFLAGS: flags/libraries to be added at linking stage dist_3.5-36.001/jmake/Makefile.SH0000755000175000017500000001764412317736244016475 0ustar srivastasrivasta: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-172] : $X-Id: Jmake.tmpl 156 2012-12-19 16:44:39Z rmanfredi $ case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac CURRENT=jmake DIR=`echo $CURRENT/ | sed -e 's/\.\///g'` echo "Extracting ${DIR}Makefile (with variable substitutions)" INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'` INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'` DATE=`date` $spitshell >Makefile <>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files # $X-Id: Jmake.rules 106 2011-11-25 20:36:12Z rmanfredi $ ######################################################################## # Start of Jmakefile # $X-Id: Jmakefile 173 2014-04-05 08:10:18Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $X-Log: Jmakefile,v $ # Revision 3.0.1.2 1995/03/21 08:34:16 ram # patch52: now installs new fixcpp script in the private libdir # # Revision 3.0.1.1 1994/01/24 13:42:36 ram # patch16: added dependency generation stage # # Revision 3.0 1993/08/18 12:04:09 ram # Baseline for dist 3.0 netwide release. # all:: Index local_realclean:: $(RM) Index Index: bindex files/Jmake.rules chmod +x bindex ./bindex all:: jmake jmkmf local_realclean:: $(RM) jmake jmkmf jmake: jmake.SH /bin/sh jmake.SH jmkmf: jmkmf.SH /bin/sh jmkmf.SH local_install:: $(SCRIPTS) $(LSCRIPTS) @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \ for file in $(SCRIPTS) $(LSCRIPTS); do \ (set -x; \ $(INSTALL) -c -m 555 $$file $(INSTALL_PREFIX)$(SCRIPTDIR)) || \ exit 1; \ done local_deinstall:: @for file in $(SCRIPTS) $(LSCRIPTS); do \ case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/$$file); \ done local_install.man:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \ for file in $(SCRIPTS); do \ if test -f $$file.man; then \ (set -x; \ $(INSTALL) -c -m 444 $$file.man \ $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)) || \ exit 1; \ fi; \ done local_deinstall.man:: case '${MFLAGS}' in *[i]*) set +e;; esac; \ for file in $(SCRIPTS); do \ (set -x; $(RM) $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)); \ done all:: bindex fixcpp local_realclean:: $(RM) bindex fixcpp bindex: bindex.SH /bin/sh bindex.SH fixcpp: fixcpp.SH /bin/sh fixcpp.SH local_install:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for dir in $(PRIVLIB) $(PRIVLIB)/files; do \ (set -x; test -d $(INSTALL_PREFIX)$$dir || \ $(INSTALLDIR) $(INSTALL_PREFIX)$$dir); \ done local_deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for dir in $(PRIVLIB) $(PRIVLIB)/files; do \ (set -x; test -d $$dir && $(RM) -r $(INSTALL_PREFIX)$$dir); \ done local_install:: Index @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)); \ $(INSTALL) -c -m 444 Index $(INSTALL_PREFIX)$(PRIVLIB) local_deinstall:: $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/Index local_install:: bindex @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)); \ $(INSTALL) -c -m 555 bindex $(INSTALL_PREFIX)$(PRIVLIB) local_deinstall:: $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/bindex local_install:: fixcpp @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/files || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/files); \ $(INSTALL) -c -m 555 fixcpp $(INSTALL_PREFIX)$(PRIVLIB)/files local_deinstall:: $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/files/fixcpp local_install:: files/Jmake* @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/files || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/files); \ for i in files/Jmake*; do \ (set -x; $(INSTALL) -c -m 444 \ $$i $(INSTALL_PREFIX)$(PRIVLIB)/files) || exit 1;\ done local_deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for i in files/Jmake*; do \ (set -x; $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/files/$$i); \ done BINSH = jmake.SH fixcpp.SH depend:: local_depend local_depend:: ($(SED) '/^# DO NOT DELETE/q' Makefile && \ grep '^\$$grep' $(BINSH) | \ $(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \ ) > Makefile.new cp Makefile Makefile.bak cp Makefile.new Makefile $(RM) Makefile.new fixcpp jmake: $(TOP)/revision.h ######################################################################## # Common rules for all Makefiles -- do not edit all:: clean: local_clean realclean: local_realclean clobber: local_clobber local_clean:: if test -f core; then $(RM) core; fi $(RM) *~ *.o local_realclean:: local_clean local_clobber:: local_realclean $(RM) Makefile config.sh install:: local_install @exit 0 install.man:: maybe_install.man deinstall:: local_deinstall deinstall.man:: maybe_deinstall.man install.man-yes: local_install.man install.man-no: deinstall.man-yes: local_deinstall.man deinstall.man-no: !NO!SUBS! case "$installmansrc" in '') man=no;; *) man=yes;; esac $spitshell >>Makefile <>Makefile <<'!NO!SUBS!' Makefile.SH: Jmakefile -@if test -f $(TOP)/.package; then \ if test -f Makefile.SH; then \ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ fi; \ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ else touch $@; fi Makefile: Makefile.SH /bin/sh Makefile.SH tags:: $(CTAGS) -w *.[ch] $(CTAGS) -xw *.[ch] > tags local_clobber:: $(RM) tags depend:: ######################################################################## # Empty rules for directories with no sub-directories -- do not edit local_install:: @echo "install in $(CURRENT) done." local_deinstall:: @echo "deinstall in $(CURRENT) done." local_install.man:: @echo "install.man in $(CURRENT) done." local_deinstall.man:: @echo "deinstall.man in $(CURRENT) done." Makefiles:: Makefiles.SH:: ######################################################################## # Dependencies generated by make depend # DO NOT DELETE THIS LINE -- make depend relies on it # Put nothing here or make depend will gobble it up .FORCE_DEPEND:: @echo "You must run 'make depend' in $(TOP) first."; exit 1 !NO!SUBS! chmod 644 Makefile $eunicefix Makefile dist_3.5-36.001/jmake/jmkmf.man0000644000175000017500000000363110473666773016323 0ustar srivastasrivasta''' $Id: jmkmf.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: jmkmf.man,v $ ''' Revision 3.0.1.1 1995/05/12 11:58:03 ram ''' patch54: updated my e-mail address ''' ''' Revision 3.0 1993/08/18 12:04:20 ram ''' Baseline for dist 3.0 netwide release. ''' .TH JMKMF 1 ram .SH NAME jmkmf \- runs jmake with the correct options .SH SYNOPSIS .B jmkmf [ .I top-level dir [ .I current dir ] ] .SH DESCRIPTION .I Jmkmf is a wrapper which calls .I jmake with the correct options, defining the symbols .SM TOPDIR (location of the top-level directory) and .SM CURDIR (current directory). The generated .I Makefile.SH is then ran through .I /bin/sh to produce a .I Makefile. .PP .I Jmkmf is useful when you generate a makefile for the first time. .PP When ran without arguments, .I jmkmf will scan the directories upwards, looking for a .package file marking the top of your sources. It will then derive the top-level directory and the name of the current directory by itself. .PP Once you have a .I Makefile.SH generated by .I jmake, and have run Configure already, you can use .I make Makefile.SH to build the Makefile.SH again and .I make Makefile to run the Makefile.SH through .I /bin/sh. To use the recursive commands, you have to append an 's' at the end of the name as in .I make Makefiles.SH and .I make Makefiles. .SH AUTHOR Raphael Manfredi .SH FILES .PD 0 .TP 20 Jmakefile High level description of makefile .TP .package The file marking the top of your package tree .PD .SH "SEE ALSO" jmake(1), packinit(1). dist_3.5-36.001/jmake/fixcpp.SH0000755000175000017500000001236311474516061016236 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac REVISION=`grep REVISION $TOP/revision.h | head -n1 | cut -d' ' -f4` case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting jmake/fixcpp (with variable substitutions)" $spitshell >fixcpp <>fixcpp <<'!NO!SUBS!' while ($ARGV[0] =~ /^-/) { $_ = shift; last if /--/; $cpp_opt .= "$_ "; next unless s/-I//; push(@lookpath, $_); } ($file) = @ARGV; $counter = 0; # Counter for temporary files $SIG{'INT'} = 'PLUMBER'; # Install cleaner in case of an interrupt... $result = &process($file); # Process file, result in a temporary &cpp($result); # Pass resulting file with escaped \ to cpp unlink $result; exit 0; # Cleanup any temporary files... sub PLUMBER { warn "Could not cleanup all temporaries.\n" if @tmps != unlink(@tmps); exit 1; } # Compute a suitable temporary file name sub mktmp { $counter++; local($tmp) = "/tmp/jmk.$counter.$$"; push(@tmps, $tmp); # Keep track of them for &PLUMBER... $tmp; } # Process a given file, returning the name of the temporary file into which # the result is left over. # This routine is recursively called to process nested include directives. sub process { local($file) = @_; local(*FILE, *TMP); open(FILE, $file) || die "Can't read $file: $!\n"; local($tmpfile) = &mktmp; open(TMP, ">$tmpfile") || die "Can't create $tmpfile: $!\n"; local($here, $include); local($_); while () { if (s/^#\s*include\s*//) { # Ah, we found a #include something... chop; if (/"(\S+)"/) { ($include, $here) = ($1, 1); } elsif (/<(\S+)\>/) { ($include, $here) = ($1, 0); } else { warn "Ignoring unkown include directive $_.\n"; next; } local($incfile) = &lookup($include, $here); unless (defined $incfile) { warn "Can't locate include file $include.\n"; next; } $include = &process($incfile); # Recursively process this file &append($include, 'TMP'); # Append result to current tmp file unlink $include; } else { &escape; print TMP; } } close FILE; close TMP; $tmpfile; # Return name of file where results has been left over } # Perform necessary escaping work on current line. sub escape { # Don't escape trailing backslashes in macro definition or cpp # won't see them as macro continuation any longer, and also within # macro definitions, all those @@ or @! continuations... s/\\$/\\ \001/ unless /\@[!@]\\$/ || /^#define/; } # Append file to given (opened) file descriptor sub append { local($file, $fd) = @_; local(*FILE); open(FILE, $file) || die "Can't re-open $file: $!\n"; local($_); while () { &escape; print $fd $_; } close FILE; } # Lookup file, returning its located name or undef if not found. sub lookup { local($file, $here) = @_; unless ($here) { foreach $dir (@lookpath) { if (-r "$dir/$file") { # Use -r instead of -f for symlinks $file = "$dir/$file"; last; } } } return undef unless -r $file; $file; } # This is the final cpp processing. The output from cpp is filtered to un-escape # all the trailing backslashes. sub cpp { local($file) = @_; open(CPP, "$cpp $cpp_opt $file |") || die "Can't fork: $!\n"; while () { s/\\ \001$/\\/; # Un-escape trailing \ print STDOUT; } close CPP; } !NO!SUBS! chmod 755 fixcpp $eunicefix fixcpp dist_3.5-36.001/jmake/files/0002755000175000017500000000000012645366677015626 5ustar srivastasrivastadist_3.5-36.001/jmake/files/Jmake.tmpl0000644000175000017500000001726712512437533017545 0ustar srivastasrivasta/* * Generic jmake template * * $Id: Jmake.tmpl 183 2015-04-12 09:48:11Z rmanfredi $ * * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi * * You may redistribute only under the terms of the Artistic Licence, * as specified in the README file that comes with the distribution. * You may reuse parts of this distribution only within the terms of * that same Artistic Licence; a copy of which may be found at the root * of the source tree for dist 4.0. * * $Log: Jmake.tmpl,v $ * Revision 3.0.1.3 1997/02/28 14:56:16 ram * patch61: lex path can now be configured * * Revision 3.0.1.2 1995/01/11 14:50:21 ram * patch45: now pre-computes INSTALL and INSTALLDIR variables * * Revision 3.0.1.1 1993/08/20 07:36:36 ram * patch3: config.sh searching was not aborting properly * * Revision 3.0 1993/08/18 12:04:16 ram * Baseline for dist 3.0 netwide release. * */ : Makefile.SH generated from Jmake.tmpl and Jmakefile : $Id: Jmake.tmpl 183 2015-04-12 09:48:11Z rmanfredi $ /************************************************************************* * * * DO NOT MODIFY BELOW THIS LINE * * * *************************************************************************/ case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */#*) cd `expr X$0 : 'X\(.*\)/'` ;; esac |expand cur!CURDIR! CURRENT=!cur:^\./= -expand DIR=`echo $CURRENT/ | sed -e 's/\.\///g'` echo "Extracting ${DIR}Makefile (with variable substitutions)" /* * Variable pre-computation. */ ?INSTALL:INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'` ?INSTALLDIR:INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'` DATE=`date` /* * Makefile generation. */ $spitshell >Makefile <>Makefile <<'!NO!SUBS!' #include %MKDEP:|skip /* Skip if no depend target */ ;######################################################################## ;# Force 'make depend' to be performed first -- do not edit /* * The "all" target must appear first. Some "make" programs will otherwise * default to the .FORCE_DEPEND target if it was listed first, despite it * starting with a leading dot. */ all:: .FORCE_DEPEND .FORCE_DEPEND:: -skip /* Depend target */ ;######################################################################## ;# Start of Jmakefile #include ;######################################################################## ;# Common rules for all Makefiles -- do not edit /* * These need to be here so that rules in Jmakefile occur first; the blank * all is to make sure that an empty Jmakefile doesn't default to make clean. */ all:: CleanTarget() InstallTarget() /* * The installation of manual pages is optional. When they say "none" in * Configure, then they don't want any manual page and $installmansrc will * be empty. * * To avoid protecting all the jmake rules for an empty destination, we use * this clever hack: there is an "install.man-no" and an "install.man-yes" * target defined, where the first does nothing and the second triggers * the local install. The same goes for deinstall. * * If the `MANSRC' symbol is not wanted, then there is no manual page * and we can force the -no version of the targets. */ %MANSRC:|skip /* Skip if no manual targets */ !NO!SUBS! case "$installmansrc" in '') man=no;; *) man=yes;; esac $spitshell >>Makefile <>Makefile <<'!NO!SUBS!' -skip ?MANSRC:|skip /* Skip if it has manual targets */ maybe_install.man: install.man-no maybe_deinstall.man: deinstall.man-no -skip MakefileTarget() TagsTarget() /* * Empty rules in case there is no depend target. */ depend:: %SUBDIRS:|skip /* Skip if no sub-directories */ ;######################################################################## ;# Rules for building in sub-directories -- do not edit CommonSubdirsRule($(SUBDIRS)) InstallSubdirs() InstallManSubdirs() CleanSubdirs() TagSubdirs($(SUBDIRS)) MakefileSubdirs() MakeSubdirs() /* * Empty rules in case they don't define anything to be installed * in this directory. */ local_install:: local_install-strip:: local_deinstall:: local_install.man:: local_deinstall.man:: -skip /* Sub-directories */ ?SUBDIRS:|skip /* Skip if sub-directories */ ;######################################################################## ;# Empty rules for directories with no sub-directories -- do not edit local_install:: @echo "install in $(CURRENT) done." local_install-strip:: @echo "install (strip) in $(CURRENT) done." local_deinstall:: @echo "deinstall in $(CURRENT) done." local_install.man:: @echo "install.man in $(CURRENT) done." local_deinstall.man:: @echo "deinstall.man in $(CURRENT) done." /* * Action for 'Makefiles' would be required, if a .SUFFIXES: .SH rule * were added, because in that case, a "/bin/sh Makefiles.SH" would * be issued and raise an error. */ Makefiles:: Makefiles.SH:: -skip /* No sub-directories */ %local_depend%:|skip /* Skip if no local depend target */ ;######################################################################## ;# Dependencies generated by make depend ;# DO NOT DELETE THIS LINE -- make depend relies on it ;# Put nothing here or make depend will gobble it up .FORCE_DEPEND:: ?TOP: @echo "You haven't run a 'make depend' yet!"; exit 1 %TOP: @echo "You must run 'make depend' in $(TOP) first."; exit 1 -skip /* Depend target */ !NO!SUBS! chmod 644 Makefile $eunicefix Makefile dist_3.5-36.001/jmake/files/Jmake.rules0000644000175000017500000014753312517525151017722 0ustar srivastasrivasta;######################################################################## ;# Jmake rules for building libraries, programs, scripts, and data files ;# $Id: Jmake.rules 195 2015-04-27 21:30:17Z rmanfredi $ /* * MACHINE-INDEPENDENT RULES -- DO NOT MODIFY */ /* $Id: Jmake.rules 195 2015-04-27 21:30:17Z rmanfredi $ * * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi * * You may redistribute only under the terms of the Artistic Licence, * as specified in the README file that comes with the distribution. * You may reuse parts of this distribution only within the terms of * that same Artistic Licence; a copy of which may be found at the root * of the source tree for dist 4.0. * * $Log: Jmake.rules,v $ * Revision 3.0.1.7 2004/08/22 08:28:58 ram * patch71: random cleanup * * Revision 3.0.1.6 1997/02/28 14:56:01 ram * patch61: now handles USRINC for dependencies * patch61: smarter about dependencies computation * * Revision 3.0.1.5 1995/09/25 09:07:19 ram * patch59: smarter sed command to strip /usr/include dependencies * * Revision 3.0.1.4 1995/07/25 13:33:59 ram * patch56: install of script man pages can now cope with missing files * patch56: the clobber target now removes the .config directory as well * * Revision 3.0.1.3 1995/03/21 08:35:28 ram * patch52: suppressed extra argument to NormalProgramTarget call * * Revision 3.0.1.2 1995/01/11 14:49:55 ram * patch45: new macros ShellScriptTargetExt and SimpleShellScriptTargetExt * patch45: directory installation is now made via INSTALLDIR (Configure) * * Revision 3.0.1.1 1994/10/29 15:46:30 ram * patch36: added RemoteDependency rule * * Revision 3.0 1993/08/18 12:04:14 ram * Baseline for dist 3.0 netwide release. * */ /* Please, edit only with tabstops = 4 (":set ts=4" under vi) */ /* * AddedByConfigure: * Gives name of the files generated by Configure that can safely * be removed when a "make clobber" is issued. Not that it is useless * to name config.h or config.sh because these are already taken care * of by jmake. */ #define AddedByConfigure(files) @!\ local_clobber:: @@\ $(RM) files /* * AddSuffix: * Adds a sufix to the .SUFFIXES: list. */ #define AddSuffix(ext) @!\ |suffix ext /* * AllTarget: * Generate rules to build necessary things during make all. */ #define AllTarget(depends) @!\ all:: depends @!\ @!\ local_realclean:: @@\ $(RM) depends /* * AllTargetProgram: * Generate rules to build necessary things during make all. * This target is specific to executable. Use AllTarget() for * other type of files. */ #define AllTargetProgram(program) @!\ all:: program @!\ @!\ local_realclean:: @@\ $(RM) program^^$(_EXE) /* * RemoveTargetProgram: * This is used in some other macros in order to remove the target * before starting its building (saves disk space). There should be * no '@!' at the end of the '#define' line, because this macro is * used *inside* building rules. */ #define RemoveTargetProgram(program) \ -$(RM) program^^$(_EXE) @@\ if test -f program^^^$(_EXE); then \ @@\ $(MV) program^^^$(_EXE) program^^~^^^$(_EXE); fi /* * NormalProgramTarget: * Generate rules to compile and link the indicated program; since * it does not use any default object files, it may be used for * multiple programs in the same Jmakefile. */ #define NormalProgramTarget(program,sources,objects) @!\ ++OBJECTS objects @!\ ++SOURCES sources @!\ NormalObjectRule() @!\ AllTargetProgram(program) @!\ @!\ program: objects @@\ RemoveTargetProgram($@) @@\ $(CC) -o $@$(_EXE) objects $(JLDFLAGS) $(LIBS) @!\ /* * NormalProgramLibTarget: * Generate rules to compile and link the indicated program; since * it does not use any default object files, it may be used for * multiple programs in the same Jmakefile. * The ``libs'' argument is used to depend on locally built libraries, * in te same Jmakefile. */ #define NormalProgramLibTarget(program,sources,objects,libs) @!\ ++OBJECTS objects @!\ ++SOURCES sources @!\ NormalObjectRule() @!\ AllTargetProgram(program) @!\ @!\ program: objects libs @@\ RemoveTargetProgram($@) @@\ $(CC) -o $@$(_EXE) objects $(JLDFLAGS) libs $(LIBS) @!\ /* * SimpleProgramTarget: * Generate rules for compiling and linking programs that only have * one C source file. It should only be used in Jmakefiles that * describe a single program. */ #define SimpleProgramTarget(program) @!\ NormalProgramTarget(program,program.c,program.o) /* * ComplexProgramTarget: * Generate rules for compiling and linking the program specified by * $(OBJS) and $(SRCS), installing the program and its man page, and * generating dependencies. It should only be used in Jmakefiles * that describe a single program. */ #define ComplexProgramTarget(program) @!\ ++OBJECTS $(OBJS) @!\ ++SOURCES $(SRCS) @!\ NormalObjectRule() @!\ AllTargetProgram(program) @!\ @!\ program: $(OBJS) @@\ RemoveTargetProgram($@) @@\ $(CC) -o $@$(_EXE) $(OBJS) $(JLDFLAGS) $(LIBS) @!\ @!\ InstallProgram(program,$(BINDIR)) @!\ InstallManPage(program,$(MANSRC)) @!\ DependTarget() @!\ LintTarget() /* * ComplexProgramTarget_1: * Generate rules for compiling and linking the program specified by * $(OBJS1) and $(SRCS1), installing the program and its man page, * and generating dependencies for it and any programs described by * $(SRCS2) and $(SRCS3). It should be used to build the primary * program in Jmakefiles that describe multiple programs. */ #define ComplexProgramTarget_1(program) @!\ ++OBJECTS $(OBJS1) @!\ ++SOURCES $(SRCS1) @!\ NormalObjectRule() @!\ AllTargetProgram(program) @!\ @!\ program: $(OBJS1) @@\ RemoveTargetProgram($@) @@\ $(CC) -o $@$(_EXE) $(OBJS1) $(JLDFLAGS) $(LIBS) @!\ @!\ InstallProgram(program,$(BINDIR)) @!\ InstallManPage(program,$(MANSRC)) @!\ @!\ DependTarget() @!\ LintTarget() /* * ComplexProgramTarget_2: * Generate rules for compiling and linking the program specified by * $(OBJS2) and $(SRCS2) and installing the program and man page. * It should be used to build the second program in Jmakefiles * describing more than one program. */ #define ComplexProgramTarget_2(program) @!\ ++OBJECTS $(OBJS2) @!\ ++SOURCES $(SRCS2) @!\ NormalObjectRule() @!\ AllTargetProgram(program) @!\ @!\ program: $(OBJS2) @@\ RemoveTargetProgram($@) @@\ $(CC) -o $@$(_EXE) $(OBJS2) $(JLDFLAGS) $(LIBS) @!\ @!\ InstallProgram(program,$(BINDIR)) @!\ InstallManPage(program,$(MANSRC)) /* * ComplexProgramTarget_3: * Generate rules for compiling and linking the program specified by * $(OBJS3) and $(SRCS3) and installing the program and man page. It * should be used to build the third program in Jmakefiles describing * more than one program. */ #define ComplexProgramTarget_3(program) @!\ ++OBJECTS $(OBJS3) @!\ ++SOURCES $(SRCS3) @!\ NormalObjectRule() @!\ AllTargetProgram(program) @!\ @!\ program: $(OBJS3) @@\ RemoveTargetProgram($@) @@\ $(CC) -o $@$(_EXE) $(OBJS3) $(JLDFLAGS) $(LIBS) @!\ @!\ InstallProgram(program,$(BINDIR)) @!\ InstallManPage(program,$(MANSRC)) /* * ComplexShellManualTarget: * Builds manual pages that are to be extracted from .SH files into * .$manext files. */ #define ComplexShellManualTarget(manpages) @!\ ++MANPAGE manpages @!\ |once _ShellManualRule_ @!\ |rule:.SH.$manext: @!\ |rule: /bin/sh $< @!\ |rule: @!\ -once @!\ AddSuffix(.SH) @!\ AddSuffix(.$manext) @!\ AllTarget(manpages) @!\ @!\ local_install.man:: @@\ _MakeInstallDirIgnore($(MANSRC)) \ @@\ for file in manpages; do \ @@\ (set -x; $(INSTALL) -c -m 444 $$file \ @@\ $(INSTALL_PREFIX)$(MANSRC)) || exit 1; \ @@\ done @!\ @!\ local_deinstall.man:: @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ for file in manpages; do \ @@\ (set -x; $(RM) $(INSTALL_PREFIX)$(MANSRC)/$$file); \ @@\ done /* * Initialize: * Puts the line symbol = value in the initialization section of * Makefile.SH (the one that is subject to parameter substitutions). */ #define Initialize(symbol,value) @!\ +symbol = value /* * InstallLibrary: * Generate rules to install the indicated library. */ #define InstallLibrary(libname,dest) @!\ local_install local_install-strip:: lib^^libname.a @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 644 lib^^libname.a $(INSTALL_PREFIX)^^^dest @@\ $(RANLIB) dest/lib^^libname.a @@\ chmod 444 dest/lib^^libnane.a @!\ @!\ local_deinstall:: @@\ $(RM) $(INSTALL_PREFIX)^^^dest/lib^^libname.a /* * InstallSharedLibrary: * Generate rules to install the shared library. */ #define InstallSharedLibrary(libname,rev,dest) @!\ local_install local_install-strip:: lib^^libname.so.rev @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 444 lib^^libname.so.rev $(INSTALL_PREFIX)^^^dest @!\ @!\ local_deinstall:: @@\ $(RM) $(INSTALL_PREFIX)^^^dest/lib^^libname.so.rev /* * InstallSharedLibraryData: * Generate rules to install the shared library data */ #define InstallSharedLibraryData(libname,rev,dest) @!\ local_install local_install-strip:: lib^^libname.sa.rev @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 444 lib^^libname.sa.rev $(INSTALL_PREFIX)^^^dest @!\ @!\ local_deinstall:: @@\ $(RM) $(INSTALL_PREFIX)^^^dest/lib^^libname.sa.rev /* * InstallLibraryAlias: * Generate rules to create a link from one library name to another * for the purposes of aliasing. */ #define InstallLibraryAlias(libname,alias,dest) @!\ local_install local_install-strip:: lib^^libname.a @@\ $(RM) lib^^alias.a @@\ -(cd dest; $(LN) lib^^libname.a lib^^alias.a) @!\ @!\ local_deinstall:: @@\ $(RM) dest/lib^^alias.a /* * InstallLintLibrary: * Generate rules to install the indicated lint library. */ #define InstallLintLibrary(libname,dest) @!\ install.ln:: llib-l^^libname.ln @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 444 llib-l^^libname.ln $(INSTALL_PREFIX)^^^dest @!\ @!\ deinstall.ln:: @@\ $(RM) $(INSTALL_PREFIX)^^^dest/llib-l^^libname.ln /* * InstallManPageLong: * Generate rules to install the indicated manual page, giving it an * alternate name. This is used for installing man pages whose base * name without the .man suffix would normally be longer than 8 * characters (the limit for using source code control systems on * files systems with short file names). */ #define InstallManPageLong(file,destdir,dest) @!\ local_install.man:: file.man @@\ _MakeInstallDirIgnore(destdir) \ @@\ $(INSTALL) -c -m 444 file.man $(INSTALL_PREFIX)^^^destdir/dest.$(L) @!\ @!\ local_deinstall.man:: @@\ $(RM) $(INSTALL_PREFIX)^^^destdir/dest.$(L) @!\ /* * InstallManPage: * Generate rules to install the indicated manual page. */ #define InstallManPage(file,dest) @!\ InstallManPageLong(file,dest,file) /* * InstallNonExec: * Generate rules to install a data file using any special * install flags. */ #define InstallNonExec(file,dest) @!\ local_install local_install-strip:: file @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 444 file $(INSTALL_PREFIX)^^^dest @!\ @!\ local_deinstall:: @@\ $(RM) $(INSTALL_PREFIX)^^^dest/file /* * InstallProgramWithFlags: * Generate rules to install an executable program using given * install flags. * By default, program is not stripped, but the install-strip target * will force stripping. */ #define InstallProgramWithFlags(program,dest,flags) @!\ local_install:: program @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 555 flags program^^^$(_EXE) $(INSTALL_PREFIX)^^^dest @!\ @!\ local_install-strip:: program @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -s -m 555 flags program^^^$(_EXE) $(INSTALL_PREFIX)^^^dest @!\ @!\ local_deinstall:: @@\ $(RM) $(INSTALL_PREFIX)^^^dest/program^^^$(_EXE) /* * InstallProgramNoStripWithFlags: * Generate rules to install an executable program using given * install flags. The program is never stripped. */ #define InstallProgramNoStripWithFlags(program,dest,flags) @!\ local_install local_install-strip:: program @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 555 flags program^^^$(_EXE) $(INSTALL_PREFIX)^^^dest @!\ @!\ local_deinstall:: @@\ $(RM) $(INSTALL_PREFIX)^^^dest/program^^^$(_EXE) /* * InstallProgram: * Generate rules to install an executable program using any special * install flags set in $(INSTALLFLAGS). * By default, program is not stripped, but the install-strip target * will force stripping. */ #define InstallProgram(program,dest) @!\ InstallProgramWithFlags(program,dest,^^) /* * InstallProgramNoStrip: * Generate rules to install an executable program using any special * install flags set in $(INSTALLFLAGS), but without stripping the * executable from debugging symbols. */ #define InstallProgramNoStrip(program,dest) @!\ InstallProgramNoStripWithFlags(program,dest,^^) /* * InstallScriptWithFlags: * Generate rules to install an executable script using given * install flags. */ #define InstallScriptWithFlags(script,dest,flags) @!\ local_install local_install-strip:: script @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 555 flags script $(INSTALL_PREFIX)^^^dest @!\ @!\ local_deinstall:: @@\ $(RM) $(INSTALL_PREFIX)^^^dest/script /* * InstallScript: * Generate rules to install an executable script using any special * install flags set in $(INSTALLFLAGS). */ #define InstallScript(script,dest) @!\ InstallScriptWithFlags(script,dest,^^) /* * InstallScripts: * Generate rules to install all the scripts listed in the generated * $(SCRIPTS) and $(LSCRIPTS) macros. */ #define InstallScripts() @!\ |once _InstallScripts_ @!\ local_install local_install-strip:: $(SCRIPTS) $(LSCRIPTS) @@\ _MakeInstallDirIgnore($(SCRIPTDIR)) \ @@\ for file in $(SCRIPTS) $(LSCRIPTS); do \ @@\ (set -x; \ @@\ $(INSTALL) -c -m 555 $$file $(INSTALL_PREFIX)$(SCRIPTDIR)) || \ @@\ exit 1; \ @@\ done @!\ @!\ local_deinstall:: @@\ @for file in $(SCRIPTS) $(LSCRIPTS); do \ @@\ case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ (set -x; $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/$$file); \ @@\ done @!\ -once /* * InstallManScripts: * Generate rule to install/deinstall manual pages for scripts listed * in the automatically generated $(SCRIPTS) macro. */ #define InstallManScripts() @!\ |once _InstallManScripts_ @!\ ?NOMAN:|skip @!\ local_install.man:: @@\ _MakeInstallDirIgnore($(MANSRC)) \ @@\ for file in $(SCRIPTS); do \ @@\ if test -f $$file.man; then \ @@\ (set -x; \ @@\ $(INSTALL) -c -m 444 $$file.man \ @@\ $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)) || \ @@\ exit 1; \ @@\ fi; \ @@\ done @!\ @!\ local_deinstall.man:: @@\ case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ for file in $(SCRIPTS); do \ @@\ (set -x; $(RM) $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)); \ @@\ done @!\ @!\ -skip @!\ -once /* * LinkFileList: * Link a list of list of files from one place to another */ #define LinkFileList(step,list,dir,sub) @!\ step:: list @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ echo " cd" dir; cd dir; for i in list; do (set -x; $(LN) sub/$$i .); done /* * InstallMultipleDestFlags: * Generate rules to install multiple files at once during a particular * step in the build using a specific set of install flags. */ #define InstallMultipleDestFlags(step,list,dest,flags) @!\ step:: list @@\ _MakeInstallDirIgnore(dest) \ @@\ for i in list; do \ @@\ (set -x; $(INSTALL) -c flags \ @@\ $$i $(INSTALL_PREFIX)^^^dest) || exit 1;\ @@\ done /* * DeinstallMultipleDest: * Generate rules to deinstall multiple files at once during a particular * step in the build. */ #define DeinstallMultipleDest(step,list,dest) @!\ step:: @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ for i in list; do \ @@\ (set -x; $(RM) $(INSTALL_PREFIX)^^^dest/$$i); \ @@\ done /* * InstallMultiple: * Generate rules to install multiple files at once during the install * step of the build using any install flags set in $(INSTALLFLAGS) * and deinstall them. */ #define InstallMultiple(list,dest) @!\ InstallMultipleDestFlags(local_install,list,dest,$(INSTALLFLAGS)) @!\ DeinstallMultipleDest(local_deinstall,list,dest) /* * InstallMultipleFlags: * Generate rules to install multiple files at once during the * install step of the build using the given install flags. */ #define InstallMultipleFlags(list,dest,flags) @!\ InstallMultipleDestFlags(local_install,list,dest,flags) @!\ DeinstallMultipleDest(local_deinstall,list,dest) /* * InstallMultipleMan: * Generate rules to install a variety of manual pages * during the install.man step of the build. */ #define InstallMultipleMan(list,dest) @!\ InstallMultipleDestFlags(local_install.man,list,dest,$(INSTALLFLAGS)) @!\ DeinstallMultipleDest(local_deinstall.man,list,dest) /* * DependDependency: * Generate rules to build the makedepend program. */ #define DependDependency() @!\ local_depend:: TOPDIR/mkdep @!\ @!\ TOPDIR/mkdep: @!\ ?TOP: @echo "You have to run Configure first."; exit 1 @!\ %TOP: @echo "You have to run Configure in $(TOP) first."; exit 1 /* * DependTarget: * Generate rules to compute dependencies for all files listed * in $(SOURCES) (automatically generated macro). */ #define DependTarget() @!\ +USRINC = $usrinc @!\ |once _DependTarget_ @!\ DependDependency() @!\ @!\ depend:: local_depend @!\ local_depend:: @@\ ($(SED) '/^# DO NOT DELETE/q' Makefile && \ @@\ $(MKDEP) $(SOURCES) | \ @@\ $(SED) -e 's:/usr/lib[^ ]*::g; s:$(USRINC)[^ ]*::g; ' \ @@\ -e '/: / b print' -e '$$ b print' -e 'H; d; n; : print' \ @@\ -e 'x; s/\\$$//; s/\\\n//g; s/ ^^ */ /g; s/ :/:/;' -e '/: *$$/d' \ @@\ ) > Makefile.new @@\ cp Makefile Makefile.bak @@\ cp Makefile.new Makefile @@\ $(RM) Makefile.new @!\ @!\ -once /* * CleanTarget: * Generate rules to remove any garbage files. */ #define CleanTarget() @!\ ?SUBDIRS:clean: sub_clean local_clean @!\ %SUBDIRS:clean: local_clean @!\ ?SUBDIRS:realclean: sub_realclean local_realclean @!\ %SUBDIRS:realclean: local_realclean @!\ ?SUBDIRS:clobber: sub_clobber local_clobber @!\ %SUBDIRS:clobber: local_clobber @!\ @!\ local_clean:: @@\ if test -f core; then $(RM) core; fi @@\ $(RM) *~ *.o @!\ @!\ local_realclean:: local_clean @!\ ?TOP: $(RM) -r UU @!\ @!\ local_clobber:: local_realclean @!\ %TOP: $(RM) Makefile config.sh @!\ ?TOP: $(RM) config.sh config.h @!\ ?TOP: $(RM) -r .config @!\ ?TOP: $(RM) Makefile @!\ /* * InstallTarget: * Generate rules to recursively install files */ #define InstallTarget() @!\ ?SUBDIRS:install:: local_install sub_install @!\ %SUBDIRS:install:: local_install @@\ @exit 0 @!\ @!\ ?SUBDIRS:install-strip:: local_install-strip sub_install-strip @!\ %SUBDIRS:install-strip:: local_install-strip @@\ @exit 0 @!\ @!\ ?SUBDIRS:install.man:: maybe_install.man sub_install.man @!\ %SUBDIRS:install.man:: maybe_install.man @!\ ?SUBDIRS:deinstall:: sub_deinstall local_deinstall @!\ %SUBDIRS:deinstall:: local_deinstall @!\ ?SUBDIRS:deinstall.man:: sub_deinstall.man maybe_deinstall.man @!\ %SUBDIRS:deinstall.man:: maybe_deinstall.man @!\ @!\ ?MANSRC:install.man-yes: local_install.man @!\ install.man-no: @!\ ?MANSRC:deinstall.man-yes: local_deinstall.man @!\ deinstall.man-no: @!\ /* * TagsTarget: * Generate rules to compute tags files for C source code. */ #define TagsTarget() @!\ tags:: @@\ $(CTAGS) -w *.[ch] @@\ $(CTAGS) -xw *.[ch] > tags @!\ @!\ local_clobber:: @@\ $(RM) tags /* * BuildMakefileSH: * Generate rules to build a Makefile.SH from an Jmakefile and any * special jmake flags. This is generally done automatically by the * template or by any special Jmakefiles. * This function will simply touch Makefile.SH if no $(TOP)/.package * exists, assuming the Jmakefile is not in a production environment. */ #define BuildMakefileSH(jmakeflags) @!\ Makefile.SH: Jmakefile @@\ -@if test -f $(TOP)/.package; then \ @@\ if test -f Makefile.SH; then \ @@\ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ @@\ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ @@\ fi; \ @@\ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" jmakeflags; \ @@\ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) jmakeflags; \ @@\ else touch $@; fi /* * BuildMakefile: * Generate rules to build a Makefile from a Makefile.SH. */ #define BuildMakefile() @!\ Makefile: Makefile.SH @@\ /bin/sh Makefile.SH /* * MakefileTarget: * Generate rules to build a normal Makefile. */ #define MakefileTarget() @!\ BuildMakefileSH(^^) @!\ BuildMakefile() /* * NormalObjectRule: * Generate make rule to build usual object files. */ #define NormalObjectRule() @!\ |once _ObjectRule_ @!\ |rule:.c.o: @!\ |rule: $(CC) -c $(JCFLAGS) $< @!\ |rule: @!\ -once /* * NormalLibraryObjectRule: * Generate make rules to build "normal" objects. */ #define NormalLibraryObjectRule() @!\ |once _ObjectRule_ @!\ |rule:.c.o: @!\ |rule: $(RM) $@ @!\ |rule: $(CC) -c $(JCFLAGS) $< @!\ |rule: @!\ -once /* * ProfiledLibraryObjectRule: * Generate make rules to build both profiled and "normal" objects. */ #define ProfiledLibraryObjectRule() @!\ all:: @@\ @if [ ! -d profiled ]; then mkdir profiled; fi @!\ @!\ |rule:.c.o: @!\ |rule: $(RM) $@ profiled/$@ @!\ |rule: $(CC) -pg -c $(JCFLAGS) $*.c @!\ |rule: $(MV) $*.o profiled/$*.o @!\ |rule: $(CC) -c $(JCFLAGS) $*.c @!\ |rule: @!\ local_clean:: @@\ -@if [ -d profiled ]; then echo " $(RM) profiled/?*.o"; \ @@\ $(RM) profiled/?*.o; fi /* * DebuggedLibraryObjectRule: * Generate make rules to build both debuggable and "normal" * objects. */ #define DebuggedLibraryObjectRule() @!\ all:: @@\ @if [ ! -d debugger ]; then mkdir debugger; fi @!\ @!\ |rule:.c.o: @!\ |rule: $(RM) $@ debugger/$@ @!\ |rule: $(CC) -g -c $(JCFLAGS) $*.c @!\ |rule: $(MV) $*.o debugger/$*.o @!\ |rule: $(CC) -c $(JCFLAGS) $*.c @!\ |rule: @!\ local_clean:: @@\ -@if [ -d debugger ]; then echo " $(RM) debugger/?*.o"; \ @@\ $(RM) debugger/?*.o; fi /* * DebuggedAndProfiledLibraryOjbectRule: * Generate make rules to build debuggable, profiled, and "normal" * objects. */ #define DebuggedAndProfiledLibraryObjectRule() @!\ all:: @@\ @if [ ! -d profiled ]; then mkdir profiled; fi @@\ @if [ ! -d debugger ]; then mkdir debugger; fi @!\ @!\ |rule:.c.o: @!\ |rule: $(RM) $@ profiled/$@ debugger/$@ @!\ |rule: $(CC) -pg -c $(JCFLAGS) $*.c @!\ |rule: $(MV) $*.o profiled/$*.o @!\ |rule: $(CC) -g -c $(JCFLAGS) $*.c @!\ |rule: $(MV) $*.o debugger/$*.o @!\ |rule: $(CC) -c $(JCFLAGS) $*.c @!\ |rule: @!\ local_clean:: @@\ -@if [ -d profiled ]; then echo " $(RM) profiled/?*.o"; \ @@\ $(RM) profiled/?*.o; fi @@\ -@if [ -d debugger ]; then echo " $(RM) debugger/?*.o"; \ @@\ $(RM) debugger/?*.o; fi /* * SharedLibraryObjectRule: * Generate make rules to build shared and "normal" object files. */ #define SharedLibraryObjectRule() @!\ all:: @@\ @if [ ! -d shared ]; then mkdir shared; fi @!\ @!\ |rule:.c.o: @!\ |rule: $(RM) $@ shared/$@ @!\ |rule: $(CC) -pic -c $(SHAREDCODEDEF) $(SHLIBDEF) $(JCFLAGS) $*.c @!\ |rule: $(MV) $*.o shared/$*.o @!\ |rule: $(CC) -c $(SHLIBDEF) $(JCFLAGS) $*.c @!\ |rule: @!\ local_clean:: @@\ -@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \ @@\ $(RM) shared/?*.o; fi /* * SharedAndDebuggedLibraryObjectRule: * Generate make rules to build shared, debuggable, and "normal" * object files. */ #define SharedAndDebuggedLibraryObjectRule() @!\ all:: @@\ @if [ ! -d shared ]; then mkdir shared; fi @@\ @if [ ! -d debugger ]; then mkdir debugger; fi @!\ @!\ |rule:.c.o: @!\ |rule: $(RM) $@ shared/$@ debugger/$@ @!\ |rule: $(CC) -pic -c $(SHAREDCODEDEF) $(SHLIBDEF) $(JCFLAGS) $*.c @!\ |rule: $(MV) $*.o shared/$*.o @!\ |rule: $(CC) -g -c $(SHLIBDEF) $(JCFLAGS) $*.c @!\ |rule: $(MV) $*.o debugger/$*.o @!\ |rule: $(CC) -c $(SHLIBDEF) $(JCFLAGS) $*.c @!\ |rule: @!\ local_clean:: @@\ -@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \ @@\ $(RM) shared/?*.o; fi @@\ -@if [ -d debugger ]; then echo " $(RM) debugger/?*.o"; \ @@\ $(RM) debugger/?*.o; fi /* * SpecialSharedAndDebuggedObjectRule: * Generate rules to compile a file with special flags and to make * shared and debuggable versions. */ #define SpecialSharedAndDebuggedObjectRule(objs,depends,options) @!\ all:: @@\ @if [ ! -d shared ]; then mkdir shared; fi @@\ @if [ ! -d debugger ]; then mkdir debugger; fi @!\ @!\ objs: depends @@\ $(RM) $@ shared/$@ debugger/$@ @@\ $(CC) -pic -c $(SHAREDCODEDEF) $(SHLIBDEF) $(JCFLAGS) options $*.c @@\ $(MV) $*.o shared/$*.o @@\ $(CC) -g -c $(SHLIBDEF) $(JCFLAGS) options $*.c @@\ $(MV) $*.o debugger/$*.o @@\ $(CC) -c $(SHLIBDEF) $(JCFLAGS) options $*.c /* * SpecialSharedObjectRule: * Generate rules to compile a file with special flags and to make * shared and debuggable versions. */ #define SpecialSharedObjectRule(objs,depends,options) @!\ all:: @@\ @if [ ! -d shared ]; then mkdir shared; fi @!\ @!\ objs: depends @@\ $(RM) $@ shared/$@ @@\ $(CC) -pic -c $(SHAREDCODEDEF) $(SHLIBDEF) $(JCFLAGS) options $*.c @@\ $(MV) $*.o shared/$*.o @@\ $(CC) -c $(SHLIBDEF) $(JCFLAGS) options $*.c /* * SpecialObjectRule: * Generate rules to compile a file with special flags. */ #define SpecialObjectRule(objs,depends,options) @!\ objs: depends @@\ $(RM) $@ @@\ $(CC) -c $(JCFLAGS) options $*.c /* * SpecialProfiledObjectRule: * Generate rules to compile a file with special flags and to make a * profiled version. */ #define SpecialProfiledObjectRule(objs,depends,options) @!\ all:: @@\ @if [ ! -d profiled ]; then mkdir profiled; fi @!\ @!\ objs: depends @@\ $(RM) $@ profiled/$@ @@\ $(CC) -pg -c $(JCFLAGS) options $*.c @@\ $(MV) $*.o profiled/$*.o @@\ $(CC) -c $(JCFLAGS) options $*.c /* * SpecialDebuggedObjectRule: * Generate rules to compile a file with special flags and to make a * debuggable version. */ #define SpecialDebuggedObjectRule(objs,depends,options) @!\ all:: @@\ @if [ ! -d debugger ]; then mkdir debugger; fi @!\ @!\ objs: depends @@\ $(RM) $@ debugger/$@ @@\ $(CC) -g -c $(JCFLAGS) options $*.c @@\ $(MV) $*.o debugger/$*.o @@\ $(CC) -c $(JCFLAGS) options $*.c /* * SpecialDebuggedAndProfiledObjectRule: * Generate rules to compile a file with special flags and to make * debuggable and profiled versions. */ #define SpecialDebuggedAndProfiledObjectRule(objs,depends,options) @!\ all:: @@\ @if [ ! -d profiled ]; then mkdir profiled; fi @@\ @if [ ! -d debugger ]; then mkdir debugger; fi @!\ @!\ objs: depends @@\ $(RM) $@ profiled/$@ debugger/$@ @@\ $(CC) -pg -c $(JCFLAGS) options $*.c @@\ $(MV) $*.o profiled/$*.o @@\ $(CC) -g -c $(JCFLAGS) options $*.c @@\ $(MV) $*.o debugger/$*.o @@\ $(CC) -c $(JCFLAGS) options $*.c /* * NormalLibraryTarget: * Generate rules to create a library. The 'srclist' and 'objlist' * parameters are added to SOURCES and OBJECTS macros. The 'srclist' * is not otherwise used by this rule, but is necessary for make depend. */ #define NormalLibraryTarget(libname,srclist,objlist) @!\ ++OBJECTS objlist @!\ ++SOURCES srclist @!\ NormalLibraryObjectRule() @!\ AllTarget(lib^^libname.a) @!\ @!\ lib^^libname.a: objlist @@\ $(RM) $@ @@\ $(AR) $@ objlist @@\ $(RANLIB) $@ /* * NormalSharedLibraryTarget: * Generate rules to create a shared library; build it into a * different name so that the we don't hose people by having the * library gone for long periods. */ #define NormalSharedLibraryTarget(libname,rev,solist) @!\ AllTarget(lib^^libname.so.rev) @!\ @!\ lib^^libname.so.rev: solist @@\ $(RM) $@~ @@\ (cd shared; $(LD) -o ../$@~ -assert pure-text solist) @@\ $(RM) $@ @@\ $(MV) $@~ $@ /* * NormalSharedLibraryDataTarget: * Generate rules to create shlib data file; build it into a * different name so that the we don't hose people by having the * library gone for long periods. */ #define NormalSharedLibraryDataTarget(libname,rev,salist) @!\ AllTarget(lib^^libname.sa.rev) @!\ @!\ lib^^libname.sa.rev: salist @@\ $(RM) $@ @@\ $(AR) $@ salist @@\ $(RANLIB) $@ /* * NormalLibraryTarget2: * Generate rules to create a library in two steps. This is used to * create libraries with large numbers of files. */ #define NormalLibraryTarget2(libname,srclist,objlist1,objlist2) @!\ ++SOURCES srclist @!\ ++OBJECTS objlist1 @!\ ++OBJECTS objlist2 @!\ NormalLibraryObjectRule() @!\ AllTarget(lib^^libname.a) @!\ @!\ lib^^libname.a: objlist1 objlist2 @@\ $(RM) $@ @@\ $(AR) $@ objlist1 @@\ $(AR) $@ objlist2 @@\ $(RANLIB) $@ /* * ProfiledLibraryTarget: * Generate rules to create a profiled library. */ #define ProfiledLibraryTarget(libname,srclist,objlist) @!\ ++SOURCES srclist @!\ ++OBJECTS objlist @!\ AllTarget(lib^^libname^^_p.a) @!\ @!\ lib^^libname^^_p.a: objlist @@\ $(RM) $@ @@\ cd profiled; $(AR) ../$@ objlist @@\ $(RANLIB) $@ /* * DebuggedLibraryTarget: * Generate rules to create a debuggable library. */ #define DebuggedLibraryTarget(libname,srclist,objlist) @!\ ++SOURCES srclist @!\ ++OBJECTS objlist @!\ AllTarget(lib^^libname^^_d.a) @!\ @!\ lib^^libname^^_d.a: objlist @@\ $(RM) $@ @@\ cd debugger; $(AR) ../$@ objlist @@\ $(RANLIB) $@ /* * AliasedLibraryTarget: * Generate rules to link one library to another. */ #define AliasedLibraryTarget(libname,alias) @!\ AllTarget(lib^^alias.a) @!\ @!\ lib^^alias.a: lib^^libname.a @@\ $(RM) $@ @@\ $(LN) lib^^libname.a $@ /* * PrelinkedRelocatableTarget: * Generate rules to produce a relocatable object file instead of a * library. */ #define PrelinkedRelocatableTarget(objname,objlist,libs) @!\ AllTarget(objname.o) @!\ @!\ objname.o: objlist @@\ $(RM) $@ @@\ $(LD) $(JLDFLAGS) -r objlist -o $@ libs /* * NormalObjectTarget: * Generate rules to produce a single object file.o from a file.c. */ #define NormalObjectTarget(file) @!\ ++SOURCES file^^.c @!\ AllTarget(file^^.o) @!\ NormalObjectRule() /* * NormalRelocatableTarget: * Generate rules to produce a relocatable object file instead of a * library. */ #define NormalRelocatableTarget(objname,objlist) @!\ AllTarget(objname.o) @!\ @!\ objname.o: objlist @@\ $(RM) $@ @@\ $(LD) $(JLDFLAGS) -r objlist -o $@ /* * ProfiledRelocatableTarget: * Generate rules to produce a profiled relocatable object file * instead of a library. */ #define ProfiledRelocatableTarget(objname,objlist) @!\ AllTarget(objname^^_p.o) @!\ @!\ objname^^_p.o: objlist @@\ $(RM) $@ @@\ $(LD) -X -r objlist -o $@ /* * DebuggedRelocatableTarget: * Generate rules to produce a debuggable relocatable object file * instead of a library. */ #define DebuggedRelocatableTarget(objname,objlist) @!\ AllTarget(objname^^_d.o) @!\ @!\ objname^^_d.o: objlist @@\ $(RM) $@ @@\ $(LD) -X -r objlist -o $@ /* * LintLibraryTarget: * Generate rules to create a lint library. Note that the lint * library is always forced to be newer than the library itself. */ #define LintLibraryTarget(libname,srclist) @!\ lintlib:: llib-l^^libname.ln @!\ @!\ llib-l^^libname.ln: srclist @@\ $(RM) $@ @@\ $(LINT) $(LINTLIBFLAG)^^libname $(LINTFLAGS) srclist /* * NormalLintTarget: * Generate rules to lint a set of sources. */ #define NormalLintTarget(srclist) @!\ lint: @@\ $(LINT) $(LINTFLAGS) srclist $(LINTLIBS) /* * LintTarget: * Generate rules to lint $(SOURCES) (automatically generated) */ #define LintTarget() @!\ |once _LintTarget_ @!\ NormalLintTarget($(SOURCES)) @!\ -once /* * LinkSourceFile: * Snag source file from some other directory */ #define LinkSourceFile(src,dir) @!\ src: dir/src @@\ $(RM) -f $@ @@\ $(LN) $? $@ @!\ @!\ local_depend:: src @@\ @!\ local_realclean:: @@\ $(RM) -f src @!\ /* * LinkSourceFileAlias: * Snag source file from some other directory with a different local name. */ #define LinkSourceFileAlias(src,dir,alias) @!\ alias: dir/src @@\ $(RM) -f $@ @@\ $(LN) $? $@ @!\ @!\ local_depend:: alias @@\ @!\ local_realclean:: @@\ $(RM) -f alias @!\ /* * MakeSubincludesForBuild: * Make includes in sub directories. */ #define MakeSubincludesForBuild(step,dir,srclist) @!\ step:: dir srclist @@\ @-(list=`echo srclist | sed -e 's/[^ ]*\///g'`; \ @@\ set -x; cd dir; $(RM) $$list) @@\ @for i in srclist; do \ @@\ (set -x; cd dir; $(LN) ../$$i .) || exit 1; \ @@\ done @!\ @!\ MakeDirectories(dir,dir) @!\ @!\ local_realclean:: @@\ @-(if [ -d dir ]; then \ @@\ list=`echo srclist | sed -e 's/[^ ]*\///g'`; \ @@\ set -x; cd dir; $(RM) $$list; fi) /* * CommonSubdirsRule: * Rule for making $(TARGET) in every subdirectory, with $(VERB) as * verbose message and $(FLAGS) as additional flags. */ #define CommonSubdirsRule(dirs) @!\ subdirs: @@\ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ @@\ for i in dirs ;\ @@\ do \ @@\ (cd $$i ; echo "$(VERB) in $(DIR)$$i..."; \ @@\ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \ @@\ done /* * NamedTargetSubdirsRule: * Recursively make a series of steps in the specified directories. */ #define NamedTargetSubdirsRule(dirs,name,verb,flags) @!\ name:: @@\ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ @@\ for i in dirs ;\ @@\ do \ @@\ (cd $$i ; echo verb "in $(DIR)$$i..."; \ @@\ $(MAKE) $(MFLAGS) flags name) || exit 1; \ @@\ done /* * NamedTargetSubdirsAsRule: * Recursively make a series of steps in the specified directories, * where the name of the local rule is different from the recursive * actions. */ #define NamedTargetSubdirsAsRule(dirs,localname,name,verb,flags) @!\ localname:: @@\ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ @@\ for i in dirs ;\ @@\ do \ @@\ (cd $$i ; echo verb "in $(DIR)$$i..."; \ @@\ $(MAKE) $(MFLAGS) flags name) || exit 1; \ @@\ done /* * NamedTargetSubdirs: * Recursively make a series of steps. */ #define NamedTargetSubdirs(name,verb,flags) @!\ name:: @@\ @$(MAKE) subdirs TARGET=name VERB=verb FLAGS=flags /* * NamedSubTargetSubdirs: * Recursively make a series of steps, like NamedTargetSubdirs. * However, the supplied "name" has "sub_" prefixed to it. */ #define NamedSubTargetSubdirs(name,verb,flags) @!\ sub_^^^name:: @@\ @$(MAKE) subdirs TARGET=name VERB=verb FLAGS=flags /* * NamedDepthTargetSubdirs: * Recursively make a series of steps. We first enter the * subdirectories, then perform the local entries. * The supplied "name" has "sub_" prefixed to it. */ #define NamedDepthTargetSubdirs(name,verb,flags) @!\ sub_^^^name:: @@\ @$(MAKE) subdirs TARGET=name VERB=verb FLAGS=flags @@\ @echo "Back to $(CURRENT) for "name^^... /* * MakeSubdirs: * Generate rules to do makes in the given subdirectories. */ #define MakeSubdirs() \ NamedTargetSubdirs(all,"Making all",^^) /* * DependDirs: * Generate rules to recursively compute dependencies as part of the * make depend step. */ #define DependDirs(dirs) \ depend:: sub_depend @!\ NamedTargetSubdirsAsRule(dirs,sub_depend,depend,"Depending",^^) /* * DependSubdirs: * Generate rules to recursively compute dependencies as part of the * make depend step. */ #define DependSubdirs() \ DependDirs($(SUBDIRS)) /* * InstallSubdirs: * Generate rules to recursively install and deinstall programs and * files. */ #define InstallSubdirs() \ NamedSubTargetSubdirs(install,"Installing",^^) @!\ NamedSubTargetSubdirs(install-strip,"Installing (strip)",^^) @!\ NamedDepthTargetSubdirs(deinstall,"Deinstalling",^^) /* * InstallManSubdirs: * Generate rules to recursively install and deinstall manual pages. */ #define InstallManSubdirs() \ NamedSubTargetSubdirs(install.man,"Installing man pages",^^) @!\ NamedDepthTargetSubdirs(deinstall.man,"Deinstalling man pages",^^) /* * IncludesSubdirs: * Generate rules to recursively put include files in build */ #define IncludesSubdirs() \ NamedTargetSubdirs(includes,including,^^) /* * CleanSubdirs: * Generate rules to recursively clean out garbage files. */ #define CleanSubdirs() \ NamedDepthTargetSubdirs(clean,"Cleaning",^^) @!\ NamedDepthTargetSubdirs(realclean,"Real cleaning",^^) @!\ NamedDepthTargetSubdirs(clobber,"Clobbering",^^) /* * TagSubdirs: * Generate rules to recursively create tags files. */ #define TagSubdirs(dirs) \ NamedTargetSubdirsRule(dirs,tag,"Tagging",^^) /* * MakeLintSubdirs: * Generate rules to recursively lint directories as part of the * named step. */ #define MakeLintSubdirs(dirs,target) \ NamedTargetSubdirsRule(dirs,target,"Linting",^^) /* * LintDirs: * Generate rules to recursively lint directories as part of the * make lint step. */ #define LintDirs(dirs) \ MakeLintSubdirs(dirs,lint) /* * LintSubdirs: * Generate rules to recursively lint directories as part of the * make lint step. */ #define LintSubdirs() \ LintDirs($(SUBDIRS)) /* * MakeDirs: * Creates a set of directories, even if some directories in the path * do not already exist. There should be no '@!' at the end of the * '#define' line, because this macro is used *inside* building rules. */ #define MakeDirs(dirs) \ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ for dir in dirs; do \ @@\ (set -x; test -d $$dir || $(INSTALLDIR) $$dir) || \ @@\ exit 1; \ @@\ done /* * _MakeInstallDirs: * Creates a set of intall directories, even if some directories in the path * do not already exist. There should be no '@!' at the end of the * '#define' line, because this macro is used *inside* building rules. */ #define _MakeInstallDirs(dirs) \ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ for dir in dirs; do \ @@\ _MakeInstallDir($$dir) \ @@\ done /* * _MakeInstallDir: * Internal macro to create a missing install directory. */ #define _MakeInstallDir(dir) \ (set -x; test -d $(INSTALL_PREFIX)^^^dir || \ @@\ $(INSTALLDIR) $(INSTALL_PREFIX)^^^dir); /* * _MakeInstallDirIgnore: * Same as _MakeInstallDir but handles "make -i" as well. */ #define _MakeInstallDirIgnore(dir) \ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ _MakeInstallDir(dir) /* * _RmInstallDirs: * Removes a set of intall directories. * There should be no '@!' at the end of the '#define' line, because this * macro is used *inside* building rules. */ #define _RmInstallDirs(dirs) \ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ for dir in dirs; do \ @@\ (set -x; test -d $$dir && $(RM) -r $(INSTALL_PREFIX)$$dir); \ @@\ done /* * MakeDirectories: * Generate rules to create a hierarchy of directories. */ #define MakeDirectories(step,dirs) @!\ step:: @@\ MakeDirs(dirs) /* * MakeInstallDirectories: * Generate a rule to create a set of directories at installation * time (removed by deinstall). */ #define MakeInstallDirectories(dirs) @!\ local_install local_install-strip:: @@\ _MakeInstallDirs(dirs) @!\ @!\ local_deinstall:: @@\ _RmInstallDirs(dirs) /* * MakeLintLibSubdirs: * Generate rules to recursively create lint libraries. */ #define MakeLintLibSubdirs(dirs) @!\ MakeLintSubdirs(dirs,lintlib) /* * MakeMakeSubdirs: * Generate rules to recursively recreate target as part of the * specified step in the build. This assumes Makefile.SH has * already been built (which is the case for a delivery), but does * not rely on the existence of a Makefile. */ #define MakeMakeSubdirs(target) @!\ target:: @@\ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ @@\ for i in $(SUBDIRS);\ @@\ do \ @@\ echo "Making "target" in $(DIR)$$i..."; \ @@\ (cd $$i || exit 1; \ @@\ if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \ @@\ $(MAKE) $(MFLAGS) target) || exit 1;\ @@\ done /* * MakeMakefilesSH: * Generate rules to recursively recreate target as part of the * specified step in the build. If $(TOP) is set to an absolute * path, don't prepend the ../ prefix. This makes running things * outside of the source tree to be much easier. */ #define MakeMakefilesSH() @!\ Makefiles.SH:: Makefile.SH @@\ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ @@\ for i in $(SUBDIRS);\ @@\ do \ @@\ case "$(DIR)$$i/" in \ @@\ ^^*^^/^^*^^/^^*^^/^^*^^/) newtop=../../../..;; \ @@\ ^^*^^/^^*^^/^^*^^/) newtop=../../..;; \ @@\ ^^*^^/^^*^^/) newtop=../..;; \ @@\ *^^/) newtop=..;; \ @@\ esac; \ @@\ case "$(TOP)" in \ @@\ /^^*) newtop="$(TOP)" ;; \ @@\ esac; \ @@\ echo "Making Makefiles.SH in $(DIR)$$i..."; \ @@\ (cd $$i || exit 1; \ @@\ if test -f Jmakefile; then \ @@\ $(MAKE) $(MFLAGS) -f ../Makefile \ @@\ Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \ @@\ $(MAKE) $(MFLAGS) Makefiles.SH; \ @@\ fi; \ @@\ ) || exit 1; \ @@\ done /* * MakefileSubdirs: * Generate rules to create Makefiles. */ #define MakefileSubdirs() @!\ MakeMakeSubdirs(Makefiles) @!\ MakeMakefilesSH() /* * CppScriptTarget: * Generate rules to create a shell script by running the input * through cpp. */ #define CppScriptTarget(dst,src,defs,deplist) @!\ dst:: src deplist @@\ $(RM) $@ @@\ $(CPP) defs $@ @@\ chmod a+x $@ /* * MakeScriptFromCpp: * Generate rules to create a script from a file with a * .cpp suffix. */ #define MakeScriptFromCpp(name,defs) @!\ CppScriptTarget(name,name.cpp,defs,^^) /* * ShellScriptTargetExt: * Generate rules to create and install a set of scripts from * ext files (.sh and .SH are the most common examples). Man pages * derived from the name of the scripts are also installed unless * NoManPages() is specified. */ #define ShellScriptTargetExt(scripts,ext) @!\ ++SCRIPTS scripts @!\ SimpleShellScriptTargetExt(scripts,ext) @!\ InstallScripts() @!\ InstallManScripts() /* * ShellScriptTarget: * Generate rules to create and install a set of scripts from * .SH files. Man pages derived from the name of the scripts are * also installed unless NoManPages() is specified. */ #define ShellScriptTarget(scripts) @!\ ShellScriptTargetExt(scripts,.SH) /* * SimpleShellScriptTargetExt: * Generate rules to create a set of scripts from ext files where * ext is usually something like .sh or .SH, or whatever file * extension you like.. */ #define SimpleShellScriptTargetExt(scripts,ext) @!\ AllTarget(scripts) @!\ @!\ |expand s!scripts! @!\ !s: !s^^ext @@\ /bin/sh !s^^ext @!\ @!\ -expand /* * SimpleShellScriptTarget: * Generate rules to create a set of scripts from .SH files. */ #define SimpleShellScriptTarget(scripts) @!\ SimpleShellScriptTargetExt(scripts,.SH) /* * ShellScriptLongTarget: * Generate rules to create a set of scripts from .SH files where * the name of the generated file is different from the basename of * the .SH file (when, for instance, the total length with the .SH * extension would not leave enough space for RCS ,v extension). */ #define ShellScriptLongTarget(basename,scriptname) @!\ ++LSCRIPTS scriptname @!\ AllTarget(scriptname) @!\ @!\ scriptname: basename^^.SH @@\ /bin/sh basename^^.SH @!\ @!\ InstallScripts() @!\ ?NOMAN:|skip @!\ InstallManPageLong(basename,$(MANSRC),scriptname) @!\ -skip /* * ForceTarget: * The force target will force reconstruction of all the other * targets which include .FORCE in their own dependencies. */ #define ForceTarget() @!\ |once _force_ @!\ .FORCE: @!\ @!\ -once /* * RemoteTargetDependency: * A local target may rely on a remote dependency (e.g. a library) * made in a separate directory. This rule explicits the dependency * and forces a make of that dependency in the remote directory. */ #define RemoteTargetDependency(target,directory,dependency) @!\ RemoteDependency(directory,dependency) @!\ target: directory/^^^dependency @!\ /* * RemoteDependency: * Specify rules for making a remote dependency. */ #define RemoteDependency(directory,dependency) @!\ ForceTarget() @!\ |once =directory/^^^dependency= @!\ directory/^^^dependency: .FORCE @@\ @echo "Checking "^^^dependency" in "^^^directory"..." @@\ cd ^^^directory; $(MAKE) ^^^dependency @@\ @echo "Continuing in $(CURRENT)..." @!\ @!\ -once /* * SetSubdirs: * Actually forces the definition of SUBDIRS, and lets the user * specify what the sub-directories are. This will be added to the * customization part. */ #define SetSubdirs(subdirs) @!\ >SUBDIRS @!\ +SUBDIRS = subdirs /* * NoManPages: * Actually forces the definition of NOMAN, which tells the jmake * program to not generate rules for installing manual pages. */ #define NoManPages() @!\ >NOMAN /* * Expand: * This powerful macro expands the `rule' given a `pattern'. It * relies on a built-in command in jmake. The expansion is * documented in the short notes file that comes with jmake and * gives some insights on the internal syntax. */ #define Expand(rule, pattern) @!\ |expand pattern @!\ rule @!\ -expand /* * Lex and yacc stuff. */ /* * YaccRule: * This is the rule which is used to build a .c file from a .y file. */ #define YaccRule() @!\ AddSuffix(.y) @!\ |once _YaccRule_ @!\ |rule:.y.c: @!\ |rule: $(YACC) $(JYFLAGS) $< @!\ |rule: $(MV) y.tab.c $@ @!\ |rule: @!\ -once /* * SimpleYaccTarget: * Declare a yacc base.y file to be used in the building of the * specified target program. The source file must be given without * its final .y extension. The name of the .c and .o will be * derived from the source file basename provided. */ #define SimpleYaccTarget(program,base) @!\ ++SOURCES base.y @!\ ++OBJECTS base.o @!\ YaccRule() @!\ program: base.c @!\ @!\ local_realclean:: @@\ $(RM) base.c @!\ /* * ComplexYaccTarget: * Declare a yacc base.y file to be used in the building of the * specified target program. The source file must be given without * its final .y extension. The name of the .c and .o will be * derived from the source file basename provided. * The difference with SimpleYaccTarget is the identifying process * where all the 'yy' are replaced by the specified prefix. */ #define ComplexYaccTarget(program,base,prefix) @!\ ++SOURCES base.y @!\ ++OBJECTS base.o @!\ program: base.c @!\ @!\ base.c: base.y @@\ $(YACC) $(JYFLAGS) base.y @@\ $(SED) -e 's/yy\(.\)/prefix\1/g' < y.tab.c > base.c @@\ $(SED) -e 's/yy\(.\)/prefix\1/g' < y.tab.h > base.h @@\ $(RM) y.tab.c y.tab.h @!\ @!\ local_realclean:: @@\ $(RM) base.c @!\ /* * SimpleYaccInclude: * Declare that program will need an include file produced by * the output of yacc on base.y, which typically produces a file * named y.tab.h, which will be renamed as base.h. * The only problem is that the dependencies towards base.h have * to be manually given in the Jmakefile. */ #define SimpleYaccInclude(base) @!\ base.h: base.c @@\ @if test -f y.tab.h; then \ @@\ echo " $(MV) y.tab.h $@"; \ @@\ $(MV) y.tab.h $@; \ @@\ fi @!\ @!\ local_realclean:: @@\ $(RM) base.h /* * ComplexYaccInclude: * Declare that program will need an include file produced by * the output of yacc on base.y, which typically produces a file * named y.tab.h, which will be renamed as base.h. * The difference with SimpleYaccInclude is the identifying process * of the y.tab.h file where all 'yy' are renamed to prefix. * The only problem is that the dependencies towards base.h have * to be manually given in the Jmakefile. */ #define ComplexYaccInclude(base,prefix) @!\ base.h: base.c @@\ @if test -f y.tab.h; then \ @@\ echo " $(SED) -e 's/yy\(.\)/prefix\1/g' < y.tab.h > base.h"; \ @@\ $(SED) -e 's/yy\(.\)/prefix\1/g' < y.tab.h > base.h; \ @@\ echo " $(RM) y.tab.h"; \ @@\ $(RM) y.tab.h; \ @@\ elif test -f base.h; then \ @@\ echo " $(CP) base.h base.ht"; \ @@\ $(CP) base.h base.ht; \ @@\ echo " $(SED) -e 's/yy\(.\)/prefix\1/g' < base.ht > base.h"; \ @@\ $(SED) -e 's/yy\(.\)/prefix\1/g' < base.ht > base.h; \ @@\ echo " $(RM) base.ht"; \ @@\ $(RM) base.ht; \ @@\ fi @!\ @!\ local_realclean:: @@\ $(RM) base.h /* * NormalYaccTarget: * Declare a yacc base.y file which should produce a base.c and * base.h file as derived from the output of yacc, to be used by * the specified program. */ #define NormalYaccTarget(program,base) @!\ SimpleYaccTarget(program,base) @!\ SimpleYaccInclude(base) /* * IdentifiedYaccTarget: * Declare a yacc base.y file which should produce a base.c and * base.h file as derived from the output of yacc, to be used by * the specified program. The specified prefix is used to remplace * all the 'yy' in the generated file, for use when more than a * single parser is needed in one executable. */ #define IdentifiedYaccTarget(program,base,prefix) @!\ ComplexYaccTarget(program,base,prefix) @!\ ComplexYaccInclude(base,prefix) /* * SimpleLexTarget: * This declares a lex base.l file which is to be ran through * lex to produce a base.c file. */ #define SimpleLexTarget(program,base) @!\ ++SOURCES base.l @!\ ++OBJECTS base.o @!\ |once _LexRule_ @!\ |rule:.l.c: @!\ |rule: $(LEX) $(JLFLAGS) $< @!\ |rule: $(MV) lex.yy.c $@ @!\ |rule: @!\ -once @!\ AddSuffix(.l) @!\ program: base.c @!\ @!\ local_realclean:: @@\ $(RM) base.c @!\ /* * IdentifiedLexTarget: * This declares a lex base.l file which is to be ran through * lex to produce a base.c file. The prefix is used to replace * the 'yy', so that the lexical analyzer may be identified. */ #define IdentifiedLexTarget(program,base,prefix) @!\ ++SOURCES base.l @!\ ++OBJECTS base.o @!\ program: base.c @!\ @!\ base.c: base.l @@\ $(LEX) $(JLFLAGS) base.l @@\ $(SED) -e 's/yy\(.\)/prefix\1/g' < lex.yy.c > base.c @@\ $(RM) lex.yy.c @!\ @!\ local_realclean:: @@\ $(RM) base.c @!\ /* * NormalLexDependTarget: * Declare that program will need an include file produced by * the output of lex on base.l, which typically produces a file * named lex.yy.c which will be renamed as base.c. Besides, the * lexical analyzer needs the file parser.h produced by running * parser.y through yacc and renaming y.tab.h as parser.h. */ #define NormalLexDependTarget(program,base,parser) @!\ base.o: parser.h @!\ @!\ SimpleLexTarget(program,base) /* * IdentifiedLexDependTarget: * Declare that program will need an include file produced by * the output of lex on base.l, which typically produces a file * named lex.yy.c which will be renamed as base.c. Besides, the * lexical analyzer needs the file parser.h produced by running * parser.y through yacc and renaming y.tab.h as parser.h. * The lexical analyzer is identified with the supplied prefix, * which replaces the regular 'yy' prefix in the symbol names. */ #define IdentifiedLexDependTarget(program,base,parser,prefix) @!\ base.o: parser.h @!\ @!\ IdentifiedLexTarget(program,base,prefix) /* * NormalParserTarget: * Specify that program is using the lex/yacc combination to * produce a parser. The lexic and parser parameters are the * base name of the .l and .y file, respectively. */ #define NormalParserTarget(program,lexic,parser) @!\ NormalLexDependTarget(program,lexic,parser) @!\ NormalYaccTarget(program,parser) /* * IdentifiedParserTarget: * Specify that program is using the lex/yacc combination to * produce a parser. The lexic and parser parameters are the * base name of the .l and .y file, respectively. The parser * produced is identified via its prefix, which replaces all * the normally supplied 'yy' prefix, hence making it possible * to have multiple parsers in a single executable. */ #define IdentifiedParserTarget(program,lexic,parser,prefix) @!\ IdentifiedLexDependTarget(program,lexic,parser,prefix) @!\ IdentifiedYaccTarget(program,parser,prefix) dist_3.5-36.001/jmake/jmake.man0000644000175000017500000003257411474553121016276 0ustar srivastasrivasta''' $Id: jmake.man 47 2010-11-28 22:23:13Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: jmake.man,v $ ''' Revision 3.0.1.3 2004/08/22 09:01:55 ram ''' patch71: renamed |test as |case as the construct has its syntax ''' patch71: added |subst section to allow variable substitutions ''' ''' Revision 3.0.1.2 2004/08/21 23:19:52 ram ''' patch71: added '|shell' section to emit verbatim code in Makefile.SH ''' patch71: new '|test' to conditionally generate Makefile sections ''' ''' Revision 3.0.1.1 1995/05/12 11:57:58 ram ''' patch54: updated my e-mail address ''' ''' Revision 3.0 1993/08/18 12:04:18 ram ''' Baseline for dist 3.0 netwide release. ''' .TH JMAKE 1 ram .SH NAME jmake \- a generic makefile builder .SH SYNOPSIS .B jmake [ .I cpp options ] .SH DESCRIPTION .I Jmake builds a makefile out of a rather high level description held in a .I Jmakefile file. The generated file is a .I Makefile.SH rather than a simple makefile, which means it is ready to be used in conjonction with .I metaconfig. In particular, parameters such as "where to install executables" will be automatically determined by .I Configure and only the needed parameters will be taken into account. .PP To use .I jmake you have to write a .I Jmakefile first, which describes the way things are to be built. Your .I Jmakefile will be included inside a generic template through the C pre-processor. This means you may use the usual C /**/ comments, but not the shell # comments. The C comments will not appear in the generated .I Makefile.SH but lines starting with ;# will finally appear as shell comments. If you have to write the string /* in the generated .I Makefile.SH then you have to escape it (otherwise .I jmake will think of it as the start of a C comment). Simply put a # in front of the *, as in /#*. .PP You have a set of macros at your disposal, and all these macros are listed in the Index file, along with the piece of code they will expand to. Usually, a .I Jmakefile is fairly small and thus easier to maintain than a huge .I Makefile. Some internal powerful commands allow you to write portable makefiles easily, without having to spend many efforts, because someone else already did the job for you :-). .PP When you want to generate your makefile, you usually do not run .I jmake but use the .I jmkmf script which is a wrapper and will invoke .I jmake with the correct options. .PP All the knowledge of .I jmake is held in two files: the template .I Jmake.tmpl and the macro definition file .I Jmake.rules. The first file includes the second, along with the .I Jmakefile. It is sometimes necessary to know how things works to be able to correctly use all the features provided. For instance, you may have to write your own rules for a specific project. Although you cannot overwrite the predefined rules, you can extent the .I Jmake.rules file or simply add your macros in your .I Jmakefile. You may also use .I #include statements when you want to share these macros and do not want to duplicate the code. .PP The syntax in Jmake.rules is not elegant at all, but: .sp .PD 0 .IP - It is easy to parse (like sendmail.cf or troff files). .IP - The rules are not supposed to change very often. .IP - It is simple enough to be mastered in five minutes. :-) .sp Here is a small description: .sp .IP 1) To deal with various \fIcpp\fR implementations: .sp .RS .IP \(bu Final @!\\ means: end of line, next line starts at the left margin. .IP \(bu Final @@\\ means: end of line, next line is to be indented by one tab. .sp .PP There should always be one of @!\\ or @@\\ at the end of each line. The only exception is for macros that are to be used as part of a rule body (e.g. \fIRemoveTargetProgram\fR). In that case, the first line (which holds the \fI#define\fR) should end with a single backslash. .RE .sp .IP 2) Symbol definitions: .sp .RS .IP \(bu >SYMBOL: defines the symbol. .IP \(bu ?SYMBOL:: keeps iff SYMBOL is defined. .IP \(bu %SYMBOL:: keeps iff SYMBOL is not defined. .sp .PP The ?SYM can be nested (logical AND), as in: .sp .in +5 ?SYMBOL:%TOKEN:text .in -5 .sp which will keep text if SYMBOL is defined and TOKEN undefined. To implement a logical OR, see below. .RE .sp .IP 3) Makefile target tests: .sp .RS .IP \(bu ?\fItarget\fR?:: keeps iff \fItarget\fR is defined. .IP \(bu %\fItarget\fR%:: keeps iff \fItarget\fR is not defined. .sp A makefile \fItarget\fR is defined as a standalone target, for instance the .B depend.local target, which would be defined as: .sp .in +5 .nf depend.local: .sp .in -5 .fi Also note that it is only valid for targets defined .I so far in the generated makefile. It is not a predicate that can be used to test for targets that will eventually be defined later on in the generation. .RE .sp .IP 4) Commands: .sp .RS Commands can be passed to \fIjmake\fR. They start with a leading '|'. Available commands are: .sp .IP \(bu |suffix : adds to the .SUFFIXES: list in the makefile. .sp .IP \(bu |rule:: adds to the building rule section. .sp .IP \(bu |rule: : same as before, with a leading tab. .sp .IP \(bu |skip: skips text until a line starting with '-skip' is found. .sp .IP \(bu |subst: begins section where lines will be subject to variable substitution, until '-subst' is found. This means that when the Makefile.SH is run, all instances of $var within the \fIsubst\fR section will be substituted by the shell. .sp .IP \(bu |shell: emits section until matching '-shell' as-is in the generated Makefile.SH. This can be useful to prepare \fI|case\fR sections. It is not allowed to nest \fIshell\fR sections. .sp .IP \(bu |case: this command must be followed by a shell variable name (without its leading '$' sign) and a case-style pattern, for instance the string "var in f*". It will generate the corresponding "case" test in the Makefile.SH on the "$var" value and only if this test is true will the section until the matching '-case' be generated in the Makefile when Makefile.SH is run. It is possible to nest \fIcase\fR sections freely. .sp .IP \(bu |expand : expand lines until '-expand' with . A complete example is shown below. .sp .IP \(bu |once : text up to '-once' appears only the first time. .sp .PP The '|' commands cannot be nested, unless otherwise noted. In particular, due to the simple implementation of \fI|skip\fR, it is impossible to put \fI|skip\fR inside a skipped part. However, a \fI|once\fR section may have \fI|skip\fR sections. It is allowed to nest \fI|case\fR sections at will. .sp .PP Here is a way to implement a logical OR: .sp .in +5 .nf /* Implements SYMBOL or not TOKEN */ ?SYMBOL:text /* Keeps text if SYMBOL */ %SYMBOL:|skip %TOKEN:text /* Keeps text if not TOKEN */ -skip .fi .in -5 .sp Actually, this is ugly, because the text has to appear twice. Fortunately, I did not use that construct. :-) .sp Indeed, as you have surely already guessed, the best way to implement a logical OR is to use De Morgan's Law: .sp .in +5 .nf not (p or q) <=> not p and not q /* Implements SYMBOL or not TOKEN (attempt #2) */ %SYMBOL:?TOKEN:|skip text /* If SYMBOL or not TOKEN */ -skip .sp .in -5 .fi Who said they didn't care about logic? ;-) .sp .PP Expansion is done with the \fIexpand\fR command. It has been provided to avoid some cumbersome writings in makefiles when you have to repeat some silly lines that only differ in file names, for instance. Let's look at an example first: .sp .in +5 .nf |expand a!foo bar! b!yes no! !a:: echo !a, !b -expand .fi .in -5 .sp .PP Then two rules will be printed, and the values of (a,b) for the first will be (foo, yes), for the second (bar, no). Substitution is controled by the '!' character. If the word to be substituted is part of another one, detach with the ^^ construct as in: !b^^c. It is possible to use Makefile macros in the , and they will be expanded by jmake. If this is not what you want, escape the first '$' sign (this is a Makefile escape, i.e. you must double the '$', not precede it with a backslash). A // stands for the null substitution value. .PP The ^^^ construct behaves like ^^, i.e. it is stripped out, but it also removes any following white space after the ^^^. If you prepend something to a macro argument, and that macro argument was written with spaces before it, then this will let you concatenate something right before that argument's final value. .sp .PP Here is another example which shows how the macro Expand can be used. It is defined in \fIJmake.rules\fR as: .sp .in +5 .nf #define Expand(rule, pattern) @!\\ |expand pattern @!\\ rule @!\\ -expand .sp .in -5 .fi So we can write in the \fIJmakefile\fR: .sp .in +5 .nf |skip A = foo bar -skip #define Rule @!\\ $(DIR)/!a^^.o: !a^^.o @@\\ $(CC) -c !a^^.c @@\\ $(MV) !a^^.o $(DIR) Expand(Rule, a!$(A)!) .sp .in -5 .fi which will generate in \fIMakefile.SH\fR: .sp .in +5 .nf $(DIR)/foo.o: foo.o $(CC) -c foo.c $(MV) foo.o $(DIR) $(DIR)/bar.o: bar.o $(CC) -c bar.c $(MV) bar.o $$(DIR) .sp .in -5 .fi .sp .PP The 'A' declaration has been surrounded by \fIskip\fR, so that it does not appear in the generated Makefile.SH, but it will be taken into account by \fIjmake\fR for the substitution in the pattern. .sp .PP The number of expansions is determined by the number of possible values for the \fBfirst\fR parameter. If other parameters have less substitution values, they will get void ones. .sp .PP It is possible to add a regular expression at the end of '-expand'. This regular expression will be removed from the final set of expansion at the end of each line. It is also possible to do substitutions in the expanded item, by using the syntax (if 'f' is the expanded variable) !f:\fI

\fR=\fI\fR where \fI

\fR and \fI\fR are two regular expressions (without spaces). The pattern \fI

\fR will be replaced by the pattern \fI\fR (only the first occurrence will be replaced). .sp .PP Finally, you may refer in the expanded section to variables whose value is computed via another expansion, which makes it easy to define generic \fIJmakefiles\fR. .sp Example: .sp .in +5 .nf SRC = foo.c bar.c OBJ = \\ |expand f!$(SRC)! !f:\\.c=\\.o \\ -expand \\\\ INC = \\ |expand f!$(OBJ)! !f:\\.o=\\.h \\ -expand \\\\ .fi .in -5 .sp which will generate in \fIMakefile.SH\fR: .sp .in +5 .nf SRC = foo.c bar.c OBJ = \\ foo.o \\ bar.o INC = \\ foo.h \\ bar.h .in -5 .fi .sp Do not forget to protect special characters in your regular expressions such as backslash, point, etc... .sp .PP The \fIonce\fR command is tagged with a name. The first time the name appears, the once construct is ignored and the text up to '-once' will be copied in the generated Makefile.SH. However, future occurences of the same name will be ignored (\fIonce\fR will behave like \fIskip\fR). .sp Example: .sp .in +5 .nf |once this_is_a_name -once .sp .in -5 .fi .sp .PP The \fIshell\fR command can be used to generate a shell fragment in the Makefile.SH. For instance, the following section in the Jmakefile: .sp .in +5 .nf |shell case "$d_usegtk1" in define) glib=1; gtk=1;; esac -shell .sp .in -5 .fi will cause the generation of the enclosed fragment in the Makefile.SH to compute the values of the \fIglib\fR and \fIgtk\fR variables based on the configuration variable \fId_usegtk1\fR set by running Configure. .sp .PP In turn, this can be used in subsequent \fIcase\fR sections to activate parts of the Makefile only when building for GTK1 using glib-1.x: .sp .in +5 .nf |case glib in 1 display: echo "Building for glib-1.x" -case .sp .in -5 .fi This section will generate something like this in the Makefile.SH: .sp .in +5 .nf !NO!SUBS! case "$glib" in 1) $spitshell >>Makefile <<'!NO!SUBS!' display: echo "Building for glib-1.x" !NO!SUBS! ;; esac $spitshell >>Makefile <<'!NO!SUBS!' .sp .in -5 .fi And when running Makefile.SH, the "display" rule above will only appear when building for glib-1.x. The form of the final \fIMakefile\fR can therefore depend on the configuration options chosen when \fIConfigure\fR was run. .RE .sp .IP 5) Initializations: .sp .RS .IP \(bu +: Puts the whole line in the initialization section. .IP \(bu ++SYMBOL : Adds to the SYMBOL macro. .RE .sp .IP 6) User-defined variables: .sp The user may define CFLAGS, LDFLAGS or DPFLAGS as additional flags to be used in C compilation, linking phase or depend target. It is thus possible to add some extra flags such as -I or libraries for Makefiles in specific sub-directories. .sp .PD .SH AUTHOR Raphael Manfredi .SH FILES .PD 0 .TP 20 Jmakefile High level description of Makefile.SH .TP Jmake.rules File holding the macro definitions .TP Jmake.tmpl Template used to mould Makefile.SH .PD .SH BUGS On systems whose .I cpp reduces multiple tabs and spaces to a single space, .I jmake attempts to put back any necessary tabs (which .I make expects in front of rules) but does not properly formats the body of the rule itself. .PP There is a bootstraping problem when creating the first Makefile.SH, because you cannot run it through a shell until there is a decent Configure script, but you can't run \fImetaconfig\fR before there is a Makefile.SH or some needed symbols will not be defined. .SH "SEE ALSO" jmkmf(1), metaconfig(1). dist_3.5-36.001/jmake/bindex.SH0000755000175000017500000001304111344533734016212 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting bindex (with variable substitutions)" $spitshell >bindex <>bindex <<'!NO!SUBS!' eval 'exec perl -S $0 ${1+"$@"}' if $runnning_under_some_shell; # $Id: bindex.SH 31 2010-03-06 20:15:24Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $Log: bindex.SH,v $ # Revision 3.0.1.1 1993/08/19 06:42:12 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:04:13 ram # Baseline for dist 3.0 netwide release. # $file = "files/Jmake.rules"; open(INDEX, ">Index") || die "Cannot create Index.\n"; open(RULES, "$file") || die "Cannot open $file.\n"; print INDEX "[This Index is automatically generated from Jmake.rules file. Do not edit this file or your changes will be lost. Edit Jmake.rules instead.] This file contains a listing of all the macros that can be used in a Jmakefile. Only a few of these should be used in the Jmakefile (they are the top-level macros). However, some low-level ones may be useful, but it is up to you to make that decision. This explains why this file holds all the available macros for jmake. In the following listing, the macros are separated by a line of dashes. The signature of the macro is given, then a small comment of what it does precedes the actual definition. Lines preceded by '->' show the set of symbols defined when the macro is used. Initialization lines are shown as-is, i.e. have the form SYM = val while concatenation is shown by SYM += val (which means val is added to the value of SYM). Conditional lines are preceded by tests like (if SYM). This means the line is to be kept if and only if the symbol SYM is defined. Other internal requests are not formatted yet. "; $inrule = 0; # Not inside a rule at the beginning $incomment = 0; # Not inside a comment $last_was_text = 0; # Last line was not a rule text while () { $inrule || next unless /^\s\*\s(\w+)\s*:/; if ($inrule) { # We are already in a rule if ($incomment) { if (m|^\s*\*/|) { # End of comment $incomment = 0; $Comment{$current} .= "\n"; } else { s/^\s*\*\s*//; # Remove leading comment sign $Comment{$current} .= " $_"; } next; # Anyway, go to next line } if (/^\s*$/) { # Empty line = end of rule $inrule = 0; next; } # Here, we have to print the body of the rule, after some cleaning s/(@#|@@|@!)\\$//; # Remove final continuations s/^(#define.*)\\/$1/; # Remove single '\' on first rule line s/\|rule:\s*$/\n/; s/\|rule:\s+/ /; # Remove rule markers s/\|rule://; s/%(\w+):\|skip/#ifdef $1/; # Deal with ugly skip syntax s/\?(\w+):\|skip/#ifndef $1/; # Deal with ugly skip syntax s/\-skip/#endif/; s/\?(\w+):/(if $1) /; # Simple '?' test s/%(\w+):/(not $1) /; # Simple '%' test s/\|suffix/.SUFFIXES:/; # Make suffix command explicit s/\t/ /g; # Expand all tabs to 4 chars s/\s*$/\n/; # Remove any trailing space s|\^\^\^|/***/|; # Change ^^^ to the more visual /***/ s|\^\^|/**/|; # Restore ^^ to the more visual /**/ if (/^$/) { # If empty line $Index{$current} .= "\n" if $last_was_text; $last_was_text = 0; next; } if (/^[>+]/) { # Special commands if (s/^>\s*//) { # Wanted symbol chop; $Wants{$current} .= " $_"; } elsif (/^\+\+\s*(\S+)\s*(.*)/) { # Added symbol $Added{$current} .= "\t$1 += $2\n"; } else { s/^\+\s*(.*)//; $Init{$current} .= "\t$1\n"; } next; } if (s/^#define\s+//) { # Definition of the rule chop; $Sig{$current} = $_; # Signature of rule } else { $Index{$current} .= " $_"; # Rule's body $last_was_text = 1; } } else { # We've just entered a rule $current = $1; next if $current =~ /patch\d/; # Skip RCS log messages $inrule = 1; $incomment = 1; # We're still in the leading comment $Seen{$current} = 1; $last_was_text = 0; } } close RULES; # Now sort the rules in alphabetical order print INDEX '-' x 72, "\n"; foreach $rule (sort(keys %Seen)) { print INDEX "$Sig{$rule}:\n"; print INDEX $Comment{$rule}; $line = $Wants{$rule}; if (length($line)) { $line = "->$line."; $line = &format($line); print INDEX "$line\n"; } $line = $Init{$rule}; print INDEX "$line\n" if length($line); $line = $Added{$rule}; print INDEX "$line\n" if length($line); $line = $Index{$rule}; print INDEX $line; print INDEX "\n" if (length($line)); print INDEX '-' x 72, "\n"; } close INDEX; # Format $_ to fit in 80 columns (70 + size of tabs) # Long lines are split, and the all but the first are indented # by two leading spaces. The whole thing is then indented by # one tab. sub format { local($tmp); local($head) = ''; local($_) = shift(@_); while (length($_) > 70) { $tmp = substr($_,0,70); $tmp =~ s/^(.*) .*/$1/; $head .= "\t$tmp\n"; $_ = ' ' . substr($_,length($tmp),9999); } $head .= "\t$_\n"; } !NO!SUBS! chmod 755 bindex $eunicefix bindex dist_3.5-36.001/jmake/Jmakefile0000644000175000017500000000270712317735152016322 0ustar srivastasrivasta/* * Jmakefile for jmake */ ;# $Id: Jmakefile 173 2014-04-05 08:10:18Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: Jmakefile,v $ ;# Revision 3.0.1.2 1995/03/21 08:34:16 ram ;# patch52: now installs new fixcpp script in the private libdir ;# ;# Revision 3.0.1.1 1994/01/24 13:42:36 ram ;# patch16: added dependency generation stage ;# ;# Revision 3.0 1993/08/18 12:04:09 ram ;# Baseline for dist 3.0 netwide release. ;# AllTarget(Index) Index: bindex files/Jmake.rules chmod +x bindex ./bindex ShellScriptTarget(jmake jmkmf) SimpleShellScriptTarget(bindex fixcpp) MakeInstallDirectories($(PRIVLIB) $(PRIVLIB)/files) InstallNonExec(Index,$(PRIVLIB)) InstallScript(bindex,$(PRIVLIB)) InstallScript(fixcpp,$(PRIVLIB)/files) InstallMultipleFlags(files/Jmake*,$(PRIVLIB)/files,-m 444) BINSH = jmake.SH fixcpp.SH depend:: local_depend local_depend:: ($(SED) '/^# DO NOT DELETE/q' Makefile && \ grep '^\$$grep' $(BINSH) | \ $(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \ ) > Makefile.new cp Makefile Makefile.bak cp Makefile.new Makefile $(RM) Makefile.new fixcpp jmake: $(TOP)/revision.h dist_3.5-36.001/jmake/jmake.SH0000755000175000017500000004331711474553121016035 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac REVISION=`grep REVISION $TOP/revision.h | head -n1 | cut -d' ' -f4` case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting jmake/jmake (with variable substitutions)" $spitshell >jmake <>jmake <<'!NO!SUBS!' ($me = $0) =~ s|.*/(.*)|$1|; $dir = &tilda_expand($dir); # ~name expansion $file = $dir . '/Jmake.tmpl'; $cpp_opt = "-I. "; # For Jmakefile, which is local while ($ARGV[0] =~ /^-/) { $_ = shift; last if /--/; $cpp_opt .= "$_ "; } $cpp_opt .= "-I$dir"; # Pass 0 is looking at the template for "?CP:CP =" lines that are to be # emitted if the CP variable is needed. Later on, when we see $(CP) being # used, we'll be able to set the $symbol{CP} entry to 1 to have the CP # variable initialized by the template. open(TMPL, $file) || die "$me: can't open $file: $!\n"; while () { next unless /^\?([\w_]+):\1\s+=/; $wanted{$1}++; } close TMPL; # Thank you HP-UX for having a cpp that blindly strips trailing backslashes # in the text. Run through cpp by using the fixcpp script... open(CPP, "$dir/fixcpp $cpp_opt $file |"); while () { # Record defined symbols in Jmakefile. We won't catch symbols # in conditional commands, but that's ok, I hope. if ($in_symbol) { $val = $_; $in_symbol = 0 if !($val =~ s/\\\s*$//); # Last line if ($val = /^\|expand/) { # Found an expand command $in_symbol = 0; # Stop gathering value $val .= "void::x"; # Stop any incomplete escape sequence } chop($val); $Makesym{$current_symbol} .= $val; } elsif (/^\s*(\w+)\s*=(.*)/ && !$in_symbol) { # Found a makefile's macro declaration $val = $2; $current_symbol = $1; if ($val =~ s/\\\s*$//) { # Remove final '\' $in_symbol = 1; # This is a continuation line } $Makesym{$current_symbol} = $val; push(@Order, $current_symbol); # Keep track of order } # Protect RCS keyword Id or Header from normal substitution s/\$(Id|Header|Log)/\$X-$1/; # Restore possibly escaped C comments s|/#\*|/*|g; s|\*#/|*/|g; # Remove all ^^^ (null space character) up to next non-space character s|\^\^\^\s*||g; # Remove all ^^ (null space character) s|\^\^||g; # Restore escaped ^^ and ^^^ sequences s|\^\\\^\\\^|^^^|g; s|\^\\\^|^^|g; next if /^#\s+\d+/; # Skip cpp commments s/^;#/#/; s/@#\s?/\n/g; # Kept for backward compatibility s/@!\s?/\n/g; s/@@\s?/\n\t/g; # A '\r' is added to all lines, in order to let 'split' keep them # As lines ending with '\' won't fit in the next regular # expression (why ?), we have to treat that special case separately s/\n$/\r\n/gm; s/\\\s*$/\\\r/gm; # Remove spaces after final '\' and add '\r' @macro = split(/\n/); for ($i = 0; $i <= $#macro; $i++) { chop($_ = $macro[$i]); # Remove final '\r' s/\s+$//g; # Remove possible useless spaces if (/^TOP\s*=\s*(\S+)/) { # Get the top from generated file $top = $1; } find_wanted($_); # Look for known $(VAR) usage if (s/^\s*>//) { # '>' means "symbol wanted" warn "$me: the '>$_' construct is deprecated for known symbols\n" if $wanted{$_} && !$warned_wanted_symbol_deprecated++; $symbol{$_} = 1; } elsif (s/^\s*\+//) { # '+' means "initialization section" if (s/^\+(\w+)//) { # '++' means add to variable list $added{$1} .= $_; } else { # A single '+' means "add as is". push(@init, $_); } } elsif (s/^\|//) { # Command for us if (/suffix\s+(\S+)/) { # Add suffix push(@suffix, $1) unless $seen{$1}; $seen{$1} = 1; } elsif (s/^rule://) { # Add building rule s/^\s(\s*\S+)/\t$1/; # Make sure leading tab is there push(@rule, $_); } elsif (/^skip/) { # Unconditional skip... funny! push(@makefile, "|$_"); # Skip handled in pass 2 } elsif (/^expand/) { push(@makefile, "|$_"); # Expand handled in pass 2 } elsif (/^once\s+(.*)/) { # Once handled in pass 1 if ($Once{$1}++) { # Symbol already seen -- skip for (; $i <= $#macro; $i++) { last if $macro[$i] =~/^-once/; } warn("$me: -once not found for $1") unless $macro[$i] =~/^-once/; } } elsif (/^shell/) { # Escaping to shell push(@makefile, "|$_"); # will be handled in pass 2 } elsif (/^case/) { # Conditional generation push(@makefile, "|$_"); # will be handled in pass 2 } elsif (/^subst/) { # Section with var substitution push(@makefile, "|$_"); # will be handled in pass 2 } else { print "$me: Warning: unknown command $_\n"; } } else { next if /^-once/; # Control statement removed push(@makefile, $_); } } } close CPP; @key = keys(%added); $last_was_blank = 1; # To avoid blank line at the top of the file $symbol{'INIT'} = 1 if ($#init >= 0 || $#key >=0); # Initializations $symbol{'SUFFIX'} = 1 if ($#suffix >= 0 || $#rule >=0); # Rules or suffixes $symbol{'TOP'} = 1 if $top eq '.'; # If imake invoked for the top $shellmode = 0; # Set to true within "shell" section $casemode = 0; # Counts nesting levels within "case" section $substmode = 0; # True when within section with variable substitution $SPIT_START = "\$spitshell >>Makefile <<'!NO!SUBS!'\n"; $SPIT_END = "!NO!SUBS!\n"; $GROK_START = "\$spitshell >>Makefile <Makefile.SH"); # We have to use for instead of foreach to handle 'skip' easily line: for ($i = 0; $i <= $#makefile; $i++) { $_ = $makefile[$i]; next if /^-skip|-expand/; # They might have made a mistake # Strip consecutive blank lines in generated file if (/^\s*$/) { next if ($last_was_blank); $last_was_blank = 1; } else { $last_was_blank = 0; } # In shell mode, we're transparent, untill we reach a "-shell" # We don't call print_makefile() as we don't want to record # those non-makefile lines in the @Generated array. if ($shellmode) { if (/^-shell/) { # Ending shell mode, back to Makefile print MAKEFILE $substmode ? $GROK_START : $SPIT_START; $shellmode = 0; } elsif (/^\|shell/) { die "$me: can't nest 'shell' sections.\n"; } else { print MAKEFILE "$_\n"; } next; } elsif (/^\|shell/) { print MAKEFILE $substmode ? $GROK_END : $SPIT_END; $shellmode = 1; # Next lines emitted verbatim as shell next; } # In subst mode, the section until "-subst" is emitted regularily, # excepted that it will be in a grok section, so its $var will be # substituted by the shell. if ($substmode) { if (/^-subst/) { # Ending subst mode, back to regular print MAKEFILE $GROK_END; print MAKEFILE $SPIT_START; $substmode = 0; next; } elsif (/^\|subst/) { die "$me: can't nest 'subst' sections.\n"; } # Continue with line } elsif (/^\|subst/) { print MAKEFILE $SPIT_END; # End spit section in Makefile.SH print MAKEFILE $GROK_START; $substmode = 1; # Next lines subject to $ interpretation next; } # In a "case" section, the Makefile will be conditionally generated # based on the value of the supplied variable, as evaluated by the shell. # We can nest "case" sections without problems. if (/^-case/) { # Ending current case section if ($casemode == 0) { warn "$me: ignoring spurious '-case'\n"; next; } print MAKEFILE $substmode ? $GROK_END : $SPIT_END; my $indent = "\t" x ($casemode - 1); print MAKEFILE "${indent}\t;;\n"; print MAKEFILE "${indent}esac\n"; print MAKEFILE "${indent}", $substmode ? $GROK_START : $SPIT_START; $casemode--; next; } if (/^\|case/) { my ($var, $value) = /^\|case\s+(\w+)\s+in\s+(.*)/; die "$me: unparseable directive '$_'\n" if $var eq ''; $casemode++; print MAKEFILE $substmode ? $GROK_END : $SPIT_END; my $indent = "\t" x ($casemode - 1); print MAKEFILE "${indent}case \"\$$var\" in\n"; print MAKEFILE "${indent}$value)\n"; print MAKEFILE "${indent}\t", $substmode ? $GROK_START : $SPIT_START; next; } # Process regular line to be generated in Makefile.SH s//[jmake $version-$revision]/; # Lines starting with ?target?: (resp. %target%:) are to be processd # only when target is used (resp. unused) in the generated makefile. # Apply in sequence while (/^\s*\?|\s*%/) { if (s/^\s*\?([\w-.]+)\?://) { # Wanted target ? next line unless $target{$1}; } elsif (s/^\s*%([\w-.]+)%://) { # Unwanted target ? next line if $target{$1}; } else { last; } } # Lines starting with ?SYMBOL: (resp. %SYMBOL:) are to be processed # only if SYMBOL is defined (resp. undefined). # Apply in sequence while (/^\s*\?|\s*%/) { if (s/^\s*\?(\w+)://) { # Wanted symbol ? next line unless $symbol{$1}; } elsif (s/^\s*%(\w+)://) { # Unwanted symbol ? next line if $symbol{$1}; } else { print "$me: Warning: missing ':' in $_\n"; last; } } # We wish to make sure there is a leading tab if the line starts with # a space to prevent problems later on. However, variable definitions # might want to be aligned on the '=' (imake style). Not all make # may be able to cope with those though, so they are left justified # again. s/^\s/\t/ unless /^\s+\w+\s+=/; # Make sure leading tab is there s/^\s+(\w+\s+=)/$1/; # Left justify variable definition s/^;#/#/; # Comments in Jmakefile if (s/^\|//) { # Command for us if (/^skip/) { # Skip until -skip for (; $i <= $#makefile; $i++) { last if $makefile[$i] =~ /^-skip/; } } elsif (s/^expand//) { &init_expand($_); # Initializes data structures $i++; # Skip expand line undef @Expand; # Storage for expanded lines $pattern = ''; # Assume no pattern for (; $i <= $#makefile; $i++) { $_ = $makefile[$i]; if (s/^-expand//) { # Reached end of expansion if (s/^\s*(.*)/$1/) { # Expand followed by a pattern $pattern = $_; # Get pattern to be removed } last; } s/^\s/\t/; # Make sure leading tab is there push(@Expand, $_); # Line to be expanded } &expand($pattern); # Expand all lines in buffer } else { die "$me: unknown command $_\n"; } } elsif (/^INIT/) { # Initialization section # All the initializations are put in the variable substitution # section of the Makefile.SH. Therefore, we have to protect all # the '$' signs that are not followed by an alphanumeric character. foreach (@init) { # Dumps core sometimes with perl 4.0 PL10 # &protect_dollars(*_); $_ = &protect_dollars($_); &print_makefile($_); } foreach (@key) { # @key set earlier to keys(%added) $_ .= " = " . $added{$_}; # Dumps core sometimes with perl 4.0 PL10 # &protect_dollars(*_); $_ = &protect_dollars($_); &print_makefile($_); } } elsif (/^SUFFIX/) { # Suffixes/Rules section # Rules and suffixes are put in the variable substitution # section of the Makefile.SH. Therefore, we have to protect all # the '$' signs that are not followed by an alphanumeric character. if ($#suffix >= 0) { print MAKEFILE ".SUFFIXES:"; foreach (@suffix) { # Dumps core sometimes with perl 4.0 PL10 # &protect_dollars(*_); $_ = &protect_dollars($_); print MAKEFILE " $_"; } print MAKEFILE "\n\n"; } foreach (@rule) { # Dumps core sometimes with perl 4.0 PL10 # &protect_dollars(*_); $_ = &protect_dollars($_); print MAKEFILE "$_\n"; } } else { # Keep track of the targets we generate for ?target? and %target% type # of tests in the templates, which can generate specific code when # a target is indeed present. $target{$1}++ if /^([\w.-]+):/; &print_makefile($_); } } close MAKEFILE; sub protect_dollars { # Dumps core sometimes with perl 4.0 PL10 # local(*_) = shift(@_); s/\\\$/\\=/g; # Protect already escaped '$' s/(\$\W)/\\$1/g; # Escape unprotected '$' s/\\=/\\\$/g; # Restore escaped '$' $_; # Because perl dumps core... :-( } # Initializes data structures for expansion. If we detect Makefile # macro in the 'expand' line (the argument), then we write a small # makefile that will do the substitution for us -- I'm lazy today :-) sub init_expand { local($_) = shift(@_); undef %Vars; # Reset array of variables $Vars_len = 0; # Number of "symbols" in first expanded if (/\$\(\w+\)/) { # If at least one macro local($make) = "/tmp/mkjm$$"; open(MAKE, ">$make") || die "$me: can't create $make: $!\n"; &gen_variables(); # Generates already computed variables foreach $var (@Order) { # Print each in order we found them print MAKE "$var = $Makesym{$var}\n" if !$Gvars{$var}; } # We prepend OUTPUT: in front of the line that interests us, because # some makes can print extra information, especially GNU make with # its entering/leaving blurb when invoked from another makefile. print MAKE "all:\n\t\@echo 'OUTPUT: $_'\n"; close MAKE; chop($_ = `make -f $make all | grep ^OUTPUT:`); unlink($make); } s/^OUTPUT: //; while (s/^\s*(\w+)!([^!]*)!//) { $Vars{$1} = $2; # Record only length for _first_ expanded symbol $Vars_len = split(/\s\s*/, $2) unless $Vars_len; } } # Expand lines in the @Expand array. The argument is a pattern which is to # be removed from the last chunk of expanded lines. # For each symbol s, !s is replaced by the next item, and !s:p=q does the # same after having replaced the pattern 'p' by pattern 'q' in the item. # Spaces are NOT allowed in 'p' or 'q'. Substitution is done once (no /g). sub expand { local($pattern) = shift; # To-be-removed pattern for last chunk local($_); local($sub); local($i); local(@expands); for ($i = 0; $i < $Vars_len; $i++) { foreach $line (@Expand) { $_ = $line; # Don't modify elements in array foreach $sym (keys %Vars) { @expands = split(/\s\s*/, $Vars{$sym}); $sub = $expands[$i]; $sub =~ s/\/\///g; # // is a void value while (s/!${sym}:([^\s]*)=([^\s]*)/,x##x,/) { # Replacing item is altered by some pattern local($p) = $1; local($q) = $2; local($subq) = $sub; eval "\$subq =~ s=${p}=${q}="; s/,x##x,/${subq}/; } s/!${sym}/${sub}/g; } # Protect substitution in an 'eval' in case of error eval "s/${pattern}\$//" if $pattern && $i == ($Vars_len - 1); &print_makefile($_); } } } # Prints its argument in MAKEFILE and records it also in Generated sub print_makefile { local($_) = shift(@_); # Line to be printed print MAKEFILE "$_\n"; push(@Generated, "$_\n"); } # Generates in MAKE file all the generated variable we have so far for # final Makefile. This is mainly intended to allow expansion of variables # which are already defined with an expand. sub gen_variables { undef %Gvars; # Reset already generated variables local ($in_symbol) = 0; # True when in variable (Makefile's macro) foreach (@Generated) { if ($in_symbol) { if (/^\s*(\w+)\s*=(.*)/) { # Missed the end of previous macro $in_symbol = 0; $Gvars{$1} = 1; # Definition of variable seen $in_symbol = 1 if (/\\\s*$/); # There is a final '\' print MAKE "void::\n"; # Cut incomplete esc sequence } else { $in_symbol = 0 if !(/\\\s*$/); # Last line } print MAKE; } elsif (/^\s*(\w+)\s*=(.*)/ && !$in_symbol) { # Found a makefile's macro declaration $Gvars{$1} = 1; # Definition of variable seen $in_symbol = 1 if (/\\\s*$/); # There is a final '\' print MAKE; } } print MAKE "void::\n"; # Cut incomplete escape sequence } # Parse line to extract all $(VAR) usage and trigger the symbol if VAR # is among the wanted set, as if they had manually said ">VAR" like in # the old days. sub find_wanted { my ($l) = @_; while ($l =~ s/\$\(([\w_]+)\)//) { $symbol{$1}++ if $wanted{$1}; } } !NO!SUBS! $grep -v '^;#' ../pl/tilde.pl >>jmake chmod 755 jmake $eunicefix jmake dist_3.5-36.001/jmake/README0000644000175000017500000000463710473316164015373 0ustar srivastasrivastaThis is the root directory for jmake. The jmake program is a Makefile generator. It comes from 'imake' one may find in the X11R4 distribution, but it produces a Makefile.SH instead of a Makefile. Jmake has a template which knows some metaconfig symbols and has built-in commands which make it more powerful than imake. The jmkmf script may be used to produce the Makefile.SH from a Jmakefile. Once the bootstrap is done, you can run 'make Makefile.SH' to rebuild the Makefile.SH in the current directory, or 'make Makefiles.SH' to build the Makefiles in a recursive manner. All the rules used by jmake are listed in an automatically built index. The jmake's cryptic syntax is documented in file NOTES. You may also have a look at the sample Jmakefiles that come with this package. Usually, you do not include them in the release, but I kept them so that you may have a real example and see how things are organized. If you choose to use jmake, then you will have to use metaconfig, in order to get a meaningful value for all the needed symbol. Thus, each time you change your Jmakefiles, it may be necessary to update the Configure script. Here is how to use jmake... First, you have to write a Jmakefile for each directory where you want to put a Makefile. Be sure to declare all the sub-directories with the SetSubdirs rule. Usually, the order of the rules is not significant, but you should make sure the Makefile begins with an 'all::' target, so that a default 'make' does not run a clean for instance. Then, if this is the first time, you have to bootstrap. Go to the main directory of your package and run: jmkmf make Makefiles.SH which will first produce the main makefile and then recursively build all the makefiles. Once you have bootstrapped once, you can edit a Jmakefile and rebuild the local makefile with make Makefile or all the hierachy below with: make Makefiles.SH If you want to extract all the makefiles, you may run sh Makefile.SH make Makefiles in the top-level directory. Finally, if you only want to test the generated Makefile.SH without disturbing the Makefile, run make Makefile.SH which will stop before running the produced file through sh. CAUTION: On machines whose cpp eats up tabs in macro expansion, the Makefile.SH produced might not be indented properly inside rules. Perl 4.0 PL10 sometimes dumps core, while PL3 does not. Thus, perl 4.0 PL10 should NOT be used with jmake, at least on a MIPS. dist_3.5-36.001/jmake/jmkmf.SH0000755000175000017500000000503710473316164016051 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting jmake/jmkmf (with variable substitutions)" $spitshell >jmkmf <>jmkmf <<'!NO!SUBS!' # @(#) Generates a Makefile from a Jmakefile # $Id: jmkmf.SH 1 2006-08-24 12:32:52Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $Log: jmkmf.SH,v $ # Revision 3.0.1.2 2004/08/21 23:18:13 ram # patch71: automatically figures the top dir and the current dir # patch71: don't run Makefile.SH if the jmake call failed # # Revision 3.0.1.1 1993/08/19 06:42:14 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:04:19 ram # Baseline for dist 3.0 netwide release. # usage="usage: $0 [top_of_sources_pathname [current_directory]]" curdir= case $# in 0) if test -f .package; then topdir=.; elif test -f ../.package; then topdir=..; elif test -f ../../.package; then topdir=../..; elif test -f ../../../.package; then topdir=../../..; elif test -f ../../../../.package; then topdir=../../../..; else echo "$0: WARNING: can't determine top package directory" >&2 fi ;; 1) topdir=$1 ;; 2) topdir=$1 curdir=$2 ;; *) echo "$usage" 1>&2; exit 1 ;; esac case "$topdir" in -*) echo "$usage" 1>&2; exit 1 ;; esac case "$curdir" in '') here=`pwd` top=`cd $topdir; pwd` curdir=`perl -e \ 'print substr($ARGV[0], length($ARGV[1])+1), "\n";' $here $top` case "$curdir" in '') curdir=.;; esac ;; esac if test -f Jmakefile; then : ok else echo "$0: no Jmakefile found in current directory" >&2 exit 1 fi if test -f Makefile.SH; then echo mv Makefile.SH Makefile.SH~ mv Makefile.SH Makefile.SH~ fi args="-DTOPDIR=$topdir -DCURDIR=$curdir" echo jmake $args if jmake $args; then echo sh Makefile.SH sh Makefile.SH else echo "jmake failed, aborting" >&2 exit 1 fi !NO!SUBS! chmod 755 jmkmf $eunicefix jmkmf dist_3.5-36.001/dist.man0000644000175000017500000002213410473666773015072 0ustar srivastasrivasta''' $Id: dist.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: dist.man,v $ ''' Revision 3.0.1.6 1995/05/12 11:57:53 ram ''' patch54: updated my e-mail address ''' ''' Revision 3.0.1.5 1994/10/29 15:46:03 ram ''' patch36: mentions new patlog script and ChangeLog file ''' ''' Revision 3.0.1.4 1994/05/06 13:54:17 ram ''' patch23: extended copyright notice to 1994 ''' patch23: new script kitpost ''' ''' Revision 3.0.1.3 1994/01/24 13:55:41 ram ''' patch16: documents profile and its components ''' ''' Revision 3.0.1.2 1993/11/10 17:31:03 ram ''' patch14: added mention for new confmagic.h file ''' ''' Revision 3.0.1.1 1993/08/24 12:12:00 ram ''' patch3: added entries for patnotify and patsnap ''' ''' Revision 3.0 1993/08/18 12:04:07 ram ''' Baseline for dist 3.0 netwide release. ''' ''' .de Ex \" Start of Example .sp .in +5 .nf .. .de Ef \" End of Example .sp .in -5 .fi .. .TH DIST 1 ram .SH NAME dist \- introduction to dist .SH DESCRIPTION The \fIdist\fR package is a set of tools meant to ease the construction and maintenance of portable software. There are four distinct parts in \fIdist\fR, and it is also meant to be used with two external products, which are publicly available: \fImailagent\fR and \fIpatch\fR. .PP The first component is the \fIConfigure\fR script generator, which is a portability tool. It is automatically build up by \fImetaconfig\fR from your sources and a set of units. Ideally, the end-user receiving your source code will simply have to read your README file, run the \fIConfigure\fR script (which is self-documented), and then run \fImake\fR. Your package should then build cleanly on every UNIX platform. .PP The second component is the \fIMakefile.SH\fR generator, which is a generic configured Makefile, reusing some of the information figured out by .I Configure. Although you may write your own Makefile and then use \fImakeSH\fR to transform it into a \fIMakefile.SH\fR, it is better to write a generic \fIJmakefile\fR description, which does not rely on a particular position within the source tree, and then use \fIjmake\fR to recursively build your Makefiles. .PP The third component is the package generator, which is used when it's time to build up the shell archives used to distribute your program. Although you may use your own archiving mechanism, the one included here knows about RCS files and will properly check out the lattest revisions, leaving your working files alone. The \fImakedist\fR program will also perform Copyright expansion, an useful feature when you share source files among more than one program, placed under distinct Copyright information. .PP The fourth and latest component is the patch generator, used to make updates of your sources, which can later be applied on the original distribution by using the \fIpatch\fR program. .PP Before using any of the \fIdist\fR programs, you should probably identify your package by running the \fIpackinit\fR program, which will create a \fI.package\fR file in the top-level directory of your package. .SH COMMANDS The \fIdist\fR package implements the following commands (those tagged as \fIlibrary\fR commands are to be found in the dist library and should not be made publicly available in everyone's path): .TP 15 bindex builds the \fIIndex\fR file (library). .PD 0 .TP jmake a Makefile.SH generator. .TP jmkmf bootstraps top-level Makefile.SH file. .TP kitpost posts distribution kits made by \fImakedist\fR. .TP kitsend sends distribution kits made by \fImakedist\fR. .TP makeSH wraps existing scripts into a .SH file. .TP makedist builds up distribution kits. .TP makegloss builds the \fIGlossary\fR file (library). .TP manicheck checks MANIFEST.new accuracy .TP manifake makes MANIFEST.new out of an existing MANIFEST. .TP manilist builds MANIFEST.new reports. .TP metaconfig a Configure script generator. .TP metalint a metaconfig unit consistency checker. .TP metaxref a metaconfig cross-reference builder. .TP packinit initializes a package (creates a .package file). .TP pat main patch generator. .TP patbase resets patch base to current version. .TP patcil checks new version in. .TP patclean remove working version of up-to-date files. .TP patcol checks file out. .TP patdiff builds (contextual) diffs for the patch. .TP patftp copies patches to public ftp directory. .TP patindex builds a patch index. .TP patlog handles ChangeLog file updates. .TP patmake puts diffs together into a patch. .TP patnotify notifies users that new patches have been released. .TP patpost posts patch to some newsgroup. .TP patsend mails patch to some people. .TP patsnap builds a release snapshot with files and RCS revisions. .PD .SH PROFILE Commands having a set of meaningful options (other than \fB\-h\fR or \fB\-V\fR) can also take arguments from the \fI~/.dist_profile\fR file, or whatever file the \fIDIST\fR environment variable points to. Each line of the file is in the format: .Ex profile-component: \fIvalue\fR .Ef whith shell-style comments (#) allowed provided they start the line. .PP Each command looks for a profile component entry matching its name and loads the \fIvalue\fR as if it were arguments specified on the command line. Those arguments precede any other argument specified manually, in case order is meaningful. .PP Some commands may also be configured from within the profile, by setting a specific \fIvariable\fR attached to the command by a profile entry looking like this: .Ex cmdname-\fIvariable\fR: \fIvalue\fR .Ef For instance, assuming the variable \fIc-files\fR is recognized by the \fImetaconfig\fR program, its default value could be overwritten by this profile entry: .Ex metaconfig-c-files: \fIsuitable value\fR .Ef Only the first '-' after the command name is part of the syntax, the other one used in the variable name is pure convention. Please refer to the manual page of each command for a list of valid profile variables which may be set. .SH FILES .PD 0 .TP 15 \&.MT Temporary directory created by \fImetaconfig\fR and friends. .TP \&.newer A list of files newer than \fIpatchlevel.h\fR, used by the patching tools. .TP \&.package Main configuration file used by most of the dist tools to make them smart. .TP ChangeLog The file where changes are recorded. Its name may be configured by running \fIpackinit\fR, but this is the default "generic" name under which it is referred to within the documentation. .TP Configure The generated configuration script. .TP Glossary A list of all the known portability symbols known by \fImetaconfig\fR. This file is located in the dist library directory. .TP I.fui Cross-reference file generated by \fImetaxref\fR, sorted by file, unit, item. .TP I.uif Cross-reference file generated by \fImetaxref\fR, sorted by unit, item, file. .TP Index A list of all the rules known by \fIjmake\fR. This file is located in the dist library directory. .TP Jmakefile Generic makefile description used by \fIjmake\fR. .TP MANIFEST List of all the files to be included in the distribution. Usually a copy (not a link) of MANIFEST.new. .TP MANIFEST.new List of all the files to be taken into account by the dist tools. .TP Makefile.SH The generated configured makefile (via Jmakefile) or hand-generated Makefile making use of known metaconfig symbols. .TP Obsolete A list of obsolete symbol used and their new equivalents. .TP RCS Directory where RCS files are stored. .TP README Main file explaining how to build your package. .TP U Private unit directory. .TP Wanted File used by \fImetaconfig\fR, listing all the symbols used by the sources. .TP bugs Directory where patches are stored. .TP check.extra Extra files present in MANIFEST.new, generated by \fImanicheck\fR. .TP check.want Missing files from MANIFEST.new, generated by \fImanicheck\fR. .TP config_h.SH Generated config.h template. .TP confmagic.h Magic symbol remapping, activated via metaconfig's \fB\-M\fR option. .TP hints This directory lists all the configuration hints for your package. .TP patchlevel.h File recording your package patch level, should not be part of MANIFEST.new, but may be listed in MANIFEST, at your discretion. .TP users File recording the users of your package, generated by mailagent's \fIpackage\fR command (see the MailAuthor.U unit and mailagent 3.0). .PD .SH ENVIRONMENT The following environment variable is paid attention to: .TP 15 DIST Location of the dist profile, defaults to ~/.dist_profile. This variable is subject to ~name substitution, even if your shell does not support it. .SH AUTHORS By chronological order: .sp Larry Wall (dist 2.0 in 1988) .br Harlan Stenn (worked on dist 3.0 1990-1992) .br Raphael Manfredi (dist 3.0 and integration 1991-1995) .sp Please look at the \fICredits\fR file in the distribution source tree for a list of all the known contributors. .SH "SEE ALSO" jmake(1), metaconfig(1), pat(1). dist_3.5-36.001/kit/0002755000175000017500000000000012645366677014224 5ustar srivastasrivastadist_3.5-36.001/kit/kitsend.man0000644000175000017500000000270110473666773016355 0ustar srivastasrivasta''' $Id: kitsend.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: kitsend.man,v $ ''' Revision 3.0.1.1 1994/05/06 14:00:11 ram ''' patch23: documented new -V and -h options ''' ''' Revision 3.0 1993/08/18 12:04:26 ram ''' Baseline for dist 3.0 netwide release. ''' .TH KITSEND 1 ram .SH NAME kitsend \- sends distribution kits .SH SYNOPSIS .B kitsend [ .B \-hV ] [ \fIkits\fR ] \fIrecipients\fR .SH DESCRIPTION .I Kitsend sends distribution kits made by \fImakedist\fR to some recipients specified on the command line. If you do not specify any kit list, then all the kits are sent. Otherwise, only the specified kits will be (re)sent. .PP A kit list may include ranges, \fI1-10\fR specifying kits 1 through 10, and \fI5-\fR meaning kits 5 up to the last one. You may also specify kit numbers by separating them with commas or spaces, and even mix with ranges, such as: \fI1 3 5-7 9\fR. .PP The \fB\-h\fR switch will print out the usage and \fB-V\fR will print the version number. .SH AUTHOR Harlan Stenn .SH "SEE ALSO" makedist(1), kitpost(1). dist_3.5-36.001/kit/kitsend.SH0000755000175000017500000001046411344533734016110 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting kit/kitsend (with variable substitutions)" cat >kitsend < # # $Log: kitsend.SH,v $ # Revision 3.0.1.2 1994/05/06 13:59:57 ram # patch23: random code cleanup to follow pat tools style # patch23: made configurable from dist profile # patch23: now understands -V and -h options # patch23: mails now flagged with a bulk precedence # patch23: added X-Mailer header and now calls mailer via open() # # Revision 3.0.1.1 1993/08/19 06:42:15 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:04:25 ram # Baseline for dist 3.0 netwide release. # \$orgname='$orgname'; \$mailer='$mailer'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; !GROK!THIS! cat >>kitsend <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless &Getopts('hV'); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } $orgname = &tilda_expand($orgname); chop($orgname = `cat $orgname`) if $orgname =~ m|^/|; &readpackage; while ($_ = shift) { if (/^(kit)?[1-9][\d,-]*$/) { s/^kit//; push(@argv, $_); } else { push(@dest, $_); } } $dest = join(' ',@dest); &usage unless $dest; @ARGV = @argv; if (-f "$package.kit10") { @filelist = <$package.kit[0-9][0-9]>; } else { @filelist = <$package.kit[0-9]>; } pop(@filelist) =~ /(\d+)$/ && ($maxnum = $1 + 0); if ($#ARGV < 0) { $argv = "1-$maxnum"; @ARGV = $argv; } $argv = &rangeargs(@ARGV); @ARGV = split(' ', $argv); $argv =~ s/ $//; if ($#ARGV < 0) { die "$progname: no kits specified.\n"; } elsif ($#ARGV) { print "$progname: sending $package $baserev kits $argv to $dest...\n"; } else { print "$progname: sending $package $baserev kit $argv to $dest...\n"; } fork && exit; $opt = '-odq' if $mailer =~ /sendmail/; until ($#ARGV < 0) { $kitnum = shift; # Provision for broken mailers... @dest = split(' ', $dest); while (@smalldest = splice(@dest, 0, 50)) { $to = join(', ', @smalldest); # Sensible To: for sendmail $smalldest = join(' ', @smalldest); open(MAILER, "|$mailer $opt $smalldest") || die "$progname: can't fork $mailer: $!\n"; print MAILER "To: $to Subject: $package $baserev kit #$kitnum Precedence: bulk X-Mailer: dist [version $version PL$patchlevel] Organization: $orgname [There are $maxnum kits for $package version $baserev.] "; $kitnum = "0$kitnum" if $kitnum < 10 && $maxnum >= 10; open(FILE,"$package.kit$kitnum") || die "$progname: can't open $package.kit$kitnum: $!\n"; while () { print MAILER; } close FILE; close MAILER; warn "$progname: ERROR mailing of $package.kit$kitnum to $dest\n" if $?; } } sub usage { print STDERR <= 0) { $_ = shift(@_); while (/^\s*\d/) { s/^\s*(\d+)//; $min = $1; if (s/^,//) { $max = $min; } elsif (s/^-(\d*)//) { $max = $1; if ($max == 0 && $maxnum) { $max = $maxnum; } s/^[^,],?//; } else { $max = $min; } for ($i = $min; $i <= $max; ++$i) { $result .= $i . ' '; } } } $result; } !NO!SUBS! $grep -v '^;#' ../pl/package.pl >>kitsend $grep -v '^;#' ../pl/tilde.pl >>kitsend $grep -v '^;#' ../pl/profile.pl >>kitsend chmod +x kitsend $eunicefix kitsend dist_3.5-36.001/kit/Makefile.SH0000755000175000017500000001523011474560157016163 0ustar srivastasrivasta: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-43] : $X-Id: Jmake.tmpl 47 2010-11-28 22:23:13Z rmanfredi $ case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac CURRENT=kit DIR=`echo $CURRENT/ | sed -e 's/\.\///g'` echo "Extracting ${DIR}Makefile (with variable substitutions)" INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'` INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'` DATE=`date` $spitshell >Makefile <>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files # $X-Id: Jmake.rules 18 2006-12-27 10:35:09Z rmanfredi $ ######################################################################## # Start of Jmakefile # $X-Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $X-Log: Jmakefile,v $ # Revision 3.0.1.2 1994/04/22 09:35:35 ram # patch23: new kitpost script # # Revision 3.0.1.1 1994/01/24 13:42:21 ram # patch16: added dependency generation stage # # Revision 3.0 1993/08/18 12:04:21 ram # Baseline for dist 3.0 netwide release. # SCRIPT = makedist manifake kitsend kitpost all:: $(SCRIPT) local_realclean:: $(RM) $(SCRIPT) makedist: makedist.SH /bin/sh makedist.SH manifake: manifake.SH /bin/sh manifake.SH kitsend: kitsend.SH /bin/sh kitsend.SH kitpost: kitpost.SH /bin/sh kitpost.SH local_install:: $(SCRIPTS) $(LSCRIPTS) @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \ for file in $(SCRIPTS) $(LSCRIPTS); do \ (set -x; \ $(INSTALL) -c -m 555 $$file $(INSTALL_PREFIX)$(SCRIPTDIR)) || \ exit 1; \ done local_deinstall:: @for file in $(SCRIPTS) $(LSCRIPTS); do \ case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/$$file); \ done local_install.man:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \ for file in $(SCRIPTS); do \ if test -f $$file.man; then \ (set -x; \ $(INSTALL) -c -m 444 $$file.man \ $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)) || \ exit 1; \ fi; \ done local_deinstall.man:: case '${MFLAGS}' in *[i]*) set +e;; esac; \ for file in $(SCRIPTS); do \ (set -x; $(RM) $(INSTALL_PREFIX)$(MANSRC)/$$file.$(L)); \ done local_install:: makeSH @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \ $(INSTALL) -c -m 555 makeSH $(INSTALL_PREFIX)$(SCRIPTDIR) local_deinstall:: $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/makeSH local_install.man:: makeSH.man @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(MANSRC) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(MANSRC)); \ $(INSTALL) -c -m 444 makeSH.man $(INSTALL_PREFIX)$(MANSRC)/makeSH.$(L) local_deinstall.man:: $(RM) $(INSTALL_PREFIX)$(MANSRC)/makeSH.$(L) SCRIPTSH = \ makedist.SH \ manifake.SH \ kitsend.SH \ kitpost.SH depend:: local_depend local_depend:: ($(SED) '/^# DO NOT DELETE/q' Makefile && \ grep '^\$$grep' $(SCRIPTSH) | \ $(SED) -e "s/^.*' \([^ ]*\) >>[ ]*\([^ ]*\)/\2: \1/" \ ) > Makefile.new cp Makefile Makefile.bak cp Makefile.new Makefile $(RM) Makefile.new ######################################################################## # Common rules for all Makefiles -- do not edit all:: clean: local_clean realclean: local_realclean clobber: local_clobber local_clean:: if test -f core; then $(RM) core; fi $(RM) *~ *.o local_realclean:: local_clean local_clobber:: local_realclean $(RM) Makefile config.sh install:: local_install install.man:: maybe_install.man deinstall:: local_deinstall deinstall.man:: maybe_deinstall.man install.man-yes: local_install.man install.man-no: deinstall.man-yes: local_deinstall.man deinstall.man-no: !NO!SUBS! case "$installmansrc" in '') man=no;; *) man=yes;; esac $spitshell >>Makefile <>Makefile <<'!NO!SUBS!' Makefile.SH: Jmakefile -@if test -f $(TOP)/.package; then \ if test -f Makefile.SH; then \ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ fi; \ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ else touch $@; fi Makefile: Makefile.SH /bin/sh Makefile.SH tags:: $(CTAGS) -w *.[ch] $(CTAGS) -xw *.[ch] > tags local_clobber:: $(RM) tags depend:: ######################################################################## # Empty rules for directories with no sub-directories -- do not edit local_install:: @echo "install in $(CURRENT) done." local_deinstall:: @echo "deinstall in $(CURRENT) done." local_install.man:: @echo "install.man in $(CURRENT) done." local_deinstall.man:: @echo "deinstall.man in $(CURRENT) done." Makefiles:: Makefiles.SH:: ######################################################################## # Dependencies generated by make depend # DO NOT DELETE THIS LINE -- make depend relies on it # Put nothing here or make depend will gobble it up .FORCE_DEPEND:: @echo "You must run 'make depend' in $(TOP) first."; exit 1 !NO!SUBS! chmod 644 Makefile $eunicefix Makefile dist_3.5-36.001/kit/makedist.man0000644000175000017500000001136610473666773016524 0ustar srivastasrivasta.rn '' }` ''' $Id: makedist.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: makedist.man,v $ ''' Revision 3.0.1.2 1995/05/12 11:58:16 ram ''' patch54: updated my e-mail address ''' ''' Revision 3.0.1.1 1994/05/06 14:00:50 ram ''' patch23: now mentions kitpost and kitsend ''' ''' Revision 3.0 1993/08/18 12:04:31 ram ''' Baseline for dist 3.0 netwide release. ''' ''' .de Sh .br .ne 5 .PP \fB\\$1\fR .PP .. .de Sp .if t .sp .5v .if n .sp .. ''' ''' Set up \*(-- to give an unbreakable dash; ''' string Tr holds user defined translation string. ''' Bell System Logo is used as a dummy character. ''' .ie n \{\ .tr \(*W-\*(Tr .ds -- \(*W- .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch .ds L" "" .ds R" "" .ds L' ' .ds R' ' 'br\} .el\{\ .ds -- \(em\| .tr \*(Tr .ds L" `` .ds R" '' .ds L' ` .ds R' ' 'br\} .TH MAKEDIST 1 LOCAL .SH NAME makedist \- a distribution kit maker .SH SYNOPSIS .B makedist [ \fB\-dhqvV\fR ] [ \fB\-c\fI dir\fR ] [ \fB\-s\fI size\fR ] [\fB\-f \fImanifest\fR ] .SH DESCRIPTION .I Makedist is a rather simpleminded shar program that knows how to pack files into multiple kits of approximately 50000 bytes each. The shar scripts produced assume very little about the target machine; there is correspondingly little error checking done compared to other shar programs. Alternatively, with the \fB\-c\fR option, you can create a directory containing the whole source tree, and then pack it up using your own shell archiver. .PP If you are using the copyright expansion feature (as determined by \fIpackinit\fR), then you have to pack your distribution using this program to ensure the copyright is correctly set. .PP In order to run \fImakedist\fR you have to do two things: .IP 1) 4 Create a .package file in the package's top-level directory by running \fIpackinit\fR. This program will ask you about your package and remember what you tell it so that all the \fIdist\fR programs can be smart. .IP 2) 4 Create a MANIFEST.new file in your top-level directory that lists all the files in your package. The filename should be the first field on each line. After some whitespace you can add a comment describing your file (briefly). .PP After running \fImakedist\fR, you will have a set of kits in your top-level directory. If your package name is "foo", they will be named foo.kit1, foo.kit2, etc. The file created PACKLIST file is automatically added to the distribution and tells which files come with which kits. If you used the \fB\-c\fR option, you will end-up with a single directory instead, containing the whole distribution, ready to be sent to the end-user. .PP If a file is too large to be packed as-is in one archive, it will be automatically split in smaller parts. Only the first 11 characters of the file will be kept though, and \fImakedist\fR will abort if two distinct files are to be split and have the same 11 first characters in their names. The split files will automatically be reconstructed at the end of the archive extraction by runnning a script generated in PACKNOTES. .PP You may then mail your kits via \fIkitsend\fR or post them with \fIkitpost\fR. .SH OPTIONS The following options are handled by \fImakedist\fR: .TP 10 .B \-c \fIdir\fR Tell \fImakedist\fR that the distribution should be copied (mirrored) in the specified directory, instead of producing shell archives. Compatible with the \fB\-q\fR option. .TP .B \-d Turn on debug mode. Probably not useful. .TP \fB-f\fI file\fR Use \fIfile\fR as manifest. By default, MANIFEST.new is used. .TP .B \-h Print help message and exit. .TP .B \-q Quick production of the kits: the checked-out version of the files is used, instead of using the RCS file to actually get the latest checked-in version. This will save some considerable time, but you have to be sure the checked-out version is up-to-date or you might end up with an inconsistent package. .TP \fB\-s\fI size\fR Set maximum kit size to \fIsize\fR bytes. .TP .B \-v Verbose mode: trace kit building process or tree mirroring. .TP .B \-V Print version number and exit. .SH AUTHORS Larry Wall (version 2.0) .br Raphael Manfredi .SH FILES Creates ./$package.kit* unless \fB\-c\fR option is used. .br PACKLIST and PACKNOTES are also temporarily created. .SH "SEE ALSO" kitsend(1), kitpost(1), metaconfig(1), patcol(1) .rn }` '' dist_3.5-36.001/kit/kitpost.man0000644000175000017500000000517410473666773016420 0ustar srivastasrivasta''' $Id: kitpost.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: kitpost.man,v $ ''' Revision 3.0.1.2 1995/05/12 11:58:09 ram ''' patch54: updated my e-mail address ''' ''' Revision 3.0.1.1 1994/05/06 13:55:01 ram ''' patch23: created ''' .TH KITSEND 1 ram .SH NAME kitpost \- posts distribution kits .SH SYNOPSIS .B kitpost [ .B \-hrV ] [ .B -H .I file ] [ .B -D .I desc ] [ .B -m .I dest1,dest2 ] [ .I kits ] [ .I newsgroups ] .SH DESCRIPTION .I Kitpost posts distribution kits made by \fImakedist\fR to some (source) newsgroups specified on the command line. If you do not specify any kit list, then all the kits are sent. Otherwise, only the specified kits will be (re)sent. .PP A kit list may include ranges, \fI1-10\fR specifying kits 1 through 10, and \fI5-\fR meaning kits 5 up to the last one. You may also specify kit numbers by separating them with commas or spaces, and even mix with ranges, such as: \fI1 3 5-7 9\fR. .PP .I Kitpost ensures correct \fIReferences:\fR lines are inserted in your postings so that all parts but the first point to the root article. Threaded newsreaders and end-users traditionally appreciate that. .SH OPTIONS The following options are recognized by \fIkitpost\fR: .TP 10 .B \-h Print help message and exit. .TP \fB\-m\fI dest1,destn\fR Sends kits by e-mail to the specified recipients. This option may be used in conjunction with newsgroup posting. It is mainly intended for sites where direct posting to a moderated newsgroup is not allowed by \fIinews\fR. You may thus send your kits to the newsgroup moderator in a form that will ease the whole posting process. .TP .B \-r Signals a repost. .TP \fB\-D\fI description\fR Specify a description string that will be added to the subject line. Usually a brief sentence (less than, say, 40 characters). .TP \fB\-H\fI file\fR Specify a file to be used as header introduction in the first part of your posting. Usually the root README file. .TP .B \-V Print version number and exit. .SH BUGS Article cross-referencing is properly set-up only when the whole package is (re)posted in one batch. .PP It is not currently possible to set-up the article headers manually or better, interactively. .SH AUTHOR Raphael Manfredi .SH "SEE ALSO" makedist(1), kitsend(1). dist_3.5-36.001/kit/manifake.SH0000755000175000017500000000261511344533734016221 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting kit/manifake (with variable substitutions)" $spitshell >manifake <>manifake <<'!NO!SUBS!' $NEWMANI = 'MANIFEST.new'; $MANI = 'MANIFEST'; &manifake; !NO!SUBS! chmod 755 manifake $grep -v '^;#' ../pl/manifake.pl >> manifake $eunicefix manifake dist_3.5-36.001/kit/Jmakefile0000644000175000017500000000231211474560045016012 0ustar srivastasrivasta/* * Jmakefile for kit maker */ ;# $Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: Jmakefile,v $ ;# Revision 3.0.1.2 1994/04/22 09:35:35 ram ;# patch23: new kitpost script ;# ;# Revision 3.0.1.1 1994/01/24 13:42:21 ram ;# patch16: added dependency generation stage ;# ;# Revision 3.0 1993/08/18 12:04:21 ram ;# Baseline for dist 3.0 netwide release. ;# SCRIPT = makedist manifake kitsend kitpost ShellScriptTarget($(SCRIPT)) InstallScript(makeSH,$(SCRIPTDIR)) InstallManPage(makeSH,$(MANSRC)) SCRIPTSH = \ |expand f!$(SCRIPT)! !f.SH \ -expand \\ depend:: local_depend local_depend:: ($(SED) '/^# DO NOT DELETE/q' Makefile && \ grep '^\$$grep' $(SCRIPTSH) | \ $(SED) -e "s/^.*' \([^ ]*\) >>[ ]*\([^ ]*\)/\2: \1/" \ ) > Makefile.new cp Makefile Makefile.bak cp Makefile.new Makefile $(RM) Makefile.new dist_3.5-36.001/kit/makedist.SH0000755000175000017500000003013411344533734016244 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac echo "Extracting kit/makedist (with variable substitutions)" cat >makedist <>makedist <<'!NO!SUBS!' &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless &Getopts('c:f:dhvqs:V'); $ENV{'DIST'} = '/dev/null'; # Disable ~/.dist_profile if ($opt_V) { print STDERR "makedist $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } $MAXKITSIZE = 50000 unless $MAXKITSIZE = $opt_s; $KITOVERHEAD = 1800; $FILEOVERHEAD = 90; $CHOPSIZE = $MAXKITSIZE - $KITOVERHEAD - $FILEOVERHEAD; $NEWMANI = 'MANIFEST.new' unless $NEWMANI = $opt_f; $MANI = 'MANIFEST' unless $opt_f; $PACKLIST = 'PACKLIST'; $PACKNOTES = 'PACKNOTES'; $tmpdir = "/tmp/MKst$$"; # Where to copy distribution $tmpdir = '.' if $opt_q; # Quick mode: no need to copy distribution &set_sig('aborted'); # Make sure we clean up in case of emergency &readpackage; &get_patchlevel; eval '&manifake'; # Want to trap possible die and redirect to fatal if ($@ ne '') { chop($@); &fatal($@); } if ($opt_c) { # Copy distribution only, no shell archive &distcopy; exit 0; } &distfake; ©right'init($copyright) if -f $copyright; unlink <$package.kit? $package.kit??>; chop($curdir = `pwd`); chdir $tmpdir || die "Can't chdir to $tmpdir.\n"; &maniread; &kitlists; &manimake; &kitbuild; &cleanup; exit 0; # Physically build the kits sub kitbuild { $numkits = $#list; if ($numkits > 9) { $sp = '%02d'; } else { $sp = '%d'; } for ($kitnum = 1; $kitnum <= $numkits; $kitnum++) { $list = $list[$kitnum]; $kit = sprintf("$package.kit" . $sp,$kitnum); print "*** Making $kit ***\n"; open(KIT,">$curdir/$kit") || do fatal("Can't create $curdir/$kit: $!"); &kitleader; @files = split(' ',$list); reset 'X'; for $file (@files) { $_ = $file; while (s|^(.*)/.*$|$1|) { push(@Xdirs,$_) unless $Xseen{$_}++; } } print KIT "mkdir ",join(' ', sort @Xdirs)," 2>/dev/null\n"; foreach $file (@files) { print "\t",$file,"\n" if $opt_v; print KIT "echo Extracting $file\n"; print KIT "sed >$file <<'!STUFFY!FUNK!' -e 's/X//'\n"; open(FILE, $file); ©right'reset; # Reset copyright for new file while () { # Use Lock[e]r as a pattern in case it is applied on ourselves s|Lock[e]r:.*\$|\$|; # Remove locker mark print KIT ©right'filter($_, 'X'); } close FILE; print KIT "!STUFFY!FUNK!\n"; -x "$file" && (print KIT "chmod +x $file\n"); } &kittrailer; chmod 0755, $kit; } } sub kitlists { for $filename (keys %comment) { next if $filename =~ m|/$|; # Skip directories next if -d $filename; # Better safe than sorry ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($filename); # Make sure file is not larger than the CHOPSIZE limit. If it is, # a split is attempted. if ($size > $CHOPSIZE) { print "Splitting $filename...\n" if $opt_v; $file_comment = $comment{$filename}; open(FILE, $filename) || die "Can't open $filename: $!\n"; $piece = 'AA'; ($dir, $name) = ('.', $filename) unless ($dir, $name) = ($filename =~ m|(.*)/(.*)|); $chopped = $dir . '/' . substr($name, 0, 11); $chopped =~ s|^\./||; &fatal("There is already a split file named $chopped") if defined $Chopped{$chopped}; $Chopped{$chopped} = $filename; # Association split <-> real file $size = 0; open(CURPIECE, ">$chopped:$piece") || &fatal("Can't create $chopped:$piece: $!"); while () { if ($size + length($_) > $CHOPSIZE) { close CURPIECE; $size{"$chopped:$piece"} = $size; $comment{"$chopped:$piece"} = "$file_comment (part $piece)"; push(@files, "$chopped:$piece"); print "\t$chopped:$piece ($size bytes)\n" if $opt_v; $size = 0; $piece++; # AA -> AB, etc... open(CURPIECE, ">$chopped:$piece") || &fatal("Can't create $chopped:$piece: $!"); } print CURPIECE $_; $size += length($_); } close FILE; close CURPIECE; $size{"$chopped:$piece"} = $size; $comment{"$chopped:$piece"} = "$file_comment (part $piece)"; push(@files, "$chopped:$piece"); print "\t$chopped:$piece ($size bytes)\n" if $opt_v; delete $comment{$filename}; # File split, not in PACKLIST } else { $size += 1000000 if $filename =~ /README/; $size{$filename} = $size; push(@files, "$filename"); } } # Build a file PACKNOTES to reconstruct split files if (defined %Chopped) { open(PACKNOTES, ">$PACKNOTES") || &fatal("Can't create PACKNOTES: $!"); foreach (keys %Chopped) { print PACKNOTES < $Chopped{$_} rm -f $_:[A-Z][A-Z] EOC } close PACKNOTES; push(@files, $PACKNOTES); $comment{$PACKNOTES} = 'Script to reconstruct split files'; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($PACKNOTES); $size{$PACKNOTES} = $size; } # Currently, file PACKLIST does not exist, so its size is unknown and # it cannot be correctly put in one archive. Therefore, we take the # size of MANIFEST.new, which will give us a good estimation. push(@files, 'PACKLIST'); ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($NEWMANI); $size{$PACKLIST} = $size; sub revnum { $size{$a} < $size{$b} ? 1 : $size{$a} > $size{$b} ? -1 : 0; } @files = sort revnum @files; for (@files) { $size = $size{$_}; $size -= 1000000 if /README/; $i=1; while (($newtot = int($tot[$i] + $size + $size/40 + $FILEOVERHEAD)) > $MAXKITSIZE-$KITOVERHEAD && $tot[$i]) { $i++; } $tot[$i] = $newtot; print "Adding $_ to kit $i giving $newtot bytes\n" if $opt_d; $kit{$_} = $i; $list[$i] .= " $_"; } } # Read manifest file and initialize the %comment array. sub maniread { do fatal("You don't have a $NEWMANI file. Run manifake") unless -f "$NEWMANI"; open(NEWMANI,$NEWMANI) || do fatal("Can't read $NEWMANI: $!"); while () { ($key,$val) = split(' ',$_,1) unless ($key,$val) = /^(\S+)\s+(.*)/; $comment{$key} = $val; } close NEWMANI; } # MANIFEST and MANIFEST.new must say the same thing. Create the # PACKLIST file (thus avoiding kit numbers in MANIFEST, which causes big # patches when only re-ordering occurred). Note that PACKLIST should # not appear in MANIFEST.new (the user may remove it). sub manimake { # Add built packlist $comment{$PACKLIST} = 'Which files came with which kits'; open(PACKLIST, ">$PACKLIST") || do fatal("Can't create $PACKLIST: $!"); print PACKLIST "After all the $package kits are run you should have the following files: Filename Kit Description -------- --- ----------- "; for (sort keys(comment)) { printf PACKLIST "%-27s %2s %.47s\n", $_, $kit{$_}, $comment{$_}; } close PACKLIST; } sub kitleader { local($plevel); $plevel = " at patchlevel $patch_level" if $patch_level ne ''; print KIT <kit${kitnum}isdone run='' config='' for iskit in$rangelist; do if test -f kit\${iskit}isdone; then run=\"\$run \$iskit\" else todo=\"\$todo \$iskit\" fi done case \$todo in '') echo \"You have run all your kits.\" EOM if (defined %Chopped) { # Some splitting occurred print KIT <) { /^#define\s+PATCHLEVEL\s+(\w+)/ && ($patch_level = $1); } close PL; } } sub distfake { return if $opt_q; local($sw); $sw = 's' unless $opt_v; mkdir($tmpdir, 0700) || die "Can't create directory $tmpdir.\n"; print "Building a copy of distribution in $tmpdir...\n" if $opt_v; system 'perl', '-S', 'patcol', "-a$sw", '-f', $NEWMANI, '-d', $tmpdir; system 'cp', $NEWMANI, "$tmpdir/$NEWMANI" unless -f "$tmpdir/$NEWMANI" && !$opt_f; } sub distcopy { local($sw); # Switch to force patcol to copy checked out files &makedir($opt_c); print "Building a copy of distribution in $opt_c...\n" if $opt_v; $sw = 'c' if $opt_q; $sw .= 's' unless $opt_v; system 'perl', '-S', 'patcol', "-aRC$sw", '-f', $NEWMANI, '-d', $opt_c; } sub distrm { return if $opt_q; print "Removing distribution in $tmpdir...\n" if $opt_v; chdir "/"; # Do not stay in removed directory... system '/bin/rm', '-rf', "$tmpdir"; } sub splitrm { foreach $base (keys %Chopped) { print "Removing split files for $base:\n" if $opt_v; $piece = 'AA'; while (-f "$base:$piece") { print "\t$base:$piece\n" if $opt_v; unlink "$base:$piece"; $piece++; # AA -> AB, etc... } } } sub cleanup { &distrm if -d $tmpdir; if ($opt_q) { &splitrm; # Remove in-place split files unlink $PACKLIST, $PACKNOTES; } } sub fatal { local($reason) = shift(@_); &cleanup; die "$reason\n"; } sub set_sig { local($handler) = @_; $SIG{'HUP'} = $handler; $SIG{'INT'} = $handler; $SIG{'QUIT'} = $handler; $SIG{'TERM'} = $handler; } sub aborted { &set_sig('IGNORE'); $opt_v = 1; # Force verbose message in distrm &cleanup; print "Aborted.\n"; exit 1; } sub usage { print STDERR <>makedist $grep -v '^;#' ../pl/manifake.pl >>makedist $grep -v '^;#' ../pl/copyright.pl >>makedist $grep -v '^;#' ../pl/makedir.pl >>makedist $grep -v '^;#' ../pl/tilde.pl >>makedist $grep -v '^;#' ../pl/profile.pl >>makedist chmod +x makedist $eunicefix makedist dist_3.5-36.001/kit/makeSH.man0000644000175000017500000000327010473666773016066 0ustar srivastasrivasta''' $Id: makeSH.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: makeSH.man,v $ ''' Revision 3.0 1993/08/18 12:04:27 ram ''' Baseline for dist 3.0 netwide release. ''' ''' .TH MAKESH 1 LOCAL .SH NAME makeSH \- a .SH script maker .SH SYNOPSIS .B makeSH .I files .SH DESCRIPTION .I MakeSH examines one or more scripts and produces a .SH file that, when run under sh, will produce the original script. The .SH script so produced has two sections containing code destined for the output. The first section has variable substitutions performed on it (taking values from config.sh), while the second section does not. MakeSH does not know which variables you want to have substituted, so it puts the whole script into the second section. It's up to you to insert any variable substitutions in the first section for any values you want from config.sh. .PP You should run .I makeSH from within your top-level directory and use the relative path to the file as an argument, so that the "Extracting ..." line printed while running the produced .SH file later on will give that same path. .SH AUTHOR Larry Wall .SH SEE ALSO pat(1), metaconfig(1), makedist(1). .SH BUGS It could assume that variables from metaconfig's Glossary need to be initialized in the first section, but I'm too lazy to make it do that. dist_3.5-36.001/kit/README0000644000175000017500000000266510473316164015072 0ustar srivastasrivastaThis directory contains a rudimentary kit maker. N.B.: This must not be confused with the kit package, which is a set of shell scripts for sending arbitrary files and directories by mail and unpacking them. One could call kit a binary tarmailer. The kit package has been released separately from dist (posted on comp.sources.unix in 1991). Larry Wall said: Depending on where you are going to send your kits you might prefer to use Rich $alz's kit maker instead--it makes more robust kits but assumes more about the target system. I say: If you are using RCS 4.3, be sure to use makedist instead of your own shell archiver, unless you do not use $Id, $Header or $Locker markers. Moreover, makedist will take the latest checked in revision intead of the working file, so that you archive a coherent package even if you made some mods since the last patch. You run makedist in the top level directory of your package and it uses the MANIFEST.new file to generate shar scripts of about 50000 bytes each. Just make sure MANIFEST.new contains everything you want, including any Configure, config.h.SH, or patchlevel.h files. A prototype patchlevel.h may be found in ../gen/patchlevel.h. See the manpage for more details. If you do not wish to build up shell archives but an up-to-date copy of your source tree, run someting like: makedist -c dir to build an up-to-date source tree in dir, which you can then archive using your own shell archiver. dist_3.5-36.001/kit/manifake.man0000644000175000017500000000273210473666773016473 0ustar srivastasrivasta''' $Id: manifake.man 3 2006-08-25 21:39:07Z rmanfredi $ ''' ''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ''' ''' You may redistribute only under the terms of the Artistic Licence, ''' as specified in the README file that comes with the distribution. ''' You may reuse parts of this distribution only within the terms of ''' that same Artistic Licence; a copy of which may be found at the root ''' of the source tree for dist 4.0. ''' ''' $Log: manifake.man,v $ ''' Revision 3.0.1.1 1995/05/12 11:58:21 ram ''' patch54: updated my e-mail address ''' ''' Revision 3.0 1993/08/18 12:04:33 ram ''' Baseline for dist 3.0 netwide release. ''' .TH MANIFAKE 1 ram .SH NAME manifake \- creates a MANIFEST.new out of a MANIFEST file .SH SYNOPSIS .B manifake .SH DESCRIPTION .I Manifake is a real simpleminded program that takes a MANIFEST file, such as one produced by a shar program, and creates a MANIFEST.new file ready to be used by all the dist programs. What it does is that all archive numbers are removed and the optional leading comments up to a dashed-line are thrown away. .PP .I Manifake will typically be used when converting an existing package to use \fImetaconfig\fR or any other dist utility. .SH AUTHOR Raphael Manfredi .SH FILES .PD 0 .TP 20 MANIFEST Original manifest produced by some shar program .TP MANIFEST.new Faked manifest file, suitable for use by any dist programs. .PD .SH "SEE ALSO" makedist(1), metaconfig(1), pat(1). dist_3.5-36.001/kit/makeSH0000644000175000017500000000423110473316164015274 0ustar srivastasrivasta#!/bin/sh # $Id: makeSH,v 3.0.1.1 1993/08/19 06:42:16 ram Exp ram $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # Original Author: Larry Wall # # $Log: makeSH,v $ # Revision 3.0.1.1 1993/08/19 06:42:16 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:04:26 ram # Baseline for dist 3.0 netwide release. # for file do if test -f $file.SH; then mv $file.SH $file.SH.old echo "makeSH: renaming $file.SH as $file.SH.old." fi base=`basename $file` cat >$file.SH <$base <>$file.SH ;; esac cat >>$file.SH <>$base <<'!NO!SUBS!' BLURFL sed -e '1{' -e '/#!.*\/bin\/sh$/d' -e '}' $file >>$file.SH cat >>$file.SH <kitpost <>kitpost <<'!NO!SUBS!' $progname = &profile; # Read ~/.dist_profile require 'getopts.pl'; &usage unless $#ARGV >= 0; &usage unless &Getopts("hrVm:D:H:"); if ($opt_V) { print STDERR "$progname $version PL$patchlevel\n"; exit 0; } elsif ($opt_h) { &usage; } $RCSEXT = ',v' unless $RCSEXT; if ($inews eq 'inews') { $inews = '/usr/lib/news/inews' if -f '/usr/lib/news/inews'; } chdir '..' if -d '../bugs'; &readpackage; $orgname = &tilda_expand($orgname); chop($orgname = `cat $orgname`) if $orgname =~ m|^/|; if ($opt_r) { $repost = ' (REPOST)'; } while ($_ = shift) { if (/^(kit)?[1-9][\d\-]*$/) { s/^kit//; push(@argv,$_); } else { push(@ngroups,$_); } } $ngroups = join(',',@ngroups) unless $#ngroups < 0; $dest = $opt_m; &usage unless $ngroups || $dest; @ARGV = @argv; if (-f "$package.kit10") { @filelist = <$package.kit[0-9][0-9]>; } else { @filelist = <$package.kit[0-9]>; } pop(@filelist) =~ /(\d+)$/ && ($maxnum = $1 + 0); if ($#ARGV < 0) { $argv = "1-$maxnum"; @ARGV = $argv; } $argv = &rangeargs(@ARGV); @ARGV = split(' ', $argv); $argv =~ s/ $//; if ($#ARGV < 0) { print STDERR "$progname: no kits specified.\n"; &usage; } else { local($s) = $#ARGV ? 's' : ''; print "$progname: posting $package $baserev kit$s $argv to $ngroups...\n" if $ngroups; print "$progname: mailing $package $baserev kit$s $argv to $dest...\n" if $dest; } $desc = "$opt_D, " if $opt_D; fork && exit; # Compute a suitable root message ID that all parts will reference, so that # threaded news readers will correctly process them. # Unfortunately, this works only when all kits are sent. ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); $mon++; $rootmid = "$year$mon$mday$hour$min$sec.AA$$"; $first = $maxnum >= 10 ? "01" : "1"; $rootmsgid = "<$rootmid.P$first.$maintloc>"; until ($#ARGV < 0) { $kitnum = shift; $kitnum = "0$kitnum" if $kitnum < 10 && $maxnum >= 10; open(FILE, "$package.kit$kitnum") || die "$progname: can't open $package.kit$kitnum: $!\n"; if ($ngroups) { open(INEWS,"|$inews -h") || die "$progname: can't fork $inews: $!\n"; } if ($dest) { $opt = '-odq' if $mailer =~ /sendmail/; $dest =~ s/,/ /g; ($to = $dest) =~ s/\s+/, /g; open(MAILER,"|$mailer $opt $dest") || die "$progname: can't fork $mailer: $!\n"; } $msg_id = "<$rootmid.P$kitnum.$maintloc>"; $msg_id = $rootmsgid if $kitnum == 1; $msg_id .= "\nReferences: $rootmsgid" if $kitnum != 1; print INEWS "Newsgroups: $ngroups\n"; print MAILER "To: $to\n"; $head = < Archive-name: $package-$baserev/part$kitnum Environment: UNIX EOH print INEWS $head; print MAILER $head; if ($kitnum == 1 && $opt_H) { open(HEAD, $opt_H) || warn "$progname: can't open $opt_H: $!\n"; while () { print INEWS; print MAILER; } close HEAD; } while () { print INEWS; print MAILER; } close FILE; close INEWS; die "$progname: could not post part$kitnum.\n" if $ngroups && $?; close MAILER; die "$progname: could not send part$kitnum.\n" if $dest && $?; } sub usage { print STDERR <= 0) { $_ = shift(@_); while (/^\s*\d/) { s/^\s*(\d+)//; $min = $1; if (s/^,//) { $max = $min; } elsif (s/^-(\d*)//) { $max = $1; if ($max == 0 && $maxnum) { $max = $maxnum; } s/^[^,],?//; } else { $max = $min; } for ($i = $min; $i <= $max; ++$i) { $result .= $i . ' '; } } } $result; } !NO!SUBS! $grep -v '^;#' ../pl/package.pl >>kitpost $grep -v '^;#' ../pl/tilde.pl >>kitpost $grep -v '^;#' ../pl/profile.pl >>kitpost chmod +x kitpost $eunicefix kitpost dist_3.5-36.001/lib/0002755000175000017500000000000012645366677014203 5ustar srivastasrivastadist_3.5-36.001/lib/Makefile.SH0000755000175000017500000001622611474560045016144 0ustar srivastasrivasta: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-43] : $X-Id: Jmake.tmpl 47 2010-11-28 22:23:13Z rmanfredi $ case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac CURRENT=lib DIR=`echo $CURRENT/ | sed -e 's/\.\///g'` echo "Extracting ${DIR}Makefile (with variable substitutions)" INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'` INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'` DATE=`date` $spitshell >Makefile <>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files # $X-Id: Jmake.rules 18 2006-12-27 10:35:09Z rmanfredi $ ######################################################################## # Start of Jmakefile # $X-Id: Jmakefile 5 2006-08-25 22:09:39Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $X-Log: Jmakefile,v $ # Revision 3.0.1.1 1994/01/24 13:43:31 ram # patch16: added new directory for C code sources # # Revision 3.0 1993/08/18 12:04:34 ram # Baseline for dist 3.0 netwide release. # FILES = errnolist.a errnolist.mk FILES_SH = errnolist makedepend makedir INSTALLFLAGS = -m 444 all:: install:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for dir in $(PRIVLIB)/lib; do \ (set -x; test -d $$dir || $(INSTALLDIR) $$dir) || \ exit 1; \ done local_install:: $(FILES) @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/lib || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/lib); \ for i in $(FILES); do \ (set -x; $(INSTALL) -c $(INSTALLFLAGS) \ $$i $(INSTALL_PREFIX)$(PRIVLIB)/lib) || exit 1;\ done local_deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for i in $(FILES); do \ (set -x; $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/lib/$$i); \ done install:: errnolist.sh @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; $(INSTALL) -c -m 444 errnolist.sh $(PRIVLIB)/lib/errnolist.SH) deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; $(RM) $(PRIVLIB)/lib/errnolist.SH) install:: makedepend.sh @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; $(INSTALL) -c -m 444 makedepend.sh $(PRIVLIB)/lib/makedepend.SH) deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; $(RM) $(PRIVLIB)/lib/makedepend.SH) install:: makedir.sh @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; $(INSTALL) -c -m 444 makedir.sh $(PRIVLIB)/lib/makedir.SH) deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; $(RM) $(PRIVLIB)/lib/makedir.SH) ######################################################################## # Common rules for all Makefiles -- do not edit all:: clean: sub_clean local_clean realclean: sub_realclean local_realclean clobber: sub_clobber local_clobber local_clean:: if test -f core; then $(RM) core; fi $(RM) *~ *.o local_realclean:: local_clean local_clobber:: local_realclean $(RM) Makefile config.sh install:: local_install sub_install install.man:: maybe_install.man sub_install.man deinstall:: sub_deinstall local_deinstall deinstall.man:: sub_deinstall.man maybe_deinstall.man install.man-no: deinstall.man-no: maybe_install.man: install.man-no maybe_deinstall.man: deinstall.man-no Makefile.SH: Jmakefile -@if test -f $(TOP)/.package; then \ if test -f Makefile.SH; then \ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ fi; \ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ else touch $@; fi Makefile: Makefile.SH /bin/sh Makefile.SH tags:: $(CTAGS) -w *.[ch] $(CTAGS) -xw *.[ch] > tags local_clobber:: $(RM) tags depend:: ######################################################################## # Rules for building in sub-directories -- do not edit subdirs: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \ done sub_install:: @$(MAKE) subdirs TARGET=install VERB="Installing" FLAGS= sub_deinstall:: @$(MAKE) subdirs TARGET=deinstall VERB="Deinstalling" FLAGS= @echo "Back to $(CURRENT) for "deinstall... sub_install.man:: @$(MAKE) subdirs TARGET=install.man VERB="Installing man pages" FLAGS= sub_deinstall.man:: @$(MAKE) subdirs TARGET=deinstall.man VERB="Deinstalling man pages" FLAGS= @echo "Back to $(CURRENT) for "deinstall.man... sub_clean:: @$(MAKE) subdirs TARGET=clean VERB="Cleaning" FLAGS= @echo "Back to $(CURRENT) for "clean... sub_realclean:: @$(MAKE) subdirs TARGET=realclean VERB="Real cleaning" FLAGS= @echo "Back to $(CURRENT) for "realclean... sub_clobber:: @$(MAKE) subdirs TARGET=clobber VERB="Clobbering" FLAGS= @echo "Back to $(CURRENT) for "clobber... tag:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \ $(MAKE) $(MFLAGS) tag) || exit 1; \ done Makefiles:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS);\ do \ echo "Making "Makefiles" in $(DIR)$$i..."; \ (cd $$i || exit 1; \ if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \ $(MAKE) $(MFLAGS) Makefiles) || exit 1;\ done Makefiles.SH:: Makefile.SH @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS);\ do \ case "$(DIR)$$i/" in \ */*/*/*/) newtop=../../../..;; \ */*/*/) newtop=../../..;; \ */*/) newtop=../..;; \ */) newtop=..;; \ esac; \ case "$(TOP)" in \ /*) newtop="$(TOP)" ;; \ esac; \ echo "Making Makefiles.SH in $(DIR)$$i..."; \ (cd $$i || exit 1; \ if test -f Jmakefile; then \ $(MAKE) $(MFLAGS) -f ../Makefile \ Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \ $(MAKE) $(MFLAGS) Makefiles.SH; \ fi; \ ) || exit 1; \ done all:: @$(MAKE) subdirs TARGET=all VERB="Making all" FLAGS= local_install:: local_deinstall:: local_install.man:: local_deinstall.man:: !NO!SUBS! chmod 644 Makefile $eunicefix Makefile dist_3.5-36.001/lib/C/0002755000175000017500000000000012645366677014365 5ustar srivastasrivastadist_3.5-36.001/lib/C/Makefile.SH0000755000175000017500000001266210473675243016333 0ustar srivastasrivasta: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0] : $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $ case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac CURRENT=lib/C DIR=`echo $CURRENT/ | sed -e 's/\.\///g'` echo "Extracting ${DIR}Makefile (with variable substitutions)" DATE=`date` $spitshell >Makefile <>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files # $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $ ######################################################################## # Start of Jmakefile # $X-Id: Jmakefile 3 2006-08-25 21:39:07Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $X-Log: Jmakefile,v $ # Revision 3.0.1.1 1994/01/24 13:43:38 ram # patch16: created # ######################################################################## # Common rules for all Makefiles -- do not edit all:: clean: sub_clean local_clean realclean: sub_realclean local_realclean clobber: sub_clobber local_clobber local_clean:: if test -f core; then $(RM) core; fi $(RM) *~ *.o local_realclean:: local_clean local_clobber:: local_realclean $(RM) Makefile config.sh install:: local_install sub_install install.man:: maybe_install.man sub_install.man deinstall:: sub_deinstall local_deinstall deinstall.man:: sub_deinstall.man maybe_deinstall.man install.man-no: deinstall.man-no: maybe_install.man: install.man-no maybe_deinstall.man: deinstall.man-no Makefile.SH: Jmakefile -@if test -f $(TOP)/.package; then \ if test -f Makefile.SH; then \ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ fi; \ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ else touch $@; fi Makefile: Makefile.SH /bin/sh Makefile.SH tags:: $(CTAGS) -w *.[ch] $(CTAGS) -xw *.[ch] > tags local_clobber:: $(RM) tags ######################################################################## # Rules for building in sub-directories -- do not edit subdirs: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \ done sub_install:: @$(MAKE) subdirs TARGET=install VERB="Installing" FLAGS= sub_deinstall:: @$(MAKE) subdirs TARGET=deinstall VERB="Deinstalling" FLAGS= @echo "Back to $(CURRENT) for "deinstall... sub_install.man:: @$(MAKE) subdirs TARGET=install.man VERB="Installing man pages" FLAGS= sub_deinstall.man:: @$(MAKE) subdirs TARGET=deinstall.man VERB="Deinstalling man pages" FLAGS= @echo "Back to $(CURRENT) for "deinstall.man... sub_clean:: @$(MAKE) subdirs TARGET=clean VERB="Cleaning" FLAGS= @echo "Back to $(CURRENT) for "clean... sub_realclean:: @$(MAKE) subdirs TARGET=realclean VERB="Real cleaning" FLAGS= @echo "Back to $(CURRENT) for "realclean... sub_clobber:: @$(MAKE) subdirs TARGET=clobber VERB="Clobbering" FLAGS= @echo "Back to $(CURRENT) for "clobber... tag:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \ $(MAKE) $(MFLAGS) tag) || exit 1; \ done Makefiles:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS);\ do \ echo "Making "Makefiles" in $(DIR)$$i..."; \ (cd $$i || exit 1; \ if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \ $(MAKE) $(MFLAGS) Makefiles) || exit 1;\ done Makefiles.SH:: Makefile.SH @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS);\ do \ case "$(DIR)$$i/" in \ */*/*/*/) newtop=../../../..;; \ */*/*/) newtop=../../..;; \ */*/) newtop=../..;; \ */) newtop=..;; \ esac; \ case "$(TOP)" in \ /*) newtop="$(TOP)" ;; \ esac; \ echo "Making Makefiles.SH in $(DIR)$$i..."; \ (cd $$i || exit 1; \ if test -f Jmakefile; then \ $(MAKE) $(MFLAGS) -f ../Makefile \ Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \ $(MAKE) $(MFLAGS) Makefiles.SH; \ fi; \ ) || exit 1; \ done all:: @$(MAKE) subdirs TARGET=all VERB="Making all" FLAGS= local_install:: local_deinstall:: local_install.man:: local_deinstall.man:: !NO!SUBS! chmod 644 Makefile $eunicefix Makefile dist_3.5-36.001/lib/C/fake/0002755000175000017500000000000012645366677015273 5ustar srivastasrivastadist_3.5-36.001/lib/C/fake/Makefile.SH0000755000175000017500000001046210473675243017235 0ustar srivastasrivasta: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0] : $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $ case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac CURRENT=lib/C/fake DIR=`echo $CURRENT/ | sed -e 's/\.\///g'` echo "Extracting ${DIR}Makefile (with variable substitutions)" INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'` INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'` DATE=`date` $spitshell >Makefile <>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files # $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $ ######################################################################## # Start of Jmakefile # $X-Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $X-Log: Jmakefile,v $ # Revision 3.0.1.1 1994/01/24 13:43:44 ram # patch16: created # FILES = dup2.C getopt.C rename.C scandir.C setsid.C INSTALLFLAGS = -m 444 all:: install:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for dir in $(PRIVLIB)/lib/C/fake; do \ (set -x; test -d $$dir || $(INSTALLDIR) $$dir) || \ exit 1; \ done local_install:: $(FILES) @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/lib/C/fake || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/lib/C/fake); \ for i in $(FILES); do \ (set -x; $(INSTALL) -c $(INSTALLFLAGS) \ $$i $(INSTALL_PREFIX)$(PRIVLIB)/lib/C/fake) || exit 1;\ done local_deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for i in $(FILES); do \ (set -x; $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/lib/C/fake/$$i); \ done ######################################################################## # Common rules for all Makefiles -- do not edit all:: clean: local_clean realclean: local_realclean clobber: local_clobber local_clean:: if test -f core; then $(RM) core; fi $(RM) *~ *.o local_realclean:: local_clean local_clobber:: local_realclean $(RM) Makefile config.sh install:: local_install install.man:: maybe_install.man deinstall:: local_deinstall deinstall.man:: maybe_deinstall.man install.man-no: deinstall.man-no: maybe_install.man: install.man-no maybe_deinstall.man: deinstall.man-no Makefile.SH: Jmakefile -@if test -f $(TOP)/.package; then \ if test -f Makefile.SH; then \ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ fi; \ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ else touch $@; fi Makefile: Makefile.SH /bin/sh Makefile.SH tags:: $(CTAGS) -w *.[ch] $(CTAGS) -xw *.[ch] > tags local_clobber:: $(RM) tags ######################################################################## # Empty rules for directories with no sub-directories -- do not edit local_install:: @echo "install in $(CURRENT) done." local_deinstall:: @echo "deinstall in $(CURRENT) done." local_install.man:: @echo "install.man in $(CURRENT) done." local_deinstall.man:: @echo "deinstall.man in $(CURRENT) done." Makefiles:: Makefiles.SH:: !NO!SUBS! chmod 644 Makefile $eunicefix Makefile dist_3.5-36.001/lib/C/fake/scandir.C0000644000175000017500000000740510473316164017005 0ustar srivastasrivasta/* * scandir.C -- A scandir implementation. */ /* * $Id: scandir.C,v 3.0.1.1 1994/01/24 13:58:45 ram Exp ram $ * * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi * * You may redistribute only under the terms of the Artistic Licence, * as specified in the README file that comes with the distribution. * You may reuse parts of this distribution only within the terms of * that same Artistic Licence; a copy of which may be found at the root * of the source tree for dist 4.0. * * $Log: scandir.C,v $ * Revision 3.0.1.1 1994/01/24 13:58:45 ram * patch16: created * */ #include "config.h" #ifdef I_STRING #include #else #include #endif #ifdef I_DIRENT #include #else #ifdef I_SYS_NDIR #include #else #ifdef I_SYS_DIR #include #endif #endif #endif #include "confmagic.h" /* Remove if not metaconfig -M */ #ifndef HAS_SCANDIR extern Malloc_t malloc(); extern Malloc_t realloc(); extern DIR *opendir(); extern Direntry_t *readdir(); #define DIR_NULL ((DIR *) 0) #define ENTRY_NULL ((Direntry_t *) 0) static int alphasort _((Direntry_t **, Direntry_t **)); /* * scandir * * This routine reads the directory `dirnam' and builds an array of * pointers to directory entries using malloc(). The second parameter * is the address of a pointer to an array of structure pointers. The * third parameter is a pointer to a routine which is called with a * pointer to a directory entry and should return a non zero value * if the directory entry should be included in the arrary. If this * pointer is NULL, then all the directory entries will be included. * The last argument is a pointer to a routine which is passed to * qsort() to sort the completed array. If this pointer is NULL, the * array is not sorted. * scandir() returns the number of entries in the array and a pointer * to the array through the parameter namlist. * alphasort() is a routine which sorts the array alphabetically. */ V_FUNC(int scandir, (dirnam, namelist, sel, comp), char *dirnam /* Direcotry name */ NXT_ARG Direntry_t ***namelist /* Pointer to an array of struct ptrs */ NXT_ARG int (*sel)() /* Routine to select entries */ NXT_ARG int (*comp)() /* Routine passed to qsort */) { DIR *dirp; /* Returned by opendir() */ Direntry_t *dp; /* Read entry */ Direntry_t *dp_save; /* Place where entry is stored */ Direntry_t **tmplist; /* Where the array list is stored */ int nent = 0; /* Number of entries */ dirp = opendir(dirnam); if (dirp == DIR_NULL) return -1; /* Directory cannot be opened for reading */ for (dp = readdir(dirp); dp != ENTRY_NULL; dp = readdir(dirp)) { if (sel == ((int (*)()) 0) || (*sel)(dp)) { /* If entry has to be included */ nent++; /* One more entry */ if (nent == 1) { /* Create array for first entry */ tmplist = (Direntry_t **) malloc(sizeof(Direntry_t *)); if (tmplist == (Direntry_t **) 0) return -1; /* Cannot create array */ } else { /* Reallocate for a new entry */ tmplist = (Direntry_t **) realloc(tmplist, nent*sizeof(Direntry_t *)); if (tmplist == (Direntry_t **) 0) return -1; /* Cannot reallocate array */ } dp_save = (Direntry_t *) malloc(sizeof(Direntry_t)); if (dp_save == ENTRY_NULL) return -1; /* No space to save entry */ bcopy((char *) dp, (char *) dp_save, sizeof(Direntry_t)); *(tmplist+(nent-1)) = dp_save; } } if (comp != ((int (*)()) 0) && nent) /* Need sorting ? */ qsort(tmplist, nent, sizeof(Direntry_t *), comp); *namelist = tmplist; /* Passes the address of the arrray */ closedir(dirp); /* Close directory */ return nent; /* Number of items */ } P_FUNC(int alphasort, (d1, d2), Direntry_t **d1 NXT_ARG Direntry_t **d2) { return strcmp((*d1)->d_name, (*d2)->d_name); } #endif dist_3.5-36.001/lib/C/fake/rename.C0000644000175000017500000000204510473316164016624 0ustar srivastasrivasta/* * rename.C -- A rename emulation, for renaming files only. */ /* * $Id: rename.C,v 3.0.1.1 1994/01/24 13:58:42 ram Exp ram $ * * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi * * You may redistribute only under the terms of the Artistic Licence, * as specified in the README file that comes with the distribution. * You may reuse parts of this distribution only within the terms of * that same Artistic Licence; a copy of which may be found at the root * of the source tree for dist 4.0. * * $Log: rename.C,v $ * Revision 3.0.1.1 1994/01/24 13:58:42 ram * patch16: created * */ #include "config.h" #include "confmagic.h" /* Remove if not metaconfig -M */ #ifndef HAS_RENAME /* * rename * * Renames a file within a file system. This cannot be used to rename * directories, unfortunately. */ V_FUNC(int rename, (from, to), char *from /* Original name */ NXT_ARG char *to /* Target name */) { (void) unlink(to); if (-1 == link(from, to)) return -1; if (-1 == unlink(from)) return -1; return 0; } #endif dist_3.5-36.001/lib/C/fake/getopt.C0000644000175000017500000000617210473316164016664 0ustar srivastasrivasta/* * getopt.C -- A getopt implementation. */ /* * $Id: getopt.C,v 3.0.1.1 1994/01/24 13:58:40 ram Exp ram $ * * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi * * You may redistribute only under the terms of the Artistic Licence, * as specified in the README file that comes with the distribution. * You may reuse parts of this distribution only within the terms of * that same Artistic Licence; a copy of which may be found at the root * of the source tree for dist 4.0. * * Original Author: unknown, got this off net.sources * * $Log: getopt.C,v $ * Revision 3.0.1.1 1994/01/24 13:58:40 ram * patch16: created * */ #include "config.h" #include #ifdef I_STRING #include #else #include #endif #include "confmagic.h" /* Remove if not metaconfig -M */ #ifndef HAS_GETOPT /* * Get option letter from argument vector */ int opterr = 1, /* Useless, never set or used */ optind = 1, /* Index into parent argv vector */ optopt; /* Character checked for validity */ char *optarg; /* Argument associated with option */ #define BADCH (int) '?' #define EMSG "" #define tell(s) \ do { \ fputs(*nargv, stderr); \ fputs(s, stderr); \ fputc(optopt, stderr); \ fputc('\n', stderr); \ return BADCH; \ } while (0) /* * getopt * * Parses command line flags and arguments. Given the original arguments * via the (nargc, nargv) tuple, and a list of flags via 'ostr', it returns * the next flag recognized, and sets the externally visible 'optarg' * variable to point to the start of the flags's parameter, if any expected. * * When facing an invalid flag, getopt() returns '?'. * * The 'ostr' string is a list of allowed flag characters, optionally by ':' * when the flag expects a parameter, which can immediately follow the * flag or come as the next word. * * In any case, the 'optopt' variable is set upon return to the flag being * looked at, whether it was a valid flag or not. */ V_FUNC(int getopt, (nargc, nargv, ostr) int nargc /* Argument count */ NXT_ARG char **nargv /* Argument vector */ NXT_ARG char *ostr /* String specifying options */) { static char *place = EMSG; /* Option letter processing */ register1 char *oli; /* Option letter list index */ /* * Update scanning pointer. */ if (!*place) { if( optind >= nargc || *(place = nargv[optind]) != '-' || !*++place ) return EOF; if (*place == '-') { /* Found "--", end option processing */ ++optind; return EOF; } } /* * Is option letter OK? */ if ( (optopt = (int)*place++) == (int)':' || !(oli = index(ostr,optopt)) ) { if (!*place) ++optind; tell(": illegal option -- "); } /* * Found a valid option, process it. */ if (*++oli != ':') { /* Don't need argument */ optarg = NULL; if (!*place) ++optind; } else { /* Need an argument */ if (*place) optarg = place; /* No white space */ else if (nargc <= ++optind) { /* No argument */ place = EMSG; tell(": option requires an argument -- "); } else optarg = nargv[optind]; /* White space */ place = EMSG; ++optind; } return optopt; /* Dump back option letter */ } #endif dist_3.5-36.001/lib/C/fake/setsid.C0000644000175000017500000000264410473316164016655 0ustar srivastasrivasta/* * setsid.C -- A setsid replacement. */ /* * $Id: setsid.C,v 3.0.1.1 1994/01/24 13:58:47 ram Exp ram $ * * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi * * You may redistribute only under the terms of the Artistic Licence, * as specified in the README file that comes with the distribution. * You may reuse parts of this distribution only within the terms of * that same Artistic Licence; a copy of which may be found at the root * of the source tree for dist 4.0. * * $Log: setsid.C,v $ * Revision 3.0.1.1 1994/01/24 13:58:47 ram * patch16: created * */ #include "config.h" #include "confmagic.h" /* Remove if not metaconfig -M */ #ifndef HAS_SETSID /* * setsid * * Set the process group ID and create a new session for the process. * * This is a pale imitation of the setsid() system call, since a session * and a process group are two distinct things for the kernel. However, * when setsid() is not available, the effects should be comparable. */ V_FUNC_VOID(int setsid) { int error = 0; #ifdef HAS_SETPGID /* * setpgid() supersedes setpgrp() in OSF/1. */ error = setpgid(0 ,getpid()); #else #ifdef HAS_SETPGRP /* * Good old way to get a process group leader. */ #ifdef USE_BSDPGRP error = setpgrp(0 ,getpid()); /* bsd way */ #else error = setpgrp(); /* usg way */ #endif #endif #endif /* * When none of the above is defined, do nothing. */ return error; } #endif dist_3.5-36.001/lib/C/fake/Jmakefile0000644000175000017500000000146010473675126017071 0ustar srivastasrivasta/* * Jmakefile for C/fake subdirectory. */ ;# $Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: Jmakefile,v $ ;# Revision 3.0.1.1 1994/01/24 13:43:44 ram ;# patch16: created ;# FILES = dup2.C getopt.C rename.C scandir.C setsid.C INSTALLFLAGS = -m 444 all:: /* So that default make does not default to install */ MakeDirectories(install,$(PRIVLIB)/lib/C/fake) InstallMultiple($(FILES),$(PRIVLIB)/lib/C/fake) dist_3.5-36.001/lib/C/fake/dup2.C0000644000175000017500000000346310473316164016234 0ustar srivastasrivasta/* * dup2.C -- A dup2 emulation. */ /* * $Id: dup2.C,v 3.0.1.1 1994/01/24 13:58:37 ram Exp ram $ * * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi * * You may redistribute only under the terms of the Artistic Licence, * as specified in the README file that comes with the distribution. * You may reuse parts of this distribution only within the terms of * that same Artistic Licence; a copy of which may be found at the root * of the source tree for dist 4.0. * * Original Author: Larry Wall * * $Log: dup2.C,v $ * Revision 3.0.1.1 1994/01/24 13:58:37 ram * patch16: created * */ #include "config.h" #ifdef I_FCNTL #include #endif #include "confmagic.h" /* Remove if not metaconfig -M */ #ifndef HAS_DUP2 /* * dup2 * * This routine duplicates file descriptor 'old' into 'new'. After the * operation, both 'new' and 'old' refer to the same file 'old' was referring * to in the first place. * * Returns 0 if OK, -1 on failure with errno being set to indicate the error. * */ V_FUNC(int dup2, (old, new), int old /* Opened file descriptor */ NXT_ARG int new /* File descriptor we'd like to get */) { #ifdef HAS_FCNTL #ifdef F_DUPFD #define USE_FNCTL #endif #endif #ifdef USE_FCNTL if (old == new) return 0; close(new); return fcntl(old, F_DUPFD, new); #else int fd_used[256]; /* Fixed stack used to record dup'ed files */ int fd_top = 0; /* Top in the fixed stack */ int fd; /* Currently dup'ed file descriptor */ if (old == new) return 0; close(new); /* Ensure one free slot */ while ((fd = dup(old)) != new) /* Until dup'ed file matches */ fd_used[fd_top++] = fd; /* Remember we have to close it later */ while (fd_top > 0) /* Close all useless dup'ed slots */ close(fd_used[--fd_top]); return 0; #endif } #endif dist_3.5-36.001/lib/C/Jmakefile0000644000175000017500000000112210473666773016166 0ustar srivastasrivasta/* * Jmakefile for C subdirectory. */ ;# $Id: Jmakefile 3 2006-08-25 21:39:07Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: Jmakefile,v $ ;# Revision 3.0.1.1 1994/01/24 13:43:38 ram ;# patch16: created ;# SetSubdirs(fake) dist_3.5-36.001/lib/Jmakefile0000644000175000017500000000313010473672443015774 0ustar srivastasrivasta/* * Jmakefile for lib subdirectory. */ ;# $Id: Jmakefile 5 2006-08-25 22:09:39Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: Jmakefile,v $ ;# Revision 3.0.1.1 1994/01/24 13:43:31 ram ;# patch16: added new directory for C code sources ;# ;# Revision 3.0 1993/08/18 12:04:34 ram ;# Baseline for dist 3.0 netwide release. ;# FILES = errnolist.a errnolist.mk FILES_SH = errnolist makedepend makedir INSTALLFLAGS = -m 444 all:: /* So that default make does not default to install */ MakeDirectories(install,$(PRIVLIB)/lib) InstallMultiple($(FILES),$(PRIVLIB)/lib) /* * InstallSingleExt: * This rule installs a single file whose basename is 'file' and * extension is 'old' into 'file^^new'. This allows changing the * dot extension of a file, for instance file.sh can be installed as * file.SH. */ #define InstallSingleExt(step,file,dest,flags,old,new) @!\ step:: file^^old @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ (set -x; $(INSTALL) -c flags file^^old dest/file^^new) @@\ @!\ de^^step:: @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ (set -x; $(RM) dest/file^^new) #define install_rule \ InstallSingleExt(install,!f,$(PRIVLIB)/lib,-m 444,.sh,.SH) Expand(install_rule,f!$(FILES_SH)!) SetSubdirs(C) dist_3.5-36.001/lib/makedir.sh0000644000175000017500000000367510473316164016143 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting makedir (with variable substitutions)" $spitshell >makedir < # # $Log: makedir.sh,v $ # Revision 3.0.1.1 1994/01/24 14:00:08 ram # patch16: changed top ln-style config.sh lookup into test-style one # # Revision 3.0 1993/08/18 12:04:38 ram # Baseline for dist 3.0 netwide release. # export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$) case \$# in 0) $echo "makedir pathname filenameflag" exit 1 ;; esac : guarantee one slash before 1st component case \$1 in /*) ;; *) set ./\$1 \$2 ;; esac : strip last component if it is to be a filename case X\$2 in X1) set \`$echo \$1 | $sed 's:\(.*\)/[^/]*\$:\1:'\` ;; *) set \$1 ;; esac : return reasonable status if nothing to be created if $test -d "\$1" ; then exit 0 fi list='' while true ; do case \$1 in */*) list="\$1 \$list" set \`echo \$1 | $sed 's:\(.*\)/:\1 :'\` ;; *) break ;; esac done set \$list for dir do $mkdir \$dir >/dev/null 2>&1 done !GROK!THIS! $eunicefix makedir chmod +x makedir dist_3.5-36.001/lib/makedepend.sh0000644000175000017500000001122710473316164016614 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting makedepend (with variable substitutions)" $spitshell >makedepend < # # $Log: makedepend.sh,v $ # Revision 3.0.1.1 1994/01/24 14:00:05 ram # patch16: changed top ln-style config.sh lookup into test-style one # # Revision 3.0 1993/08/18 12:04:37 ram # Baseline for dist 3.0 netwide release. # export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$) cat='$cat' cppflags='$cppflags' cp='$cp' cpp='$cppstdin' echo='$echo' egrep='$egrep' expr='$expr' mv='$mv' rm='$rm' sed='$sed' sort='$sort' test='$test' tr='$tr' uniq='$uniq' !GROK!THIS! $spitshell >>makedepend <<'!NO!SUBS!' $cat /dev/null >.deptmp $rm -f *.c.c c/*.c.c if test -f Makefile; then mf=Makefile else mf=makefile fi if test -f $mf; then defrule=`<$mf sed -n \ -e '/^\.c\.o:.*;/{' \ -e 's/\$\*\.c//' \ -e 's/^[^;]*;[ ]*//p' \ -e q \ -e '}' \ -e '/^\.c\.o: *$/{' \ -e N \ -e 's/\$\*\.c//' \ -e 's/^.*\n[ ]*//p' \ -e q \ -e '}'` fi case "$defrule" in '') defrule='$(CC) -c $(CFLAGS)' ;; esac make clist || ($echo "Searching for .c files..."; \ $echo *.c | $tr ' ' '\012' | $egrep -v '\*' >.clist) gotnone=true for file in `$cat .clist`; do # for file in `cat /dev/null`; do case "$file" in *.c) filebase=`basename $file .c` ;; *.y) filebase=`basename $file .c` ;; '') continue ;; esac gotnone=false $echo "Finding dependencies for $filebase.o." $sed -n <$file >$file.c \ -e "/^${filebase}_init(/q" \ -e '/^#/{' \ -e 's|/\*.*$||' \ -e 's|\\$||' \ -e p \ -e '}' $cpp -I/usr/local/include -I. $cppflags $file.c | \ $sed \ -e '/^# *[0-9]/!d' \ -e 's/^.*"\(.*\)".*$/'$filebase'.o: \1/' \ -e 's|: \./|: |' \ -e 's|\.c\.c|.c|' | \ $uniq | $sort | $uniq >> .deptmp done $sed Makefile.new -e '1,/^# AUTOMATICALLY/!d' make shlist || ($echo "Searching for .SH files..."; \ $echo *.SH | $tr ' ' '\012' | $egrep -v '\*' >.shlist) if $gotnone || $test -s .deptmp; then for file in `cat .shlist`; do $echo `$expr X$file : 'X\(.*\).SH`: $file config.sh \; \ /bin/sh $file >> .deptmp done $echo "Updating Makefile..." $echo "# If this runs make out of memory, delete /usr/include lines." \ >> Makefile.new $sed 's|^\(.*\.o:\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp \ >>Makefile.new else make hlist || ($echo "Searching for .h files..."; \ $echo *.h | $tr ' ' '\012' | $egrep -v '\*' >.hlist) $echo "You don't seem to have a proper C preprocessor. Using grep instead." $egrep '^#include ' `cat .clist` `cat .hlist` >.deptmp $echo "Updating Makefile..." <.clist $sed -n \ -e '/\//{' \ -e 's|^\(.*\)/\(.*\)\.c|\2.o: \1/\2.c; '"$defrule \1/\2.c|p" \ -e d \ -e '}' \ -e 's|^\(.*\)\.c|\1.o: \1.c|p' >> Makefile.new <.hlist $sed -n 's|\(.*/\)\(.*\)|s= \2= \1\2=|p' >.hsed <.deptmp $sed -n 's|c:#include "\(.*\)".*$|o: \1|p' | \ $sed 's|^[^;]*/||' | \ $sed -f .hsed >> Makefile.new <.deptmp $sed -n 's|c:#include <\(.*\)>.*$|o: /usr/include/\1|p' \ >> Makefile.new <.deptmp $sed -n 's|h:#include "\(.*\)".*$|h: \1|p' | \ $sed -f .hsed >> Makefile.new <.deptmp $sed -n 's|h:#include <\(.*\)>.*$|h: /usr/include/\1|p' \ >> Makefile.new for file in `$cat .shlist`; do $echo `$expr X$file : 'X\(.*\).SH`: $file config.sh \; \ /bin/sh $file >> Makefile.new done fi $rm -f Makefile.old $cp Makefile Makefile.old $cp Makefile.new Makefile $rm Makefile.new $echo "# WARNING: Put nothing here or make depend will gobble it up!" >> Makefile $rm -f .deptmp `sed 's/\.c/.c.c/' .clist` .shlist .clist .hlist .hsed !NO!SUBS! $eunicefix makedepend chmod +x makedepend case `pwd` in *SH) $rm -f ../makedepend ln makedepend ../makedepend ;; esac dist_3.5-36.001/lib/errnolist.a0000644000175000017500000000304710473316164016347 0ustar srivastasrivasta# $Id: errnolist.a,v 3.0 1993/08/18 12:04:35 ram Exp ram $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # Original Author: Harlan Stenn # # $Log: errnolist.a,v $ # Revision 3.0 1993/08/18 12:04:35 ram # Baseline for dist 3.0 netwide release. # # # This is a simple-minded awk script to generate an initialization for # sys_errnolist on systems that don't have it. # This file now depends only on sys/errno.h error numbers under maxerr being # in order. It will complain and die if not. NOTE: It will still produce # a compilable output file, even with errors, so you must check the output. BEGIN { format = "\t\"%s\",\n" printf("/*\n** This is a generated file. Do NOT edit it unless you really have to...\n*/\n\n") printf("char *sys_errnolist[] = {\n") maxerr = 89 } $1=="#define" { if(count > maxerr || substr($2,1,1) != "E") next # we're not interested if($3 < count) { # this is bad printf("Fatal error: %s out of order at %s\n",\ FILENAME, $2)>"/dev/tty" exit 1 } # fill in the blanks while($3 > count) { dummy=sprintf("EDUMMY%d",count) printf(format,dummy) count++ } printf(format,$2) count++ } END { printf("\t0\n};\n") } dist_3.5-36.001/lib/errnolist.mk0000644000175000017500000000211110473316164016525 0ustar srivastasrivasta# $Id: errnolist.mk,v 3.0.1.1 1994/01/24 13:59:32 ram Exp ram $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # Original Author: Harlan Stenn # # $Log: errnolist.mk,v $ # Revision 3.0.1.1 1994/01/24 13:59:32 ram # patch16: now uses modern shell metaconfig symbols # # Revision 3.0 1993/08/18 12:04:36 ram # Baseline for dist 3.0 netwide release. # # # Make rules for the errnolist stuff case "$errnolist" in '') ;; *) $spitshell >>Makefile <>Makefile <>Makefile <<'!NO!SUBS!' foo: foo.o $(ERRNOLIST_OBJ) $(CC) -o $@ foo.o $(ERRNOLIST_OBJ) !NO!SUBS! dist_3.5-36.001/lib/errnolist.sh0000644000175000017500000000244610473316164016543 0ustar srivastasrivasta# $Id: errnolist.sh,v 3.0.1.1 1994/01/24 14:00:00 ram Exp ram $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # Original Author: Harlan Stenn # # $Log: errnolist.sh,v $ # Revision 3.0.1.1 1994/01/24 14:00:00 ram # patch16: changed top ln-style config.sh lookup into test-style one # # Revision 3.0 1993/08/18 12:04:36 ram # Baseline for dist 3.0 netwide release. # case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac case "$errnolistc" in '') ;; *) echo "Making $errnolistc ..." awk -f errnolist.a < /usr/include/sys/errno.h > $errnolistc echo "It would be a good idea to make sure that $errnolistc is correct." esac dist_3.5-36.001/Artistic0000644000175000017500000001407410473316164015125 0ustar srivastasrivasta The "Artistic License" Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the Package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. It also grants you the rights to reuse parts of a Package in your own programs without transferring this License to those programs, provided that you meet some reasonable requirements. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. You may reuse parts of this Package in your own programs, provided that you explicitly state where you got them from, in the source code (and, left to your courtesy, in the documentation), duplicating all the associated copyright notices and disclaimers. Besides your changes, if any, must be clearly marked as such. Parts reused that way will no longer fall under this license if, and only if, the name of your program(s) have no immediate connection with the name of the Package itself or its associated programs. You may then apply whatever restrictions you wish on the reused parts or choose to place them in the Public Domain--this will apply only within the context of your package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End dist_3.5-36.001/Jmakefile0000644000175000017500000000203111474560045015221 0ustar srivastasrivasta/* * Main Jmakefile for dist 3.0 */ ;# $Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: Jmakefile,v $ ;# Revision 3.0.1.2 1995/07/25 13:29:41 ram ;# patch56: re-ordered macros, moving the install at the end ;# ;# Revision 3.0.1.1 1994/01/24 13:42:41 ram ;# patch16: added dependency generation stage ;# ;# Revision 3.0 1993/08/18 12:03:53 ram ;# Baseline for dist 3.0 netwide release. ;# all:: /* So that default target is not clobber! */ SetSubdirs(bin mcon jmake pat kit lib) DependSubdirs() AddedByConfigure(install) InstallManPage(dist,$(MANSRC)) all:: revision.h .FORCE: revision.h: .FORCE $(TOP)/bin/svn-revision $(TOP) $@ dist_3.5-36.001/Credits0000644000175000017500000001136610473316164014741 0ustar srivastasrivastaINTRO This version of dist has been written by Raphael Manfredi based on previous work from Larry Wall and Harlan Stenn. HISTORY I started working on this in September 1990 while I was still a student at the Ecole des Mines de Saint-Etienne, France. From then on, I worked during two years at ISE (building the Eiffel 3.0 compiler -- the run-time part and code generation). Since I chose to use metaconfig for the run-time library, which is written in plain C, I had the chance to continue improving the whole dist package. By the end of 1991, I contacted Harlan Stenn who had been working separately on his own dist version. I started the painful merge. At the same time, I started releasing alpha version of dist 3.0. In 1992, I started a parallel project: mailagent. The dist 2.0 release upon which this work is based included a simple perl script called mailagent, whose sole job was to filter out @SH commands to automatically mail patches to some people. I liked the idea of having a perl mail filter and so I extended mailagent up to the point where it became really big and only marginally dist-related. I released it on the net (comp.sources.misc) on July 1992, after 7 months of hard work. In March 1993, I left ISE and returned to France to join ACRI. The dist 3.0 package was "almost" finished by that time, but the documentation was no longer accurate and needed a lot of work. My new job does not give me enough free time, so things have been longer than I expected. In July 1993, under the pressure of many of my alpha testers, I decided to go into the final process, sacrifying nights and week ends to finish up what turns out to have been a 3 years process... CREDITS My first thanks will go to Larry Wall who wrote perl and dist 2.0 in the first place. I would never have dived into dist 2.0 if it had not been written in perl. During my work, I had the chance to benefit some useful comments and contributions from Craig Kolb who has been the very first user of metaconfig (with a rather pre-historic version). He used it on its rayshade 4.0 release (a ray tracing program). Then of course, many thanks are due to my co-worker, Harlan Stenn . Although I did the integration of his work all by myself, I have found many good ideas in his early work. For instance, he wrote the first implementation of the metalint program, something I could not live without today! His remarks, comments and encouragements have always been appreciated, even though we did not always agree on the same things at the same time... Then I would like to thank the many contributors to the metaconfig units. I hope I'm not forgetting anybody! Here they come, in alphabetical order: (sorted on the first name) Andy Dougherty Craig Kolb Graham Stoney Harlan Stenn Jan Djarv Larry Wall Ralf E. Stranzenbach Scott Grosch Syd Weinstein Thomas Neumann Wayne Davison If I forgot your name, please let me know, and accept my apologies (not necessarily in that order ;-). Finally, thank you Shigeya Suzuki for hosting the dist-users mailing list. Send mail to majordomo@foretune.co.jp to subscribe. Raphael Manfredi Lyon, France, August 1993 [This section added by subsequent patches] PATCHES I'm grateful to the following people for sending me patches and/or reporting bugs and giving me some suggestions (sorted on the first name): Andy Dougherty Graham Stoney Ilya Zakharevich Jarkko Hietaniemi Joseph H Buehler Keith Walker Scott Presnell Wayne Davison Due to a mistake of mine, changes from Wayne Davison were flagged 'WAD', but his middle initial being an 'E', new ones are now flagged as 'WED'. Sorry Wayne, I did not know. We don't use middle initials here in Europe. Special thanks to the perl5 Patch Pumpkin Holders (in chronological order): Andy Dougherty Chip Salzenberg for their wonderful creativity. Perl5 is by far the largest metaconfig customer with the widest audience, so Configure got run on a variety of new platforms requiring specific fixes... which they provided, thereby greatly enhancing the metaconfig "portability database". Raphael Manfredi Grenoble, France, February 1997 dist_3.5-36.001/install.SH0000755000175000017500000000777611017210272015324 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting install (with variable substitutions)" $spitshell >install <>install <<'!NO!SUBS!' mode="" dst="" src="" dostrip="" newdir="" uid="" gid="" CDPATH="" # simulates mkdir -p mkdir_p=' name=$1; create=""; while $test $name; do if $test ! -d "$name"; then create="$name $create"; name=`echo $name | $sed -e "s|^[^/]*$||"`; name=`echo $name | $sed -e "s|\(.*\)/.*|\1|"`; else name=""; fi; done; for file in $create; do mkdir $file && $test $verbose && echo "install: created directory $file" >&2; done ' verbose='' while $test x$1 != x do case $1 in -c) shift continue ;; -m) mode="$2 " shift shift continue ;; -o) uid="$2 " shift shift continue ;; -g) gid="$2 " shift shift continue ;; -s) dostrip="strip" shift continue ;; -d) newdir="$newdir$2 " shift shift continue ;; -v) verbose='true' shift ;; *) if $test x$src = x then src=$1 else dst=$1 fi shift continue ;; esac done # if -d option is used, we have to create the path given if $test ! x$newdir = x then for i in $newdir do set x $i shift eval $mkdir_p done exit 0 # -d is the only action fi if $test x$src = x then echo "install: no input file specified" >&2 exit 1 fi if $test x$dst = x then echo "install: no destination specified" >&2 exit 1 fi srcbase=`basename $src` dstbase=`basename $dst` # If the destination is a directory, the target name is srcbase... if $test -d $dst; then dstbase=$srcbase else dst="`echo $dst | sed 's,^\(.*\)/.*$,\1,'`" if $test ! -d $dst; then dstbase=$dst dst="." fi fi # If the src has a directory, extract the dir name... if $test "$src" != "$srcbase" -a "$src" != "./$srcbase"; then src="`echo $src | sed 's,^\(.*\)/.*$,\1,'`" else src="." fi # dst is the destination directory and dstbase the base name. # srcbase is the base name of source and src the source dir. srcpth=`(cd $src; pwd)`/$srcbase destpth=`(cd $dst; pwd)`/$dstbase if $test x$srcpth = x$destpth; then $test $verbose && \ echo "install: destination and source are identical" exit 0 fi # Do the install ( cd $src if $test -f $dst/$dstbase; then $rm -f $dst/$dstbase && $test $verbose && echo "install: $dst/$dstbase removed" fi if $test -f $dst/$dstbase; then $mv $dst/$dstbase $dst/OLD$dstbase && $test $verbose && echo "install: $dst/$dstbase renamed as OLD$dstbase" fi cp $srcbase $dst/$dstbase && $test $verbose && echo "install: $srcbase installed as $dst/$dstbase" if $test ! x$dostrip = x; then strip $dst/$dstbase 2>/dev/null && $test $verbose && echo "install: stripped $dst/$dstbase" fi if $test ! x$uid = x; then $chown $uid $dst/$dstbase fi if $test ! x$gid = x; then $chgrp $gid $dst/$dstbase fi if $test ! x$mode = x then $chmod $mode $dst/$dstbase fi ) exit 0 !NO!SUBS! chmod 755 install $eunicefix install dist_3.5-36.001/ChangeLog0000644000175000017500000015022010473316164015164 0ustar srivastasrivastaFri Feb 28 17:48:41 MET 1997 Raphael Manfredi . Description: This huge set of patch results from an integration of the perl5 units into the dist-3.0 package. A few improvements of mine are also incorporated here, but this patch set should mainly be credited to Andy Dougherty and Chip Salzenberg, who have both assumed the perl5 Patch Pumpkin with success and brio. I won't document most of the changes in detail. Only the obvious ones were kept here. You can look closer to the patches themselves to see what really changed. Especially the new units, since you now have more symbols to check for in your C code... Regenerated Configure with current set of units. Added Perl Patch Pumpkin credits. Thanks to Andy Dougherty and to Chip Salzenberg for their incredible contributions to metaconfig. Changed my email address and updated copyright dates Added support for src.U. This means you can now run Configure from a remote directory to separate the build directory and the (possibly read-only) source tree. Note that some of your private units may require some changes due to that... Removed support for NO_PROTOTYPE detection on SCO. Added cute quoting trick for wild stringify support, which allows non-ANSI stringification to occur. Replaced .a with $_a all over the place. Likewise for .o replaced by $_o. You'll have to do that to your own private units. Integrated new units from perl5. I will not document most of the perl5-related changes here. People interested can look at Andy's notes in the perl5 distribution. New USE_BSD_GETPGRP to detect the getpgrp() flavour. The old USE_BSDPGRP has been obsoleted in favor of USE_BSD_SETPGRP. Indeed, setpgrp() and getpgrp() can have distinct flavors, so we need two distinct tests for them. Useless units dropped: d_group.U and d_passwd.U. Mention that can be included if HAS_POLL defined. Improved overlapping copy check. Added support for Free_t, the type of free(). Don't use nm with the GNU C library. Added support for Linux shared libs. Don't prompt them if the void support is high enough for us and don't ask for the include path unless they are on a MIPS. Added the srcdir support to "configure" now that we have src.U. Documented the runnning environment and the src.U unit in the metaconfig man page. The $_a and $_o are also mentionned. All the generated scripts must now start with a "$startsh" to ensure proper shell execution. New "create" and "empty" lint directives. New -L option for metaxref to match metaconfig and metalint. Documents contents of the message sent by patnotify: we now let them know the patch priority and description. Added a whole bunch of new units, mostly from the perl5 team. . Files changed: * bin/packinit.SH: Fixed one wrong ':' comment in .package. * jmake/files/Jmake.rules: Now handles USRINC for dependencies. Smarter about dependencies computation. * jmake/files/Jmake.tmpl: Lex path can now be configured. * mcon/U/Begin.U: Added Extractall dependency. * mcon/U/Config_sh.U, mcon/U/Oldsym.U, mcon/U/Extract.U, mcon/U/patchlevel.U, mcon/U/MailAuthor.U, mcon/U/Chk_MANI.U, mcon/U/Config_h.U: Added support for src.U. * mcon/U/Configdir.U: Have README explicitely mention the package name. * mcon/U/make.U, mcon/U/d_strtoul.U, mcon/U/Unix.U, mcon/U/d_inetaton.U, mcon/U/sitearch.U, mcon/U/d_sanemcmp.U, mcon/U/i_locale.U, mcon/U/d_sigaction.U, mcon/U/d_getpgid.U, mcon/U/src.U, mcon/U/sitelib.U, mcon/U/d_brokstat.U, mcon/U/man3dir.U, , mcon/U/d_sigsetjmp.U, mcon/U/i_sysstat.U, mcon/U/d_strtod.U, mcon/U/d_byacc.U, mcon/U/sh.U, mcon/U/Signal.U, mcon/U/d_gnulibc.U, mcon/U/man1dir.U, mcon/U/Extractall.U, mcon/U/i_values.U, mcon/U/i_sfio.U: Created. * mcon/U/Getfile.U: Getfile script now begins with "startsh". * mcon/U/Head.U: Make sure we unset CDPATH for shells that support this. Improved Korn shell detection and handling. * mcon/U/Instruct.U: Logname / whoami sequence rewritten to use case. * mcon/U/Loc.U: Allow users to specify paths on the command line. Will now substitute cp for ln if not supported. * mcon/U/Myread.U: Myread script now starts with a "startsh". Miscellaneous fixes. * mcon/U/Oldconfig.U: Added support for src.U. New OSNAME define. Can now sense new OSes. * mcon/U/Options.U: Optdef.sh now starts with a "startsh". Moved some code from Head.U. * mcon/U/Whoa.U: Whoa script now starts with leading "startsh". * mcon/U/afs.U: Can now explicitely tell Configure whether AFS is running. * mcon/U/archlib.U: Skip existence checks for archlib. * mcon/U/archname.U: Changed the way the archname is mangled from uname. * mcon/U/byteorder.U: No longer ask the user if the test runs ok. * mcon/U/ccflags.U: Removed support for NO_PROTOTYPE detection on SCO. New locincpth variable. Added info on the "additional ld flags" question. * mcon/U/cf_who.U: New computation method avoiding use of temporary file. * mcon/U/cpp_stuff.U: Added cute quoting trick for wild stringify support. * mcon/U/d_bsdjmp.U, mcon/U/d_fd_set.U, mcon/U/models.U, mcon/U/d_scannl.U, mcon/U/d_open3.U, mcon/U/d_closedir.U: Added ?F: metalint hint. * mcon/U/libs.U, mcon/U/libnm.U, mcon/U/libyacc.U, mcon/U/libflex.U, mcon/U/libdbm.U, mcon/U/d_socket.U, mcon/U/d_normsig.U, mcon/U/d_crypt.U: Replaced .a with $_a all over the place. * mcon/U/d_csh.U: Added full_csh to preserve the full path even when portable. * mcon/U/d_dosuid.U: Moved unit to TOP via a ?Y: layout directive. Tell them /dev/fd is not about floppy disks. * mcon/U/d_gconvert.U: Integrated new unit from perl5. * mcon/U/d_getpgrp.U: New USE_BSD_GETPGRP to detect the getpgrp() flavour. * mcon/U/d_group.U, mcon/U/d_passwd.U: Useless unit dropped. * mcon/U/d_usendir.U, mcon/U/d_havetlib.U, mcon/U/errnolist.U: Replaced .a with $_a all over the place. Likewise for .o replaced by $_o. * mcon/U/d_newsadm.U: Added Guess dependency. * mcon/U/d_pidcheck.U: Replaced .o with $_o all over the place. Added ?F: metalint hint. * mcon/U/d_poll.U: Mention that can be included if HAS_POLL defined. * mcon/U/d_safebcpy.U, mcon/U/d_safemcpy.U: Improved overlapping copy check. Comfort them if they have memmove. Added ?F: metalint hint. * mcon/U/d_setpgid.U: Reworded symbol comments. * mcon/U/d_setpgrp.U: Obsoleted USE_BSDGRP in favor of USE_BSD_SETPGRP. Another unit now also defines a USE_BSD_GETPGRP. Fallback for test program failure improved. * mcon/U/d_sgndchr.U, mcon/U/d_wifstat.U: Added a ?F: metalint hint. * mcon/U/d_sigvec.U: There is now a separate routine for sigaction(). * mcon/U/d_stdstdio.U: Merged with perl5's unit. * mcon/U/d_syslog.U, mcon/U/mkdep.U: Replaced .o with $_o all over the place. * mcon/U/i_dbm.U: Added I_RPCSVC_DBM check. * mcon/U/i_varhdr.U: Varargs script now starts with leading "startsh". * mcon/U/intsize.U: Avoid prompting the user if the test runs ok. Moved code from longsize.U into there. New tests for shortsize as well. * mcon/U/libc.U: Replaced .a with $_a all over the place. Added support for HPUX-10 nm output. * mcon/U/libnlist.U: Added usrinc and mips on the dependency line. Make sure we call ./mips. Added a ?LINT: hint. * mcon/U/libpth.U: New loclibpth variable. * mcon/U/longsize.U: Code moved to intsize.U. * mcon/U/mallocsrc.U: Added support for Free_t, the type of free(). Replaced .o with $_o all over the place. * mcon/U/manfmt.U, mcon/U/mansrc.U: Don't ask for AFS when they choose to not install pages. * mcon/U/myhostname.U: Improved hostname lookup by using ypmatch when NIS is used. * mcon/U/nblock_io.U: Simplify here document for shells that can't handle them well. Force use of "startsh" at the head of the generated script. Added new files to the ?F: metalint hint. * mcon/U/nis.U: Ensure suitable defaults for hostcat and friends. * mcon/U/orderlib.U: Replaced .a with $_a all over the place. Likewise for .o replaced by $_o. Now uses the ar located by Loc.U. * mcon/U/randbits.U: Added and to the C program test. * mcon/U/registers.U: Removed empty ?LINT lines. * mcon/U/selecttype.U: Always include when available for test. * mcon/U/sig_name.U: Brand new algorithm for sig_name and (new!) sig_num. * mcon/U/spitshell.U: Removed useless chatter as this is now done very early. * mcon/U/ssizetype.U: Integrated perl5 concerns for mis-configured sfio. * mcon/U/startperl.U: Warn them if the #! line is too long for their OS. * mcon/U/startsh.U: Avoid needless chatter since this is now done very early. * mcon/U/usenm.U: Don't use nm with the GNU C library. Added support for Linux shared libs. * mcon/U/usrinc.U: Don't ask for the include path unless they are on a MIPS. * mcon/U/voidflags.U: Don't prompt them if the void support is high enough for us. * mcon/configure: Added the srcdir support now that we have src.U. Random cleanup for nicer help message. * mcon/man/mconfig.SH: Documents the runnning environment and the src.U unit. Added warnings for $_a and $_o, as well as "startsh". * mcon/man/mlint.SH: New "create" and "empty" lint directives. Documented new messages. * mcon/mxref.SH, mcon/man/mxref.SH: New -L option to match metaconfig and metalint. * mcon/pl/lint.pl: Added support for ?F: lines to monitor file usage. Now honours "create" and "empty" lint directives. * pat/pat.man: Documents contents of the message sent by patnotify. * pat/patlog.SH: Typo fix. * pat/patnotify.SH: Let them know the patch priority and description. Mon Sep 25 10:33:26 MET 1995 Raphael Manfredi . Description: Smarter sed command to strip /usr/include dependencies in jmake-generated Makfiles. Thanks to Ulrich Pfeifer for contributing it. In response to the discussion on dist-users, jmake will now force macro definitions to the left in the generated Makefile, even though they may be nicely formatted in the imake-style within the Jmakefile itself (centered on the =). Commented the purpose of the #un-def directive in the relevant unit, since I tend to forget about this hack and almost considered removing it without seeing the consequences. ;-) Configure will now abort when a mandatory command is missing. Indeed, Configure relies on such commands to perform its various tasks, and a miss can have dreadful consequences, without the end-users noticing it. Protected option parsing code against 'echo -*' option failure. Various units are now forced to the top of Configure, if possible. This is mainly interactive questions. Note that dependencies are still respected, i.e. all the units on which those depend will come before, so the top-ness is a relative issue. All possible install programs are now looked for, instead of breaking the loop once one was found. Also, to optimize cache access on AFS directories, the lookup is done on directories first, then on programs instead of the other way round. New ?Y: directive to change unit layout. You may specify a TOP, DEFAULT or BOTTOM request on that line to respectively force the unit to the earliest possible, default or latest possible place in the Configure script, as dependencies permit. Symbols are now sorted according to the ?Y: layout directive. If you use the MailAuthor.U unit, you will be interested by the new -i option for patsend to add extra instructions for people receiving mailed patches. patnotify also tells users how to directly request for mailed patches. The patch making process now automatically supply the -i when invoking patsend. Changes contributed by Graham Stoney . . Files changed: * jmake/files/Jmake.rules: Smarter sed command to strip /usr/include dependencies. * jmake/jmake.SH: Will now force macro definitions to the left. * mcon/U/Config_h.U: Commented the purpose of the #un-def directive. * mcon/U/Loc.U: Commented the purpose of the #un-def directive. Abort Configure run when mandatory command is missing. * mcon/U/Options.U: Protected option parsing code against 'echo -*' option failure. * mcon/U/perlpath.U, mcon/U/manfmt.U, mcon/U/mansrc.U, mcon/U/scriptdir.U, mcon/U/archlib.U, mcon/U/lib.U, mcon/U/privlib.U, mcon/U/bin.U: Unit is now forced to the top of Configure, if possible. * mcon/U/install.U: All possible install programs are now looked for. * mcon/man/mconfig.SH, mcon/man/mlint.SH: Documented new ?Y: directive. Fixed my e-mail address. * mcon/pl/depend.pl, mcon/pl/init.pl, mcon/pl/lint.pl: New ?Y: directive to change unit layout. * mcon/pl/makefile.pl: Symbols are now sorted according to the ?Y: layout directive. * mcon/pl/xref.pl: Added empty p_layout stub for new ?Y: directives. * pat/pat.man: New -i option for patsend to add extra instructions. * pat/patmake.SH: Now calls patsend with -i to add more instructions. * pat/patnotify.SH: Now tells users how to directly request for mailed patches. * pat/patsend.SH: New -i option to add more instructions for end-users. Tue Jul 25 16:41:40 METDST 1995 Raphael Manfredi . Description: pat/Jmakefile was missing an entry for the patlog program, which prevented it from being installed, leading to chaos when patmake was run. New contributions from Ilya Zakharevich to provide OS/2 support. Configure can now be run under OS/2 using a ksh shell interpreter. Support for pdksh is undergoing, as far as I understand. The installation of script man pages can now cope with missing files. The jmake rules used to require that all scripts or none have .man files associated with them. From now on, the generated Makefile will check for the manual page existence before trying to install it. The clobber target now removes the .config directory as well, which is generated by Configure to cache various information over runs. Since clobber is intended to make a clean distribution, that directory must be removed at that stage. All jmake error messages are now prefixed with the program name. Re-arranged compile line to include ldflags before objects within all the compile-link tests in the metaconfig units, since some systems require that ld flags be specfied at that place. The only exception to this being the -llib directive, which stays at the end of the line (from Spider Boardman). added SVR4-ish /opt directories to path list (ADO) Added backslash escapes within evals in Typedef.U to prevent problems when the assigned variables have space in them (such as 'int *')... Force compile-link test for dl* routines since those symbols might lie in crt0.o, and not in any other library (ADO) Improved comments about the Gconvert macro and forced a compile-link test since the gconvert routine may exist but be unusable because it would refer to otherwise missing routines... Sigh! (ADO) Made cc and ccflags optional dependencies in several units. Added knowledge of the O_NONBLOCK symbol in d_open3.U (required for non-blocking I/O support, which is now computed by the new nblock_io.U unit). Use findhdr to find , to get the right one (ADO) Typo fix on ?C: line for FILE_bufsiz in d_stdstdio.U. Also fixed unbalanced parenthesis and check whether FILE_cnt and FILE_ptr can be assigned to, i.e. may be used as lvalues. (ADO) Typo fix, sytem -> system in d_time.U and d_times.U. Conditionally use const in test programs for i_db.U (ADO) Use setvar so hint file values can override our guesses in i_pwd.U. (ADO) Removed <> characters from comments, per metalint suggestion Ensure ctrl-A characters are visible in prompt within the mboxchar.U unit (WED) Removed harmful spaces in assignment for selecttype.U. Added lookup for correct signal name lookup under linux. That's probably as far as we'll get to support those idiosyncracies. Obsoleted KEEPALIVE in favor of CAN_KEEPALIVE for consistency with the 3.0 naming scheme. New metaconfig -G option to include a GNU configure-like wrapper over the generated Configure script. That way, people with a GNU background will be able to use (some) of the GNU configure options to configure the package. The wrapper computes suitable Configure options and then launches that script. Manual page for metaconfig now documents the new -G option, includes an extended description of the Csym.U unit and mentions what a compile-link test line should look like. Metalint will now check : comments line for potential danger, since those lines are really interpreted by the shell. Therefore, unbalanced quotes could cause huge parts of the Configure script to be ignored at run time, yielding weird results. Anyway, metalint will tell you about them. Two new files: a new unit, and the GNU configure-like wrapper. . Files changed: * Jmakefile: Re-ordered macros, moving the install at the end. * bin/packinit.man: Fixed a typo. * jmake/files/Jmake.rules: Install of script man pages can now cope with missing files. The clobber target now removes the .config directory as well. * jmake/jmake.SH: All error messages are now prefixed with the program name. * mcon/Jmakefile: Installs the GNU configure-like front-end to Configure. * mcon/U/Csym.U: Re-arranged compile line to include ldflags before objects. Added quotes for OS/2 support. * mcon/U/libs.U, mcon/U/Loc.U, mcon/U/Guess.U, mcon/U/Oldconfig.U, mcon/U/libc.U: Now knows about OS/2 platforms. * mcon/U/Head.U: Added SVR4-ish /opt directories to path list (ADO). OS/2 platforms are using another path separator. * mcon/U/Typedef.U: Added backslash escapes within evals to prevent space problems. * mcon/U/d_safebcpy.U, mcon/U/d_wifstat.U, mcon/U/d_setpgrp.U, mcon/U/ccflags.U, mcon/U/d_safemcpy.U: Re-arranged compile line to include ldflags before objects. * mcon/U/d_dlerror.U, mcon/U/d_dlopen.U: Force compile-link test since symbol might lie in crt0.o (ADO). * mcon/U/d_gconvert.U: Improved comments about the Gconvert macro (ADO). Force compile-link test since it may exist but be unusable (ADO). * mcon/U/d_volatile.U, mcon/U/d_sgndchr.U, mcon/U/d_scannl.U, mcon/U/d_keepsig.U: Made cc and ccflags optional dependencies. * mcon/U/d_open3.U: Added knowledge of the O_NONBLOCK symbol. * mcon/U/d_shmat.U: Use findhdr to find , to get the right one (ADO). * mcon/U/d_stdstdio.U: Typo fix on ?C: line for FILE_bufsiz. Fixed unbalanced parenthesis (ADO). Check whether FILE_cnt and FILE_ptr can be assigned to (ADO). * mcon/U/d_times.U, mcon/U/d_time.U: Typo fix, sytem -> system. * mcon/U/i_db.U: Conditionally use const in test programs (ADO). * mcon/U/i_pwd.U: Use setvar so hint file values can override our guesses (ADO). * mcon/U/i_sysfile.U: Removed <> characters from comment, per metalint suggestion. * mcon/U/mboxchar.U: Ensure ctrl-A characters are visible in prompt (WED). * mcon/U/nblock_io.U, mcon/configure: Created. * mcon/U/selecttype.U: Removed harmful spaces in assignment. * mcon/U/sig_name.U: Added lookup for linux. * mcon/U/sockopt.U: Obsoleted KEEPALIVE in favor of CAN_KEEPALIVE for consistency. * mcon/man/mconfig.SH: Added extra nroff escapes at line heads to keep leading dots. Documented new -G option. Extended description of the Csym.U unit. Now mentions what a compile-link test line should look like. * mcon/man/mlint.SH: Added two new warnings for : comments lines in Configure. * mcon/mconfig.SH: New -G option. * mcon/pl/cosmetic.pl: Added support for new -G option. * mcon/pl/lint.pl: Will now check : comments line for potential danger. * pat/Jmakefile: Was missing an entry for the patlog program. Fri May 12 14:39:16 METDST 1995 Raphael Manfredi . Description: Regenerated Configure with pre-release of PL54. Updated my e-mail address in all manual pages. I had forgotten about that in my previous patch. Various fixes in units from Andy Dougherty. Thanks to him and to the efficient perl5-porters team that strive to port perl5 to every possible existing platform on Earth, hence making Configure more and more robust ;-). Here are Andy's fixes: . split awk command onto two lines for older awks . fixed C test program to bypasss gcc builtin type checks . deleted tabs that caused some /bin/sh to core dump . cleaned up and extended osvers for DEC OSF/1 . added MachTen detection . protect against spaces in "uname -m" output . extended for more intimate DB probing . made more robust [ng]dbm units by checking both header and libraries for features . can now grok linux nm output with leading __IO . added support for linux ELF output, using 'W' for alias . now looks for too . ensure that ./mips always exists Added -K option for experts. That Configure option should only be used when you know what you are doing. The config.sh reload logic now knows about new -K switch so that you now have to say: Configure -dK to get the old Configure -d behaviour. Configure now checks for a valid C compiler and that the specified ccflags and ldflags are coherent with the choice of the C compiler. It aborts if the C compiler does not work (since it might be used for feature testing), but only offers to abort when a flag inconsistency is detected. Contributed by Tye McQueen (again!). Complete rewrite of d_stdstdio.U by Tye McQueen to fit modern systems. The USE_STD_STDIO symbol has been obsoleted by the new USE_STDIO_PTR symbol. Also, access to _ptr, _cnt and _base fields in the FILE structure should be made only via the new metaconfig macros FILE_ptr, FILE_cnt, etc... Made sure only most recent version of shared lib is picked. This is for systems where libc.so.3 and libc.so.13 might co-exist. We really need to pick the second one, whereas the previous alphabetic sort was picking the first. Final "nm -p" check now uses xscan and xrun like everybody. It used to do its checking manually. Using xscan and xrun allows for the printing of the busy dots while scanning. The patpost script will now add an explicit From: header line pointing to the maintainer address, as configured in your .package. This is to prevent broken inews to insert the hostname where patpost is ran, which might not be visible from the outside. . Files changed: * pat/pat.man, bin/packinit.man, jmake/jmake.man, kit/kitpost.man, bin/manilist.man, kit/makedist.man, jmake/jmkmf.man, kit/manifake.man, , dist.man: Updated my e-mail address. * mcon/U/Cppsym.U: Split awk command onto two lines for older awks (ADO). * mcon/U/Csym.U: Fixed C test program to bypasss gcc builtin type checks (ADO). * mcon/U/Inhdr.U: Deleted tabs that caused some /bin/sh to core dump (ADO). * mcon/U/Oldconfig.U: Config.sh reload logic now knows about new -K switch. Cleaned up and extended osvers for DEC OSF/1 (ADO). Added MachTen detection (ADO). * mcon/U/Options.U: Added -K option for experts. * mcon/U/archname.U: Protect against spaces in "uname -m" output (ADO). * mcon/U/cc.U: May now abort Configure when cc does not work. * mcon/U/ccflags.U: Now checks for cc/ccflags/ldflags coherency. * mcon/U/d_casti32.U: Made sure cc and ccflags are conditional dependencies. * mcon/U/d_castneg.U: Made sure cc and ccflags are conditional dependencies. Added improved test case for Interactive Unix. * mcon/U/d_stdstdio.U: Complete rewrite by Tye McQueen to fit modern systems. * mcon/U/d_voidsig.U: Made cppflags dependency optional. * mcon/U/i_db.U: Extended for more intimate DB probing (ADO). * mcon/U/i_gdbm.U, mcon/U/i_ndbm.U, mcon/U/i_dbm.U: Made more robust by checking both header and lib (ADO). * mcon/U/libc.U: Made sure only most recent version of shared lib is picked. Final "nm -p" check now uses xscan and xrun like everybody. Can now grok linux nm output with lead __IO (ADO). Added support for linux ELF output, using 'W' for alias (ADO). * mcon/U/sig_name.U: Now looks for too (ADO). * mcon/U/usrinc.U: Ensure that ./mips always exists (ADO). * mcon/man/mconfig.SH: Documented new -K switch for knowledgeable users. * pat/patpost.SH: Added explicit From: header line pointing to the maintainer. Tue Mar 21 09:55:57 MET 1995 Raphael Manfredi . Description: Regenerated Configure to reflect my email address change. I moved from ACRI to HP, and my email is now: . The "critical" nature of this patch is due to that mere fix. Jmake was not working at all on HP-UX due to the way their cpp systematically removes trailing backslashes in text. The new fixcpp script is now a wrapper over cpp to first escape those backslashes that should be preserved accross cpp before feeding it with the text of the Jmakefile... Suppressed extra argument to NormalProgramTarget call in jmake rules. Definition of the paths variable in Head.U wrongly added spurious ':' chars. Thanks to Karst Koymans for pointing it out. Swapped two first arguments of memcpy() calls for memcpy safe overlapping copy tests. Indeed, the memcpy() calling sequence used was the same as bcopy(), but the first two arguments should be swapped to preserve the same semantics. Continued fix for NeXT NIS/NetInfo handling, from Graham Stoney. Two new files. . Files changed: * jmake/Jmakefile: Now installs new fixcpp script in the private libdir. * jmake/files/Jmake.rules: Suppressed extra argument to NormalProgramTarget call. * jmake/fixcpp.SH, mcon/U/d_wifstat.U: Created. * jmake/jmake.SH: Now invokes cpp through new fixcpp script. First pass now skips cpp comments alltogether. * mcon/U/Head.U: Definition of paths wrongly added spurious ':' chars. * mcon/U/d_safemcpy.U: Swapped two first arguments of memcpy() calls. * mcon/U/nis.U: Continued fix for NeXT NIS/NetInfo handling. Wed Feb 15 15:23:06 MET 1995 Raphael Manfredi . Description: This patch only contains random cleanup and minor fixes that were brought to my attention on the dist-users list. Regenerated Configure with pre-release of 3.0 PL51, since it was a little outdated. Wayne Davison's changes: . now clearer about how to edit config.sh at the end of Configure. . Getfile was not working if ~'s allowed with d_portable on . Instruct.U: author name now appears at the end of a paragraph Andy Dougherty adapted osvers computation for AIX. He also fixed mansrc.U where I had mistakenly duplicated /usr/local/man/man1. He added /opt/man/man1 to the lookpath instead, a change originating from Tye McQueen . Architecture name is now computed by a separate unit. This allows authors to precompute it in a hint file, while warning the user when the machine's architecture name changes (because for instance the OS was upgraded), preventing mistakes. Now correctly handles NeXT using NIS rather than NetInfo, thanks to a patch sent by Graham Stoney . One new file (unit archname.U). . Files changed: * mcon/U/Finish.U: Now clearer about how to edit config.sh at the prompt (WED). * mcon/U/Getfile.U: Was not working if ~'s allowed with d_portable on (WED). * mcon/U/Instruct.U: Author name now appears at the end of the paragraph (WED). * mcon/U/Oldconfig.U: Adapted osvers computation for AIX (ADO). * mcon/U/archlib.U: Architecture name is now computed by a separate unit. * mcon/U/archname.U: Created. * mcon/U/mansrc.U: Was mistakenly duplicating /usr/local/man/man1 (ADO). Added /opt/man/man1 to the lookpath (ADO). * mcon/U/nis.U: Now correctly handles NeXT using NIS rather than NetInfo. Mon Jan 30 15:59:00 MET 1995 Raphael Manfredi . Description: The dist-3.0 package now works with perl 5.0. I have made perl 5.0 the default perl on my machine and ran the whole set of pat* tools, jmake and metaconfig without any trouble so far. However, you need a patched-up version of perl 5.0 PL0, as explained in README. This set of patches is mainly an integration of Wayne Davison's changes for trn. His changes are flagged as WED. Begin.U: Avoid an empty rmlist: systems might choke on it (WED). Config_h.U: Typo fixes in leading config.h comment (WED). Oldconfig.U: Update code for myuname changed (WED). Configure can now handle installation prefix changes. I have slightly adapted the changes proposed by Wayne, introducing two new special units (Prefixit.U and Prefixup.U) to factorize code. d_attribut.U: Test C program now includes (WED) page.U: Ensure dflt gets initialized in case no pagers are found (WED) prefix.U: Save off previous prefix value in oldprefix if changed (WED) Added the INSTALLPREFIX define for C programs to use (WED) Archname is now systematically recomputed. This avoids problem when the user changes his mind about the OS name. Now looks for POSIX regcomp() routine, and for , thanks to Sidney C. Smith . New installmanfmt and AFS-lookup for formatted man pages, derived from what is done for troffed man pages. New prefixexp variable holding a fully expanded prefix, in case they use ~name expansion in their prefix. Documented new special units Prefixit.U and Prefixup.U. Clean-up and workarounds for perl 5.0 PL0 port: Removed old "do name()" routine call constructs. Forgot to localize the spaces variable. Random clean-up in &record_obsolete. Three new files. . Files changed: * mcon/U/Begin.U: Avoid an empty rmlist: systems might choke on it (WED). * mcon/U/Config_h.U: Typo fixes in leading config.h comment (WED). * mcon/U/Oldconfig.U: Unit Options.U now exports file optdef.sh, not a variable. Update code for myuname changed (WED). * mcon/U/Options.U: This unit now exports file optdef.sh, not a variable. * mcon/U/i_regex.U, mcon/U/Prefixit.U, mcon/U/Prefixup.U: Created. * mcon/U/archlib.U: Archname is now systematically recomputed. Can now handle installation prefix changes (from WED). * mcon/U/mansrc.U, mcon/U/scriptdir.U, mcon/U/lib.U, mcon/U/privlib.U, , mcon/U/bin.U: Can now handle installation prefix changes (from WED). * mcon/U/d_attribut.U: Test C program now includes (WED). * mcon/U/d_regcmp.U: Now looks for POSIX regcomp() routine. * mcon/U/manfmt.U: New installmanfmt and AFS-lookup for formatted man pages. Can now handle installation prefix changes (from WED). * mcon/U/pager.U: Ensure dflt gets initialized in case no pagers are found (WED). * mcon/U/prefix.U: New prefixexp variable holding a fully expanded prefix. Save off previous prefix value in oldprefix if changed (WED). Added the INSTALLPREFIX define for C programs to use (WED). * mcon/U/rootid.U: Now only prints a single empty line when outputting something. * mcon/man/mconfig.SH: Documented new special units Prefixit.U and Prefixup.U. * mcon/pl/configure.pl, mcon/pl/eval.pl: Removed old "do name()" routine call constructs. * mcon/pl/cosmetic.pl: Forgot to localize the spaces variable. * mcon/pl/obsolete.pl: Random clean-up in &record_obsolete. Wed Jan 11 17:03:22 MET 1995 Raphael Manfredi . Description: Regenerated Configure with pre-release of metaconfig PL45 to benefit from the new install program lookup. From now on, the supplied install.SH script will not be used if a BSD-compatible install executable is found on your host (to accelerate the whole install procedure). Regenerated many Makefile.SH files with pre-release of jmake PL45 to correctly handle the new install and installdir configuration variables. Updated the Wishlist file. New jmake macros. Also the MakeDirs macro was modified to benefit from the information gathered by Configure concerning the way to install nested directories (uses the new installdir variable). As a consequence, Makefile.SH files now pre-compute INSTALL and INSTALLDIR variables before substituting (concerns jmake-generated makefiles). Moved path stripping from d_portable.U to end of Configure. This lets Configure use $vi and $perl, etc... set to their fully qualified path name, hence making it easier for units to know whether a particular program was located. Formerly, you had to use $_vi, $_perl, etc... in case they asked for portability, which stripped out executable paths. New cc vs. cpp symbol checking, as well as more cpp symbols in the attribute list. Configure will now try to determine separately symbols defined by cpp and by the cc wrapper, letting you know about what is defined and by whom. Thanks to Jarkko Hietaniemi for this suggestion. Added support for escaping answers to skip various checks in the Getfile.U unit. For instance, you may now say: fn='/fe~(foo)' . ./getfile and let them answer only fully qualified paths OR the string 'foo'. You may supply a comma-separated list between the parenthesis. See the manual page or the new install.U unit for more information. Modified message issued after file expansion in the Getfile unit. Protected various "sh -c" calls within backquotes for Linux and SGI shells (to prevent an "ambiguous output redirection" message). Thanks to Xavier Le Vourch for suggesting it. Added & escape allowing user to turn on -d from the prompt. Several people have expressed the need for such a feature, arguing that once they have re-run a Configure script to fix the answer to a particular question, they would like to have the remaining of the script ran as if -d had been given to Configure. Well, they now may reply '& -d' at the Myread prompt to turn -d on. New -O option allowing -D and -U to override config.sh setttings. This may be used to alter particular variables but still re-use most of the previously guessed-at ones. Still, this may produce inconsistencies and therefore is not the default behaviour (the -D and -U switches have no effect by default if a previous config file is loaded). Therefore, file optdef.sh is no longer removed after sourcing from the UU directory. Changed gcc checking message to a more explicit one (WED) Call ./mips instead of just mips (WED) Use 'test -f' instead of 'test -r' for exec-only cat progs (WED) Fixed typo in the d_attribut variable (ADO) New unit install.U to locate BSD-compatible install programs. New unit poll.U to check for the poll() routine availability. Allows hint files to specify their own value for 'ranlib', to overcome a bug in the NeXT ranlib program. Suggested by Andreas Koenig on the perl5-porters mailing list. Thanks! Now sets sbrksmart to undef explicitely when lacking sbrk(). Forgot a cast when using return value from sbrk(). Both fixes reported by Xavier Le Vourch . Now allows @if statements for the add.Config_sh unit inclusion. Metaconfig will now tell users about possible extra file-extension lookups they have requested via 'packinit'. . Files changed: * jmake/files/Jmake.rules: New macros ShellScriptTargetExt and SimpleShellScriptTargetExt. Directory installation is now made via INSTALLDIR (Configure). * jmake/files/Jmake.tmpl: Now pre-computes INSTALL and INSTALLDIR variables. * mcon/U/Config_sh.U: Moved path stripping from d_portable.U to end of Configure. * mcon/U/Cppsym.U: New cc vs. cpp symbol checking suggested by JHI. Added more cpp symbols (JHI). * mcon/U/Getfile.U: Added support for escaping answers to skip various checks. Modified message issued after file expansion. * mcon/U/Instruct.U: Now documents the & escape to turn -d on at the read prompt. * mcon/U/Loc.U: Protected "sh -c" within backquotes for Linux and SGI. Added path lookup for the 'comm' program. * mcon/U/Myread.U: Added & escape allowing user to turn on -d from the prompt. * mcon/U/Oldconfig.U: Added quotes around the INITPROG variable (ADO). Allows variable overriding after config file loading. * mcon/U/Options.U: New -O option allowing -D and -U to override config.sh setttings. File optdef.sh is no longer removed after sourcing. * mcon/U/cc.U: Changed gcc checking message to a more explicit one (WED). * mcon/U/d_attribut.U: Fixed typo in the d_attribut variable (ADO). * mcon/U/d_keepsig.U: Protected "sh -c" within backquotes for Linux and SGI. * mcon/U/install.U, mcon/U/d_poll.U: Created. * mcon/U/d_portable.U: Executable path stripping moved to the end in Config_sh.U. * mcon/U/d_safebcpy.U: Added 'ldflags' to the test compile line (ADO). * mcon/U/defeditor.U: Can now use the 'vi' variable since path stripping is deferred. * mcon/U/libpth.U: Call ./mips instead of just mips (WED). * mcon/U/perlpath.U, mcon/U/mansrc.U, mcon/U/mailer.U: Can now use Loc variables since path stripping is deferred. * mcon/U/orderlib.U: Allows hint files to specify their own value for 'ranlib'. * mcon/U/sbrksmart.U: Now sets sbrksmart to undef explicitely when lacking sbrk(). Forgot a cast when using return value from sbrk(). * mcon/U/spitshell.U: Use 'test -f' instead of 'test -r' for exec-only cat progs (WED). Protected "sh -c" within backquotes for Linux and SGI. * mcon/U/voidflags.U: Cosmetic change to avoid spurious blank lines when using -s. * mcon/man/mconfig.SH: Documents new -O option and new Getfile escape supports. Documents the & escape in Myread and the new cc symbol lookup. * mcon/pl/configure.pl: Now allows @if statements for the add.Config_sh unit inclusion. * mcon/pl/wanted.pl: Added % in front of hash table names for perl5's each() (ADO). Tell users about possible extra file-extension lookups. Mon Oct 31 10:57:05 MET 1994 Raphael Manfredi . Description: It used to be that option processing was done before Configure initializations were performed, because Options was listed in the dependency line of Init.U. However, this was wrong because -D and -U command line switches were then unable to override any default setting done in Myinit.U, which is counter-intuitive at best. Thanks to Andras Salamon for pointing this out. I therefore created a new unit Begin.U, which clearly marks the beginning of the configuration questions (so End.U now has its pending unit). On that unit, we list Myinit followed by Options on the ?MAKE: line, so that option processing comes after user-defined or default initializations but before the real interactive start (which is mandatory for a correct Configure -h processing, for instance). A few units were making use of variables set up in Options.U and made visible. However, those did not need to list Options in their ?MAKE: line due to the way metalint performs its visible symbol lookup (by following dependencies recursively and implicitely placing Init at the top). Since Options is no longer a dependency of Init, Myread.U and Csym.U now explicitely mention Options in their dependency line. Also, the leading comment in Chk_MANI.U now explains how this unit gets included into the Configure script. There used to be an explaination there, but it was no longer accurate. One new unit file (Begin.U). . Files changed: * mcon/U/Begin.U: Created. * mcon/U/Chk_MANI.U: Now lists Begin instead of Myinit in its dependencies. Leading comment now explains how this unit is included. * mcon/U/Myread.U, mcon/U/Csym.U: Added Options to the MAKE line since it's no longer in Init.U. * mcon/U/Init.U: Removed Options from MAKE to prevent Init overrides. Option processing now done after Myinit thanks to new Begin.U. Moved "Beginning of configuration questions" to Begin.U. Moved signal trapping instruction to Begin.U as well. * mcon/U/Myinit.U: Leading comment states this unit comes before option processing. Sat Oct 29 19:05:42 MET 1994 Raphael Manfredi . Description: I forgot to quote $@ to protect against "evil" characters. Unfortunately, this causes Configure to output an error message when calling the created 'tr' script (which it does all the time given the leading '.' in PATH) with arguments like '\012'. The final exec tr $@ line causes a 'tr' failure because it does not understand the arguments it is given. Saying exec tr "$@" fixes the problem since then the original quotes are "propagated" to the new call. The amazing thing is that I have tested this, but apparently the simple Configure script I generated for that purpose did not make use of the "tr '/012' ' '" construct. Hence I missed it. Sorry. . Files changed: * mcon/U/Tr.U: Forgot to quote $@ to protect against "evil" characters. Sat Oct 29 18:16:03 MET 1994 Raphael Manfredi . Description: Regenerated Configure with metaconfig 3.0 PL35 to benefit from the lattest enhancements. Unfortunately, I have not pre-installed the patch relased before regenerating, so Configure is still behind the current patchlevel. I hope you don't mind ;-) The good news is: I've made sure all the scripts compile fine with perl 5.0. This involved fixing an open precedence problem in manilist, and some escapes in strings and regexps to make sure all dangerous '@' are protected since they now interpolate. I also fixed perload since perl5's packages are now introduced by '::' instead of the single quote. The bad news is: it's not guaranteed to work. At least with the pre-release version of perl 5.0 I have, metaconfig (the dataloaded version) fails, and I've not been able to narrow down the problem to a small test-case so I don't know what's happening. The non dataloaded version appears to be running fine, but if you get strange problems, make sure you use perl 4.0 PL36 before sending me a bug report. :-) Added support for user-defined C and shell file extensions. This was needed in perl5 for instance (.xs files are containing C symbols and metaconfig should really look at those). Well, you may now add as many extensions (C or SH) from within packinit. Packinit also asks whether a ChangeLog file is to be managed. This is a new feature relying on the new patlog script. If you don't ask for a ChangeLog file, you should get the old behaviour. If you do, well you will have to read the documentation to know what changes it involves (mainly at the user-interface level when running 'patmake', which now calls 'patlog'). Don't forget to add ChangeLog to your MANIFEST.new before running patmake anyway. Optionally, you can include the RCS logs within your ChangeLog file, and they will follow the description (what you are reading now) which normally appears within the Description: section of the patch itself. Packinit now creates new variables cext, shext, changelog and changercs in the .package file to handle user-defined file extensions and the ChangeLog file. Added new RemoteDependency rule for jmake. Don't use rootid as a variable, it is known by metaconfig and results in having Configure compute the root uid when it's not needed. Renamed it to rootmsgid to avoid this kind of problem. Added ?F: lines in units creating files for metalint checking. This incurred many small changes in units where things like if usg; then were written when in fact meaning: if ./usg; then Well, I know Configure sets '.' at the beginning of the PATH, but since metalint now systematically warns about such abuse (provided files are declared in the ?F: lines in the special unit defining them), it was the only way to shut up metalint. Metalint also now checks for variables used as ${var}. Symbols ardent and titan are now looked at for cpp definition. (ADO) Make sure ENV is unset before calling /bin/ksh. Not doing this is known to produce strange results. For instance, if one has a ~/.kshrc aliasing 'cd' to something else. Configure might get confused and do the wrong thing. Not setting ENV ensures no such startup file will be used. Of course, this does not work if you say 'ksh Configure', but then you are supposed to know what you are doing. The loc script can now perform safe wildcard searching. (ADO) The Oldconfig.U unit was merged with the version used for perl5's Configure (ADO). Be careful if you use hints, the behaviour you will now get might not be fully backward compatible. Since the Author currently does not have any such package, he did not test that specific feature. You have been warned. (But everything should be fine). Configure now protects variable definitions with spaces in them, so that people saying: Configure -D cc='cc -posix' will get what they expect. Added checks for secure setuid scripts. (Tye McQueen) Spurious single quote in the lex.U unit could cause Configure to crash, reported by Xavier Le Vourch . Indeed, the unit was saying something like : .... and they'll ... so the shell happily began to eat everything up to the next single quote it could found, resulting in weird behaviours... Now looks for shared libraries before anything else and removed the old broken thislib/thatlib processing in libs.U. This has been tested in the perl5 distribution and is believed to be better than the previous scheme. (ADO) New Tr unit to convert to/from lowercase. Whenever you need to say: tr '[A-Z]' '[a-z]' or the other way round, add Tr in your dependency line and say something like ./tr '[A-Z]' '[a-z]' i.e. you need to call a local tr script that will trap the arguments and possibly call tr '[:upper:]' '[:lower:]' if your machine supports this. Otherwise, with a non-ascii character set, you will get strange results (HP is know to exercise this, thanks to Andreas Sahlbach for letting me know about it). ranlib checking is more accurate now (ADO) Newer RCS programs chop trailing spaces in log messages, and that could cause 'patcil -s' to fail stripping the RSC logs. separated V/E and v/e commands in the patcil built-in prompter. The new 'v' command now edits the file being patcil'ed. added hook for 'V' command (not implemented yet) The 'e' and 'E' commands have retained their semantics. 19 new files, mostly metaconfig units. . Files changed: * bin/manilist.SH: Fixed open precedence problem for perl5. * bin/packinit.SH: Added support for user-defined C and shell file extensions. Now asks whether a ChangeLog file is to be managed. * bin/packinit.man: Added new variables cext, shext, changelog and changercs. * bin/perload: Added minimal support for perl5 dataloading. * dist.man: Mentions new patlog script and ChangeLog file. * jmake/files/Jmake.rules: Added RemoteDependency rule. * jmake/jmake.SH, pat/patnotify.SH, mcon/pl/depend.pl: Added various escapes in strings for perl5 support. * kit/kitpost.SH: Don't use rootid as a variable, it is known by metaconfig. * mcon/U/bitpbyte.U, mcon/U/d_NOFILE.U, mcon/U/mkdep.U, mcon/U/d_PORTAR.U, mcon/U/alignbytes.U, mcon/U/byteorder.U, mcon/U/Finish.U, mcon/U/nlist_pfx.U, mcon/U/charorder.U, mcon/U/d_getpagsz.U, mcon/U/ptrsize.U, mcon/U/intsize.U, mcon/U/Getfile.U, mcon/U/Extract.U, mcon/U/Myread.U, mcon/U/Whoa.U, mcon/U/longsize.U, mcon/U/floatsize.U, mcon/U/Config_sh.U, mcon/U/cppstdin.U, mcon/U/doublesize.U, mcon/U/Findhdr.U, mcon/U/i_varhdr.U, mcon/U/charsize.U: Added ?F: line for metalint file checking. * mcon/U/Cppsym.U: Added ?F: line for metalint file checking. New symbols ardent and titan (ADO). * mcon/U/Filexp.U: Added ?F: line for metalint file checking. Added HOME to the ?T: line since metalint now checks ${HOME}. * mcon/U/Guess.U: Added ?F: line for metalint file checking. Call ./xenix explicitely instead of relying on PATH. * mcon/U/Head.U: Make sure ENV is unset before calling /bin/ksh. * mcon/U/Setvar.U, mcon/U/Inhdr.U, mcon/U/Inlibc.U: Call ./whoa explicitely instead of relying on PATH. * mcon/U/Loc.U: Added ?F: line for metalint file checking. Be careful and guard against wildcard searching (ADO). * mcon/U/Oldconfig.U: Added ?F: line for metalint file checking. Merged with the version used for perl5's Configure (ADO). * mcon/U/Options.U: Ensure option definition file is removed before appending. Protect variable definitions with spaces in them. * pat/patlog.SH, mcon/U/Tr.U: Created. * mcon/U/Typedef.U: Don't clobber visible 'val' variable, use 'varval' instead. * mcon/U/Warn_v7EXT.U, mcon/U/Warn_v7ND.U: Call ./v7 explicitely instead of relying on PATH. * mcon/U/abortsig.U, mcon/U/d_bsdjmp.U: Call ./usg explicitely instead of relying on PATH. * mcon/U/d_attribut.U, mcon/U/d_gconvert.U, mcon/U/d_drem.U, mcon/U/d_locconv.U, mcon/U/d_mkfifo.U, mcon/U/d_fmod.U, mcon/U/d_linuxstd.U, mcon/U/d_pathconf.U, mcon/U/archlib.U, mcon/U/d_dlerror.U, mcon/U/d_sysconf.U, mcon/U/i_dld.U, mcon/U/modetype.U: Created by ADO. * mcon/U/cc.U: Detect gcc even when not called as 'gcc' (ADO). Simplified gcc version checking (ADO). Added ?F: line for metalint file checking. * mcon/U/ccflags.U: Gcc versionning no longer relies on the C compiler's name. Simplified check for gcc version checking (ADO). * mcon/U/cpp_stuff.U: Now uses cppstdin instead of plain cpp for consistency (ADO). Remove temporary files when done. * mcon/U/d_casti32.U: Declare signal handler correctly (ADO). * mcon/U/d_castneg.U: Don't forget to tell user about compilation failures (ADO). Declare signal handler correctly using 'signal_t' (ADO). * mcon/U/d_closedir.U, mcon/U/d_safemcpy.U, mcon/U/d_isascii.U: Added 'ldflags' to the test compile line (ADO). * mcon/U/d_dosuid.U: Added checks for secure setuid scripts (Tye McQueen). * mcon/U/d_keepsig.U, mcon/U/d_eofpipe.U, mcon/U/d_normsig.U, mcon/U/d_tzmin.U: Call ./bsd explicitely instead of relying on PATH. * mcon/U/d_gethname.U: Call ./xenix explicitely instead of relying on PATH. * mcon/U/d_newsadm.U: Call ./eunice explicitely instead of relying on PATH. * mcon/U/d_setpgrp.U: Added 'ldflags' to the test compile line (ADO). Call ./usg explicitely instead of relying on PATH. * mcon/U/registers.U, mcon/U/shm_for.U, mcon/U/d_speedopt.U: Call ./Cppsym explicitely instead of relying on PATH. * mcon/U/d_time.U: Now uses new Typedef unit to compute type information (ADO). * mcon/U/groupstype.U: No longer uses Setvar to set 'groupstype' (ADO). Typo fix in the word 'argument' (ADO). * mcon/U/i_dirent.U: Failed scanning for 'd_namlen' with missing (ADO). * mcon/U/i_neterrno.U: Forgot to initialize 'val' to an empty value (ADO). * mcon/U/i_termio.U: Call ./usg and ./Cppsym explicitely instead of relying on PATH. * mcon/U/lex.U: Spurious single quote could cause Configure to crash. (reported by Xavier Le Vourch .). * mcon/U/libc.U: Now looks for shared libraries before anything else (ADO). Added new nm output format (ADO). * mcon/U/libs.U: Removed old broken thislib/thatlib processing (ADO). * mcon/U/mailfile.U: The Loc unit was missing from the dependency line. * mcon/U/myhostname.U: Call ./xenix explicitely instead of relying on PATH. Now uses new Tr unit to convert to/from lowercase. * mcon/U/nametype.U: Call ./usg and ./bsd explicitely instead of relying on PATH. * mcon/U/orderlib.U: Now performs a real small compile for accurate checks (ADO). * mcon/U/package.U: Beware of non-ascii character sets when translating case. * mcon/U/pager.U: Replaced Myread by Getfile in the dependency line. * mcon/U/prefshell.U: Added SHELL temporary since metalint now sees ${SHELL}. * mcon/U/so.U: Now tells user how he can suppress shared lib lookup (ADO). Removed echo at the top, since it's now in the here-doc (ADO). * mcon/U/ssizetype.U: Added ?F: line for metalint file checking. Added 'ldflags' to the test compile line (ADO). * mcon/man/mconfig.SH: Added nroff protection for lines beginning with '.'. Documents new ?F: line for file declarations. Added example showing how ./loc can be used. * mcon/man/mlint.SH: Documents new ?F: lines and the related metalint warnings. Removed statement in BUGS since all warnings may now be shut. * mcon/man/mxref.SH: The leading .TH was referring to metaconfig. * mcon/pl/common.pl: Metaconfig and metaxref ignore ?F: lines from now on. * mcon/pl/files.pl: Added user-defined file extension support for lookups. * mcon/pl/lint.pl: Now extensively checks created files thanks to new ?F: lines. * mcon/pl/locate.pl: Misspelled a 'closedir' as a 'close' statement. * pat/pat.SH: Now unlinks all the files created by patlog in bugs. * pat/pat.man: Documents new patlog script and the files it uses. The RCS layer section has been extended slightly. * pat/patcil.SH: Now honors the VISUAL and EDITOR environment variables. Newer RCS programs chop trailing spaces in log messages. Separated V/E and v/e commands. New 'v' command to edit the file being patcil'ed. Added hook for 'V' command (not implemented yet). * pat/patmake.SH: A lot of setup is now performed by patlog. Added various escapes in strings for perl5 support. dist_3.5-36.001/pl/0002755000175000017500000000000012645366701014034 5ustar srivastasrivastadist_3.5-36.001/pl/profile.pl0000644000175000017500000000477610473316164016040 0ustar srivastasrivasta;# $Id: profile.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: profile.pl,v $ ;# Revision 3.0.1.1 1994/01/24 14:33:53 ram ;# patch16: created ;# ;# ;# Dist profile management (works like MH and its ~/.mh_profile): ;# - Profile name is held in the environment variable DIST. If not defined, ;# use ~/.dist_profile by default. ;# - Each line in the profile not starting with a '#' (comment line) should ;# have the following format: ;# progname: additional command line options ;# The profile is parsed once when the command is launched and profile ;# options are added at the beginning of the @ARGV array. ;# ;# Per-program configuration values may be also be added. For instance, ;# program foo may pay attention to a profile component 'bar', which may be ;# set via: ;# foo-bar: value ;# i.e. the program name is followed by a '-', followed by the profile ;# component. ;# ;# Uses &tilda_expand to perform ~name substitution. ;# Requires shellwords.pl to properly quote shell words (perl library). ;# # Set up profile components into %Profile, add any profile-supplied options # into @ARGV and return the command invocation name. sub profile { local($profile) = &tilda_expand($ENV{'DIST'} || '~/.dist_profile'); local($me) = $0; # Command name $me =~ s|.*/(.*)|$1|; # Keep only base name return $me unless -s $profile; local(*PROFILE); # Local file descriptor local($options) = ''; # Options we get back from profile unless (open(PROFILE, $profile)) { warn "$me: cannot open $profile: $!\n"; return; } local($_); local($component); while () { next if /^\s*#/; # Skip comments next unless /^$me/o; if (s/^$me://o) { # progname: options chop; $options .= $_; # Merge options if more than one line } elsif (s/^$me-([^:]+)://o) { # progname-component: value $component = $1; chop; s/^\s+//; # Trim leading and trailing spaces s/\s+$//; $Profile{$component} = $_; } } close PROFILE; return unless $options; require 'shellwords.pl'; local(@opts); eval '@opts = &shellwords($options)'; # Protect against mismatched quotes unshift(@ARGV, @opts); return $me; # Return our invocation name } dist_3.5-36.001/pl/manifake.pl0000644000175000017500000000240510473316164016136 0ustar srivastasrivasta;# $Id: manifake.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: manifake.pl,v $ ;# Revision 3.0 1993/08/18 12:10:55 ram ;# Baseline for dist 3.0 netwide release. ;# ;# sub manifake { # make MANIFEST and MANIFEST.new say the same thing if (! -f $NEWMANI) { if (-f $MANI) { open(IN,$MANI) || die "Can't open $MANI"; open(OUT,">$NEWMANI") || die "Can't create $NEWMANI"; while () { if (/---/) { # Everything until now was a header... close OUT; open(OUT,">$NEWMANI") || die "Can't recreate $NEWMANI"; next; } s/^\s*(\S+\s+)[0-9]*\s*(.*)/$1$2/; print OUT; print OUT "\n" unless /\n$/; # If no description } close IN; close OUT; } else { die "You need to make a $NEWMANI file, with names and descriptions.\n"; } } } dist_3.5-36.001/pl/tilde.pl0000644000175000017500000000147710473316164015474 0ustar srivastasrivasta;# $Id: tilde.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: tilde.pl,v $ ;# Revision 3.0 1993/08/18 12:11:01 ram ;# Baseline for dist 3.0 netwide release. ;# ;# # Perform ~name expansion ala ksh... # (banish csh from your vocabulary ;-) sub tilda_expand { local($path) = @_; return $path unless $path =~ /^~/; $path =~ s:^~([^/]+):(getpwnam($1))[$[+7]:e; # ~name $path =~ s:^~:$ENV{'HOME'} || (getpwuid($<))[$[+7]:e; # ~ $path; } dist_3.5-36.001/pl/snapshot.pl0000644000175000017500000000151110473316164016217 0ustar srivastasrivasta;# $Id: snapshot.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: snapshot.pl,v $ ;# Revision 3.0.1.1 1993/08/24 12:22:34 ram ;# patch3: created ;# # Read snapshot file and build %Snap, indexed by file name -> RCS revision sub readsnapshot { local($snap) = @_; open(SNAP, $snap) || warn "Can't open $snap: $!\n"; local($_); local($file, $rev); while () { next if /^#/; ($file, $rev) = split; $Snap{$file} = "$rev"; } close SNAP; } dist_3.5-36.001/pl/makedir.pl0000644000175000017500000000163410473316164016002 0ustar srivastasrivasta;# $Id: makedir.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: makedir.pl,v $ ;# Revision 3.0 1993/08/18 12:10:54 ram ;# Baseline for dist 3.0 netwide release. ;# ;# # Make directories for files # E.g, for /usr/lib/perl/foo, it will check for all the # directories /usr, /usr/lib, /usr/lib/perl and make # them if they do not exist. sub makedir { local($_) = shift; local($dir) = $_; if (!-d && $_ ne '') { # Make dirname first do makedir($_) if s|(.*)/.*|\1|; mkdir($dir, 0700) if ! -d $dir; } } dist_3.5-36.001/pl/rcsargs.pl0000644000175000017500000000257010473316164016032 0ustar srivastasrivasta;# $Id: rcsargs.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: rcsargs.pl,v $ ;# Revision 3.0 1993/08/18 12:11:01 ram ;# Baseline for dist 3.0 netwide release. ;# ;# sub rcsargs { local($result) = ''; local($_); while ($_ = shift(@_)) { if ($_ =~ /^-/) { $result .= $_ . ' '; } elsif ($#_ >= 0 && do equiv($_,$_[0])) { $result .= $_ . ' ' . $_[0] . ' '; shift(@_); } else { $result .= $_ . ' ' . do other($_) . ' '; } } $result; } sub equiv { local($s1, $s2) = @_; $s1 =~ s|.*/||; $s2 =~ s|.*/||; if ($s1 eq $s2) { 0; } elsif ($s1 =~ s/$RCSEXT$// || $s2 =~ s/$RCSEXT$//) { $s1 eq $s2; } else { 0; } } sub other { local($s1) = @_; ($dir,$file) = ('./',$s1) unless local($dir,$file) = ($s1 =~ m|(.*/)(.*)|); $dir = $TOPDIR . $dir if -d $TOPDIR . "$dir/RCS"; local($wasrcs) = ($file =~ s/$RCSEXT$//); if ($wasrcs) { `mkdir $dir` unless -d $dir; $dir =~ s|RCS/||; } else { $dir .= 'RCS/'; `mkdir $dir` unless -d $dir; $file .= $RCSEXT; } "$dir$file"; } dist_3.5-36.001/pl/newer.pl0000644000175000017500000000403610473316164015505 0ustar srivastasrivasta;# $Id: newer.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: newer.pl,v $ ;# Revision 3.0.1.2 1994/01/24 14:33:48 ram ;# patch16: now also aborts when .newer file holds a single new-line ;# ;# Revision 3.0.1.1 1993/09/09 11:51:07 ram ;# patch9: now skips the 'users' file when computing newest file list ;# ;# Revision 3.0 1993/08/18 12:10:56 ram ;# Baseline for dist 3.0 netwide release. ;# ;# sub newer { open(FIND, "find . -type f -newer patchlevel.h -print | sort |") || die "Can't run find.\n"; open(NEWER,">.newer") || die "Can't create .newer.\n"; open(MANI,"MANIFEST.new"); while () { ($name,$foo) = split; $mani{$name} = 1; } close MANI; while () { s|^\./||; chop; next if m|^MANIFEST|; next if m|^PACKLIST$|; if (!$mani{$_}) { next if m|^MANIFEST.new$|; next if m|^Changes$|; next if m|^Wanted$|; next if m|^.package$|; next if m|^bugs|; next if m|^users$|; next if m|^UU/|; next if m|^RCS/|; next if m|/RCS/|; next if m|^config.sh$|; next if m|/config.sh$|; next if m|^make.out$|; next if m|/make.out$|; next if m|^all$|; next if m|/all$|; next if m|^core$|; next if m|/core$|; next if m|^toto|; next if m|/toto|; next if m|^\.|; next if m|/\.|; next if m|\.o$|; next if m|\.old$|; next if m|\.orig$|; next if m|~$|; next if $mani{$_ . ".SH"}; next if m|(.*)\.c$| && $mani{$1 . ".y"}; next if m|(.*)\.c$| && $mani{$1 . ".l"}; next if (-x $_ && !m|^Configure$|); } print NEWER $_,"\n"; } close FIND; close NEWER; print "Please remove unwanted files...\n"; sleep(2); system '${EDITOR-vi} .newer'; die "Aborted.\n" unless -s '.newer' > 1; @ARGV = split(' ',`cat .newer`); } dist_3.5-36.001/pl/editor.pl0000644000175000017500000000134410473316164015652 0ustar srivastasrivasta;# $Id: editor.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: editor.pl,v $ ;# Revision 3.0.1.1 1993/08/25 14:08:07 ram ;# patch6: created ;# # Compute suitable editor name sub geteditor { local($editor) = $ENV{'VISUAL'}; $editor = $ENV{'EDITOR'} unless $editor; $editor = $defeditor unless $editor; $editor = 'vi' unless $editor; $editor; } dist_3.5-36.001/pl/users.pl0000644000175000017500000000326510473316164015531 0ustar srivastasrivasta;# $Id: users.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# Original Author: Graham Stoney ;# ;# $Log: users.pl,v $ ;# Revision 3.0.1.2 1993/11/10 17:41:37 ram ;# patch14: adapted users file format to new @SH package command ;# ;# Revision 3.0.1.1 1993/08/24 12:23:19 ram ;# patch3: added some comments about the users file format ;# patch3: random cleanup ;# ;# Revision 3.0 1993/08/18 12:11:02 ram ;# Baseline for dist 3.0 netwide release. ;# ;# The users file, as built by mailagent upon reception of an '@SH package' ;# command contains a list of e-mail addresses, prefixed by a single letter. ;# Users tagged with 'U' or 'L' are plain users, those with 'M' wish to ;# receive issued patches by e-mail while 'N' users simply want to be notified ;# when a new patch is released; ;# sub readusers { return unless open(USERS, 'users'); local($_); local($status, $name, $pl); while () { next if /^#/; chop if /\n$/; # Emacs may leave final line without \n ($status, $pl, $name) = split; # Handle oldstyle two-field user file format (PL13 and before) $name = $pl unless defined $name; if ($status eq 'M') { $recipients = $recipients ? "$recipients $name" : $name; } elsif ($status eq 'N') { $notify = $notify ? "$notify $name" : $name; } } close USERS; } dist_3.5-36.001/pl/fullname.pl0000644000175000017500000000235210473316164016167 0ustar srivastasrivasta;# $Id: fullname.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: fullname.pl,v $ ;# Revision 3.0 1993/08/18 12:10:52 ram ;# Baseline for dist 3.0 netwide release. ;# ;# sub getfullname { local($logname) = @_; local($foo,$bar); if ($ENV{'NAME'}) { $ENV{'NAME'}; } else { open(PASSWD,'/etc/passwd') || die "Can't open /etc/passwd"; while () { /(\w+):/; last if $1 eq $logname; } close PASSWD; local($login,$passwd,$uid,$gid,$gcos,$home,$shell) = split(/:/); if (-f "$home/.fullname") { open(FN,"$home/.fullname"); chop($foo = ); close FN; $foo; } elsif ($nametype eq 'bsd') { $gcos =~ s/[,;].*//; if ($gcos =~ /&/) { # oh crud ($foo,$bar) = ($logname =~ /(.)(.*)/); $foo =~ y/a-z/A-Z/; $gcos =~ s/&/$foo$bar/; } $gcos; } else { $gcos =~ s/[(].*//; $gcos =~ s/.*-//; $gcos; } } } dist_3.5-36.001/pl/listedit.pl0000644000175000017500000000205010473316164016200 0ustar srivastasrivasta;# $Id: listedit.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: listedit.pl,v $ ;# Revision 3.0.1.2 1993/08/27 14:40:57 ram ;# patch7: forgot to unlink temporary file ;# ;# Revision 3.0.1.1 1993/08/25 14:08:12 ram ;# patch6: created ;# ;# Requires geteditor.pl ;# # Allow user to inplace-edit a list of items held in an array sub listedit { local(*list) = @_; local($tmp) = "/tmp/dist.$$"; local($editor) = &geteditor; open(TMP, ">$tmp") || die "Can't create $tmp: $!\n"; foreach $item (@list) { print TMP $item, "\n"; } close TMP; system "$editor $tmp"; open(TMP, "$tmp") || die "Can't reopen $tmp: $!\n"; chop(@list = ); close TMP; unlink $tmp; } dist_3.5-36.001/pl/patseq.pl0000644000175000017500000000160610473316164015662 0ustar srivastasrivasta;# $Id: patseq.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: patseq.pl,v $ ;# Revision 3.0.1.1 1993/08/24 12:22:14 ram ;# patch3: created ;# ;# # Compute patch sequence by scanning the bugs directory and looking for # .logs and/or .mods files to determine what was the last issued patch series. sub patseq { local($cur) = @_; # Current patch level local(@seq); # Issued patch sequence local($i); for ($i = 1; $i <= $cur; $i++) { push(@seq, $i) if -f "bugs/.logs$i" || -f "bugs/.mods$i"; } @seq; } dist_3.5-36.001/pl/copyright.pl0000644000175000017500000000414610473316164016377 0ustar srivastasrivasta;# $Id: copyright.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: copyright.pl,v $ ;# Revision 3.0 1993/08/18 12:10:51 ram ;# Baseline for dist 3.0 netwide release. ;# ;# ;# Copyright expansion. The @COPYRIGHT@ symbol is expanded the first time ;# it is seen in a file, and before the $Log RCS marker is reached. The ;# automaton needs to be reset for each file. ;# package copyright; # Read in copyright file sub init { local($file) = @_; # Copyright file undef @copyright; open(COPYRIGHT, $file) || die "Can't open $file: $!\n"; chop(@copyright = ); close COPYRIGHT; } # Reset the automaton for a new file. sub reset { $copyright_seen = @copyright ? 0 : 1; $marker_seen = 0; } # Filter file, line by line, and expand the copyright string. The @COPYRIGHT@ # symbol may be preceded by some random comment. A leader can be defined and # will be pre-pended to all the input lines. sub filter { local($line, $leader) = @_; # Leader is optional return $leader . $line if $copyright_seen || $marker_seen; $marker_seen = 1 if $line =~ /\$Log[:\$]/; $copyright_seen = 1 if $line =~ /\@COPYRIGHT\@/; return $leader . $line unless $copyright_seen; local($comment, $trailer) = $line =~ /^(.*)\@COPYRIGHT\@\s*(.*)/; $comment = $leader . $comment; $comment . join("\n$comment", @copyright) . "\n"; } # Filter output of $cmd redirected into $file by expanding copyright, if any. sub expand { local($cmd, $file) = @_; if (@copyright) { open(CMD,"$cmd|") || die "Can't start '$cmd': $!\n"; open(OUT, ">$file") || die "Can't create $file: $!\n"; &reset; local($_); while () { print OUT &filter($_); } close OUT; close CMD; } else { system "$cmd > $file"; die "Command '$cmd' failed!" if $?; } } package main; dist_3.5-36.001/pl/package.pl0000644000175000017500000000202510473316164015754 0ustar srivastasrivasta;# $Id: package.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: package.pl,v $ ;# Revision 3.0 1993/08/18 12:10:57 ram ;# Baseline for dist 3.0 netwide release. ;# ;# sub readpackage { if (! -f '.package') { if ( -f '../.package' || -f '../../.package' || -f '../../../.package' || -f '../../../../.package' ) { die "Run in top level directory only.\n"; } else { die "No .package file! Run packinit.\n"; } } open(PACKAGE,'.package'); while () { next if /^:/; next if /^#/; if (($var,$val) = /^\s*(\w+)=(.*)/) { $val = "\"$val\"" unless $val =~ /^['"]/; eval "\$$var = $val;"; } } close PACKAGE; } dist_3.5-36.001/pl/comment.pl0000644000175000017500000000243210473316164016025 0ustar srivastasrivasta;# $Id: comment.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: comment.pl,v $ ;# Revision 3.0 1993/08/18 12:10:50 ram ;# Baseline for dist 3.0 netwide release. ;# ;# sub rcscomment { local($file) = @_; local($comment) = ''; open(FILE,$file); while () { if (/^(.*)\$Log[:\$]/) { # They know better than us (hopefully) $comment = $1; last; } } close FILE; unless ($comment) { if ($file =~ /\.SH$|[Mm]akefile/) { # Makefile template $comment = '# '; } elsif ($file =~ /\.U$/) { # Metaconfig unit $comment = '?RCS: '; } elsif ($file =~ /\.man$/) { # Manual page $comment = "''' "; } elsif ($file =~ /\.\d\w?$/) { # Manual page $comment = "''' "; } elsif ($file =~ /\.[chyl]$/) { # C source $comment = " * "; } elsif ($file =~ /\.e$/) { # Eiffel source $comment = "-- "; } elsif ($file =~ /\.pl$/) { # Perl library $comment = ";# "; } } $comment; } dist_3.5-36.001/pl/rangeargs.pl0000644000175000017500000000224610473316164016337 0ustar srivastasrivasta;# $Id: rangeargs.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: rangeargs.pl,v $ ;# Revision 3.0 1993/08/18 12:10:58 ram ;# Baseline for dist 3.0 netwide release. ;# ;# sub rangeargs { local($result) = ''; local($min,$max,$_); open(PL,"patchlevel.h") || die "Can't open patchlevel.h\n"; while () { $maxspec = $1 if /^#define\s+PATCHLEVEL\s+(\d+)/; } close PL; die "Malformed patchlevel.h file.\n" if $maxspec eq ''; while ($#_ >= 0) { $_ = shift(@_); while (/^\s*\d/) { s/^\s*(\d+)//; $min = $1; if (s/^,//) { $max = $min; } elsif (s/^-(\d*)//) { $max = $1; if ($max == 0 && $maxspec) { $max = $maxspec; } s/^[^,],?//; } else { $max = $min; } for ($i = $min; $i <= $max; ++$i) { $result .= $i . ' '; } } } $result; } dist_3.5-36.001/pl/logname.pl0000644000175000017500000000136610473316164016012 0ustar srivastasrivasta;# $Id: logname.pl 1 2006-08-24 12:32:52Z rmanfredi $ ;# ;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ;# ;# You may redistribute only under the terms of the Artistic Licence, ;# as specified in the README file that comes with the distribution. ;# You may reuse parts of this distribution only within the terms of ;# that same Artistic Licence; a copy of which may be found at the root ;# of the source tree for dist 4.0. ;# ;# $Log: logname.pl,v $ ;# Revision 3.0 1993/08/18 12:10:53 ram ;# Baseline for dist 3.0 netwide release. ;# ;# sub getlogname { local($logname) = $ENV{'USER'}; $logname = $ENV{'LOGNAME'} unless $logname; chop($logname = `who am i`) unless $logname; $logname =~ s/\s.*//; $logname =~ s/.*!//; $logname; } dist_3.5-36.001/README0000644000175000017500000001350710473367123014301 0ustar srivastasrivasta dist 4.0 ** Alpha version ** Copyright (c) 1988, Larry Wall Copyright (c) 1990-1992, Harlan Stenn Copyright (c) 1991-1997, Raphael Manfredi Copyright (c) 2004-2006, Raphael Manfredi ------------------------------------------------------------------------ This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, a copy of which can be found with this package. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Artistic License for more details. ------------------------------------------------------------------------ This version of dist requires you to have at least perl 4.0 PL36. It has also been ported to work with perl 5.0 PL0, provided you have at least integrated patches 0a-0h, issued by Andy Dougherty and made available at the following ftp sites: ftp.demon.co.uk:/pub/perl/db/perl5.000-p0a-p0h.tar.gz ftp.funet.fi:/pub/languages/perl/ports/perl5/perl5.000-p0a-p0h.tar.gz Please read all the directions below before you proceed any further, and then follow them carefully. After you have unpacked your kit, you should have all the files listed in MANIFEST. ======================================================================== It's not the way I wrote it, but the way you play it makes it sound a lot better. -- Camille Saint-Saens (French composer) The dist package consists of four parts: 1) The Configure generator (metaconfig) and its supporting files. 2) The distribution kit maker (makedist) and its supporting files. 3) The patch distribution system (pat*) and its supporting files. 4) The Makefile generator (jmake) and its supporting files. Each of these can be used separately from the others. Before you can use any of those, however, the directory containing your package (not this package) must be initialized by putting a .package file into it. This can be done by running packinit in that directory. There is a mailing list hosted in Japan and set up by Shigeya Suzuki , for discussion about the dist package as a whole. It's a good place to ask questions (or answer them) and to send your patches. I will post official patches to the net, as well as to the dist-users list. To send a mail to the list, address it to . To subscribe, send a mail to . If you don't know how to use majordomo, the syntax of the subscribe command is: subscribe dist-users [address] where the address part is optional. You may unsubscribe automatically at any time by sending: unsubscribe dist-users If you have a problem with this version of dist, it is recommended that you subscribe to the list, then send a description of your problem to it. If you send mail to me personally, I may not be able to answer in a timely fashion. This mailing list has low traffic (a few articles per week, typically), and it is expected to remain so, with a high signal/noise ratio. Notes: If you are running on a system with <= 14 char filenames, don't distribute any files with filenames longer than 12 chars (with the exception of patchlevel.h), so that there will be room for a 2-digit extension indicating patch number in your bugs direcory. This includes .SH files, so any shell script built by a .SH file should be 9 characters or less. On systems with flexfilenames you don't have to worry about it. This package has been designed on top of dist 2.0, which has been written by Larry Wall . ======================================================================== INSTALLATION 1) Run Configure. This will figure out various things about your system. After it has completed, it will produce config.h and config.sh. You might possibly have to trim # comments from the front of Configure if your shell doesn't handle them, but all other comments will be taken care of. 2) Run make. 3) If make succeeded, you may wish to do "make install install.man". Be sure your rights are correct (if you install manual pages, you may need super-user privileges). By not running "make install.man", you avoid the installation of the manual pages. 4) Read the manual entry before running. 5) IMPORTANT! Communicate any problem and suggested patches to me, ram@hptnos02.grenoble.hp.com (Raphael Manfredi), so we can keep this distribution in sync. If you have a problem, there will be someone else who had it or will have it too... If possible, send me patches such that the patch program will apply them. Context diffs are the best, then normal diffs. Do not send ed scripts, I have probably changed my copy since the version you got. 6) After everything is installed, you can do make clobber. This will clean up everything and let you re-distribute this kit, without carrying useless files. You should keep this distribution intact, so that future patches will be applyable. 7) I have an automatic patch sender. Send me the following mail: Subject: Command @SH mailhelp PATH and you'll get instructions (PATH stands for YOUR e-mail address, either in INTERNET or in bang notation). I would recommend you to get all the issued patches before you start making some modifications on this package. 8) If you wish to deinstall the package, you may run "make deinstall". A separate "make deinstall.man" will remove the manual pages. Be sure the makefiles are correctly set before running any deinstall target. On USG systems, some executable have a chance to remain despite the deinstall (text file busy...). Raphael Manfredi dist_3.5-36.001/mcon/0002755000175000017500000000000012645366701014355 5ustar srivastasrivastadist_3.5-36.001/mcon/NOTES0000644000175000017500000001463710473316164015174 0ustar srivastasrivastaThis file shortly documents the built-in interpreter and other new features from metaconfig. The notion of "conditional unit" has been added. In the ?MAKE: line, each unit whose name begins with a "+" will not be loaded in the Configure script unless its exact value is a mandatory. The default value specified in ?DEF: will be used instead. If no ?DEF: line is found, then the symbol is initialized with a null default value. In the config.h.SH file, only the necessary symbols are loaded. Note that the format in ?H: line has changed. It is no longer necessary to write ?H:?%1: to get a line included in config.h. First of all, the %1 symbol is not defined any more. Secondly, the unit's name is now %< and it does not matter whether the name appears first in the ?MAKE: line or not. Lastly, metaconfig can guess for itself whether to include a symbol or not. Sometimes, it is necessary to force a given value, because metaconfig is not smart enough to guess 100% of the time. See voidflags.U for an example (look at the ?C: and ?H: lines and read the comments). The Myread.U unit changed. It is now able to do variable substitutions, and it sets the prompt correctly if there is no supplied default. Thus, instead of the old: dflt=y rp="Question? [$dflt]" $echo $n "$rp $c" . myread you must now write: dflt=y rp='Question?' . myread and 'myread' will take care of echoing the question with the default put in square brakets. Likewise, question asking for filenames or pathnames may now use the Getfile.U unit to take care of all the burden. The presetting is the same as for myread and the answer is finally held in $ans. But the variable $fn must be set to indicate the type of file and enable/disable some of the sanity checks. See leading comments in Getfile.U. Here is a simple example to locate the active file: dflt='~news/lib' fn='l~:active' rp='Where is the active file?' . getfile active="$ans" The user may answer the question by using ~substitution and giving only the directory where the active file is located (in which case getfile will try to locate a file named 'active' in that directory). A full path may also be given of course, if the basename of the file is not 'active'. The units are now filtered by a built-in interpreter before getting loaded in Configure. That way, a Configure script can be more or less tuned. See d_gethname.U for a complex example. All the interpreter commands start with a leading '@'. Possible commands include: o if/elsif/else/end is the traditional conditional construct. o define tells metaconfig the is to be defined. Expressions in conditional constructs can include the &&, || and ! operator with same meaning as in the shell. Backslash at the end of a line stands for the continuation character. All the symbols in the expression stands for themselves, and their value is true if they are defined/wanted and false otherwise. It is possible to include shell and perl test. All the text enclosed in single brackets as {} is expanded in a shell as if >/dev/null 2>&1; then exit 0; else exit 1; fi whereas text in double brackets as {{}} is expanded in perl as if ( {exit 0;} else {exit 1;} and the exit status is used in the standard way to get a boolean value (i.e 0 is true and everything else is false). See Oldconfig.U for an example. Metaconfig's interpreter has standard C operator priority, but you may force the evaluation order with parenthesis. A simple error recovery attempt is made, so that you should get meaningful error messages. The simple test ?sym: means "keep the remaining of the line iff the symbol is defined" and %sym: is the same for non-definedness. Some special symbols may be put in a unit and will get expanded, provided the ?MAKE: command line is 'wipe' and not 'add'. Here are the available symbols: is the name $package as found in .package is the $maintloc variable as found in .pakcage is metaconfig's version number is metaconfig's patchlevel is the current frozen date as given by `date` A 'wipe'ed unit is passed through the interpreter too. It is also possible to declare a symbol obsolete. A warning message will be issued if the symbol is used and the Glossary mentions it. the "Obsolete" clause. The syntax is: ?C:symbol (obsolete list): ?S:symbol (obsolete list): If metaconfig is used with the -o option, it will generate code to remap those old symbols to the new ones, so the old code does not have to be changed right away. If you do not use -o, the Obsolete file will still be generated to warn you about obsolete symbols but no maping will be done. The new ?W: line can be use to tie up the destiny of some symbols. The syntax is: ?W:shell symbols list:C symbol list and the symbols in the shell list will be defined if one of the C symbols is. For instance, unit d_const.U uses the following: ?W:%<:const so that any 'const' usage in the C code will have %< (the unit name) handled as a wanted symbol. In particular, this has the interesting side effect of loading the unit into Configure when the 'const' keyword is used. This shell symbol list part may be left empty. For example unit i_time.U uses: ?W::timezone for its side effect: the symbol 'timezone' may now be part of the interpreter tests to conditionally load some code into Configure when struct timezone is used. C symbol aliasing can be used to let metaconfig know that the symbol comment is to be loaded in config_h.SH even when the main symbol is not used in C. For instance, d_const.U writes: ?C:HASCONST ~ %<: so that the HASCONST hype is loaded iff the unit (%<) is wanted. This is why the ?H: lines are also explicitely tied to the wanted-ness of the d_const symbol, by writing: ?H:?%<:#$d_const HASCONST /**/ ?H:?%<:#ifndef HASCONST ?H:?%<:#define const ?H:?%<:#endif ?H:. because we want all those lines to appear in config_h.SH as soon as the d_const unit is loaded into Configure. Because of the new -s (silent) option of Configure, the important messages which are to appear even in silent mode must be written on file descriptor #4. Others will simply not be echoed under -s. Note that all the questions and default answers are written on #4. You should write: echo " " echo "Checking to see if......" >&4 ..... echo "Yes, it does" which will have the traditional behaviour unless -s is used, in which case only the line Checking to see if..... will echo on the terminal. dist_3.5-36.001/mcon/Makefile.SH0000755000175000017500000002526312323773422016332 0ustar srivastasrivasta: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-174] : $X-Id: Jmake.tmpl 156 2012-12-19 16:44:39Z rmanfredi $ case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac CURRENT=mcon DIR=`echo $CURRENT/ | sed -e 's/\.\///g'` echo "Extracting ${DIR}Makefile (with variable substitutions)" INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'` INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'` DATE=`date` $spitshell >Makefile <>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files # $X-Id: Jmake.rules 174 2014-04-05 08:19:48Z rmanfredi $ ######################################################################## # Start of Jmakefile # $X-Id: Jmakefile 177 2014-04-08 10:42:18Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # $X-Log: Jmakefile,v $ # Revision 3.0.1.4 1995/07/25 13:23:09 ram # patch56: installs the GNU configure-like front-end to Configure # # Revision 3.0.1.3 1994/01/24 13:42:29 ram # patch16: added dependency generation stage # # Revision 3.0.1.2 1993/11/02 10:40:01 ram # patch14: now invokes perload explicitely via perl executable # # Revision 3.0.1.1 1993/08/25 08:46:44 ram # patch6: split unit installation to avoid shell command line overflow # # Revision 3.0 1993/08/18 12:04:40 ram # Baseline for dist 3.0 netwide release. # all:: Glossary local_realclean:: $(RM) Glossary .FORCE: Glossary: .FORCE chmod +x makegloss ./makegloss all:: makegloss local_realclean:: $(RM) makegloss makegloss: makegloss.SH /bin/sh makegloss.SH local_install:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for dir in $(PRIVLIB) $(PRIVLIB)/U; do \ (set -x; test -d $(INSTALL_PREFIX)$$dir || \ $(INSTALLDIR) $(INSTALL_PREFIX)$$dir); \ done local_deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for dir in $(PRIVLIB) $(PRIVLIB)/U; do \ (set -x; test -d $$dir && $(RM) -r $(INSTALL_PREFIX)$$dir); \ done local_install:: Glossary @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)); \ $(INSTALL) -c -m 444 Glossary $(INSTALL_PREFIX)$(PRIVLIB) local_deinstall:: $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/Glossary local_install:: makegloss @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)); \ $(INSTALL) -c -m 555 makegloss $(INSTALL_PREFIX)$(PRIVLIB) local_deinstall:: $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/makegloss local_install:: configure @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)); \ $(INSTALL) -c -m 555 configure $(INSTALL_PREFIX)$(PRIVLIB) local_deinstall:: $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/configure local_install:: U/[a-d]*.U @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/U || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/U); \ for i in U/[a-d]*.U; do \ (set -x; $(INSTALL) -c -m 444 \ $$i $(INSTALL_PREFIX)$(PRIVLIB)/U) || exit 1;\ done local_deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for i in U/[a-d]*.U; do \ (set -x; $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/U/$$i); \ done local_install:: U/[A-Ze-z]*.U @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(PRIVLIB)/U || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(PRIVLIB)/U); \ for i in U/[A-Ze-z]*.U; do \ (set -x; $(INSTALL) -c -m 444 \ $$i $(INSTALL_PREFIX)$(PRIVLIB)/U) || exit 1;\ done local_deinstall:: @case '${MFLAGS}' in *[i]*) set +e;; esac; \ for i in U/[A-Ze-z]*.U; do \ (set -x; $(RM) $(INSTALL_PREFIX)$(PRIVLIB)/U/$$i); \ done all:: metaconfig mconfig local_realclean:: $(RM) metaconfig mconfig all:: mconfig local_realclean:: $(RM) mconfig mconfig: mconfig.SH /bin/sh mconfig.SH metaconfig: mconfig perl $(TOP)/bin/perload -o mconfig > $@ chmod +rx $@ local_install:: metaconfig @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \ $(INSTALL) -c -m 555 metaconfig $(INSTALL_PREFIX)$(SCRIPTDIR) local_deinstall:: $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/metaconfig all:: metalint mlint local_realclean:: $(RM) metalint mlint all:: mlint local_realclean:: $(RM) mlint mlint: mlint.SH /bin/sh mlint.SH metalint: mlint perl $(TOP)/bin/perload -o mlint > $@ chmod +rx $@ local_install:: metalint @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \ $(INSTALL) -c -m 555 metalint $(INSTALL_PREFIX)$(SCRIPTDIR) local_deinstall:: $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/metalint all:: metaxref mxref local_realclean:: $(RM) metaxref mxref all:: mxref local_realclean:: $(RM) mxref mxref: mxref.SH /bin/sh mxref.SH metaxref: mxref perl $(TOP)/bin/perload -o mxref > $@ chmod +rx $@ local_install:: metaxref @case '${MFLAGS}' in *[i]*) set +e;; esac; \ (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \ $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \ $(INSTALL) -c -m 555 metaxref $(INSTALL_PREFIX)$(SCRIPTDIR) local_deinstall:: $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/metaxref BINFILES = \ mconfig \ mlint \ mxref BINSH = \ mconfig.SH \ mlint.SH \ mxref.SH depend:: local_depend local_depend:: ($(SED) '/^# DO NOT DELETE/q' Makefile && \ grep '^\$$grep' $(BINSH) | \ $(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \ ) > Makefile.new cp Makefile Makefile.bak cp Makefile.new Makefile $(RM) Makefile.new mconfig mlint mxref: $(TOP)/revision.h ######################################################################## # Common rules for all Makefiles -- do not edit all:: clean: sub_clean local_clean realclean: sub_realclean local_realclean clobber: sub_clobber local_clobber local_clean:: if test -f core; then $(RM) core; fi $(RM) *~ *.o local_realclean:: local_clean local_clobber:: local_realclean $(RM) Makefile config.sh install:: local_install sub_install @exit 0 install.man:: maybe_install.man sub_install.man deinstall:: sub_deinstall local_deinstall deinstall.man:: sub_deinstall.man maybe_deinstall.man install.man-no: deinstall.man-no: maybe_install.man: install.man-no maybe_deinstall.man: deinstall.man-no Makefile.SH: Jmakefile -@if test -f $(TOP)/.package; then \ if test -f Makefile.SH; then \ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ fi; \ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ else touch $@; fi Makefile: Makefile.SH /bin/sh Makefile.SH tags:: $(CTAGS) -w *.[ch] $(CTAGS) -xw *.[ch] > tags local_clobber:: $(RM) tags depend:: ######################################################################## # Rules for building in sub-directories -- do not edit subdirs: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \ done sub_install:: @$(MAKE) subdirs TARGET=install VERB="Installing" FLAGS= sub_deinstall:: @$(MAKE) subdirs TARGET=deinstall VERB="Deinstalling" FLAGS= @echo "Back to $(CURRENT) for "deinstall... sub_install.man:: @$(MAKE) subdirs TARGET=install.man VERB="Installing man pages" FLAGS= sub_deinstall.man:: @$(MAKE) subdirs TARGET=deinstall.man VERB="Deinstalling man pages" FLAGS= @echo "Back to $(CURRENT) for "deinstall.man... sub_clean:: @$(MAKE) subdirs TARGET=clean VERB="Cleaning" FLAGS= @echo "Back to $(CURRENT) for "clean... sub_realclean:: @$(MAKE) subdirs TARGET=realclean VERB="Real cleaning" FLAGS= @echo "Back to $(CURRENT) for "realclean... sub_clobber:: @$(MAKE) subdirs TARGET=clobber VERB="Clobbering" FLAGS= @echo "Back to $(CURRENT) for "clobber... tag:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \ $(MAKE) $(MFLAGS) tag) || exit 1; \ done Makefiles:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS);\ do \ echo "Making "Makefiles" in $(DIR)$$i..."; \ (cd $$i || exit 1; \ if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \ $(MAKE) $(MFLAGS) Makefiles) || exit 1;\ done Makefiles.SH:: Makefile.SH @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS);\ do \ case "$(DIR)$$i/" in \ */*/*/*/) newtop=../../../..;; \ */*/*/) newtop=../../..;; \ */*/) newtop=../..;; \ */) newtop=..;; \ esac; \ case "$(TOP)" in \ /*) newtop="$(TOP)" ;; \ esac; \ echo "Making Makefiles.SH in $(DIR)$$i..."; \ (cd $$i || exit 1; \ if test -f Jmakefile; then \ $(MAKE) $(MFLAGS) -f ../Makefile \ Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \ $(MAKE) $(MFLAGS) Makefiles.SH; \ fi; \ ) || exit 1; \ done all:: @$(MAKE) subdirs TARGET=all VERB="Making all" FLAGS= local_install:: local_deinstall:: local_install.man:: local_deinstall.man:: ######################################################################## # Dependencies generated by make depend # DO NOT DELETE THIS LINE -- make depend relies on it # Put nothing here or make depend will gobble it up .FORCE_DEPEND:: @echo "You must run 'make depend' in $(TOP) first."; exit 1 !NO!SUBS! chmod 644 Makefile $eunicefix Makefile dist_3.5-36.001/mcon/mconfig.SH0000755000175000017500000001354511710770661016240 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac REVISION=`grep REVISION $TOP/revision.h | head -n1 | cut -d' ' -f4` case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting mcon/mconfig (with variable substitutions)" cat >mconfig < # Key Contributor: Harlan Stenn # # $Log: mconfig.SH,v $ # Revision 3.0.1.5 1995/07/25 14:19:05 ram # patch56: new -G option # # Revision 3.0.1.4 1994/06/20 07:11:04 ram # patch30: new -L option to override public library path for testing # # Revision 3.0.1.3 1994/01/24 14:20:53 ram # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.2 1993/10/16 13:53:10 ram # patch12: new -M option for magic symbols and confmagic.h production # # Revision 3.0.1.1 1993/08/19 06:42:26 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:17 ram # Baseline for dist 3.0 netwide release. # # Perload ON \$MC = '$privlib'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; \$revision = '$REVISION'; \$grep = '$grep'; !GROK!THIS! $spitshell >>mconfig <<'!NO!SUBS!' chop($date = `date`); &profile; # Read ~/.dist_profile use Getopt::Std; &usage unless getopts("dhkmostvwGMVL:"); $MC = $opt_L if $opt_L; # May override public library path $MC = &tilda_expand($MC); # ~name expansion chop($WD = `pwd`); # Working directory chdir $MC || die "Can't chdir to $MC: $!\n"; chop($MC = `pwd`); # Real metaconfig lib path (no symbolic links) chdir $WD || die "Can't chdir back to $WD: $!\n"; ++$opt_k if $opt_d; ++$opt_M if -f 'confmagic.h'; # Force -M if confmagic.h already there if ($opt_V) { print STDERR "metaconfig $version-$revision\n"; exit 0; } elsif ($opt_h) { &usage; } unlink 'Wanted' unless $opt_w; # Wanted rebuilt if no -w unlink 'Obsolete' unless $opt_w; # Obsolete file rebuilt if no -w &readpackage; # Merely get the package's name &init; # Various initializations `mkdir .MT 2>&1` unless -d '.MT'; # For private temporary files &locate_units; # Fill in @ARGV with a unit list &extract_dependencies; # Extract dependencies from units &extract_filenames; # Extract files to be scanned for &build_wanted; # Build a list of wanted symbols in file Wanted &build_makefile; # To do the transitive closure of dependencies &solve_dependencies; # Now run the makefile to close dependency graph &create_configure; # Create the Configure script and related files &cosmetic_update; # Update the manifests if ($opt_k) { print "Leaving subdirectory .MT unremoved so you can peruse it.\n" unless $opt_s; } else { `rm -rf .MT 2>&1`; } print "Done.\n" unless $opt_s; # General initializations sub init { &init_except; # Token which have upper-cased letters &init_keep; # The keep status for built-in interpreter &init_priority; # Priorities for diadic operators &init_constants; # Define global constants &init_depend; # The %Depend array records control line handling } sub init_constants { $NEWMANI = 'MANIFEST.new'; # List of files to be scanned $MANI = 'MANIFEST'; # For manifake # The distinction between MANIFEST.new and MANIFEST can make sense # when the "pat" tools are used, but if only metaconfig is used, then # we can very well leave without a MANIFEST.new. --RAM, 2006-08-25 $NEWMANI = $MANI if -f $MANI && ! -f $NEWMANI; } # Record the exceptions -- almost all symbols but these are lower case # We also use three symbols from Unix.U for default file suffixes. sub init_except { $Except{'Author'}++; $Except{'Date'}++; $Except{'Header'}++; $Except{'Id'}++; $Except{'Locker'}++; $Except{'Log'}++; $Except{'RCSfile'}++; $Except{'Revision'}++; $Except{'Source'}++; $Except{'State'}++; $Except{'_a'}++; $Except{'_o'}++; $Except{'_exe'}++; } # Print out metaconfig's usage and exits sub usage { print STDERR <<'EOH'; Usage: metaconfig [-dhkmostvwGMV] [-L dir] -d : debug mode. -h : print this help message and exits. -k : keep temporary directory. -m : assume lots of memory and swap space. -o : maps obsolete symbols on new ones. -s : silent mode. -t : trace symbols as they are found. -v : verbose mode. -w : trust Wanted file as being up-to-date. -G : also provide a GNU configure-like front end. -L : specify main units repository. -M : activate production of confmagic.h. -V : print version number and exits. EOH exit 1; } !NO!SUBS! $grep -v '^;#' pl/locate.pl >>mconfig $grep -v '^;#' pl/common.pl >>mconfig $grep -v '^;#' pl/depend.pl >>mconfig $grep -v '^;#' pl/init.pl >>mconfig $grep -v '^;#' pl/extract.pl >>mconfig $grep -v '^;#' pl/files.pl >>mconfig $grep -v '^;#' pl/wanted.pl >>mconfig $grep -v '^;#' pl/obsolete.pl >>mconfig $grep -v '^;#' pl/makefile.pl >>mconfig $grep -v '^;#' pl/order.pl >>mconfig $grep -v '^;#' pl/configure.pl >>mconfig $grep -v '^;#' pl/cosmetic.pl >>mconfig $grep -v '^;#' pl/eval.pl >>mconfig $grep -v '^;#' ../pl/package.pl >>mconfig $grep -v '^;#' ../pl/manifake.pl >>mconfig $grep -v '^;#' ../pl/tilde.pl >>mconfig $grep -v '^;#' ../pl/profile.pl >>mconfig chmod +x mconfig $eunicefix mconfig dist_3.5-36.001/mcon/mlint.SH0000755000175000017500000000732211710770661015735 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac REVISION=`grep REVISION $TOP/revision.h | head -n1 | cut -d' ' -f4` case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting mcon/mlint (with variable substitutions)" cat >mlint < # # $Log: mlint.SH,v $ # Revision 3.0.1.3 1994/05/06 15:20:42 ram # patch23: added -L switch to override public unit repository path # # Revision 3.0.1.2 1994/01/24 14:21:00 ram # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.1 1993/08/19 06:42:27 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:17 ram # Baseline for dist 3.0 netwide release. # # Perload ON \$MC = '$privlib'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; \$revision = '$REVISION'; \$grep = '$grep'; !GROK!THIS! $spitshell >>mlint <<'!NO!SUBS!' &profile; # Read ~/.dist_profile use Getopt::Std; &usage unless getopts("hklVL:"); if ($opt_V) { print STDERR "metalint $version-$revision\n"; exit 0; } elsif ($opt_h) { &usage; } chop($date = `date`); $MC = $opt_L if $opt_L; # May override library path $MC = &tilda_expand($MC); # ~name expansion chop($WD = `pwd`); # Working directory chdir $MC || die "Can't chdir to $MC: $!\n"; chop($MC = `pwd`); # Real metalint lib path (no symbolic links) chdir $WD || die "Can't chdir back to $WD: $!\n"; &init; # Various initializations `mkdir .MT 2>&1` unless -d '.MT'; # For private temporary files &locate_units; # Fill in @ARGV with a unit list &extract_dependencies; # Extract dependencies from units &sanity_checks; # Perform sanity checks if ($opt_k) { print "Leaving subdirectory .MT unremoved so you can peruse it.\n" unless $opt_s; } else { `rm -rf .MT 2>&1`; } print "Done.\n" unless $opt_s; # General initializations sub init { &init_except; # Token which have upper-cased letters &init_depend; # The %Depend array records control line handling } # Record the exceptions -- all symbols but these are lower case sub init_except { $Except{'Author'}++; $Except{'Date'}++; $Except{'Header'}++; $Except{'Id'}++; $Except{'Locker'}++; $Except{'Log'}++; $Except{'RCSfile'}++; $Except{'Revision'}++; $Except{'Source'}++; $Except{'State'}++; } # Print out metalint's usage and exits sub usage { print STDERR <>mlint $grep -v '^;#' pl/lint.pl >>mlint $grep -v '^;#' pl/init.pl >>mlint $grep -v '^;#' pl/extract.pl >>mlint $grep -v '^;#' pl/obsolete.pl >>mlint $grep -v '^;#' pl/tsort.pl >>mlint $grep -v '^;#' ../pl/tilde.pl >>mlint $grep -v '^;#' ../pl/profile.pl >>mlint chmod +x mlint $eunicefix mlint dist_3.5-36.001/mcon/files/0002755000175000017500000000000012645366701015457 5ustar srivastasrivastadist_3.5-36.001/mcon/files/locate.U0000644000175000017500000000257710473316164017060 0ustar srivastasrivasta?RCS: $Id: locate.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: locate.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:08 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE: exp: Oldconfig Getfile ?MAKE: -pick add $@ %< ?S:: ?S: The name of the file. The name may have ~ on the front. ?S:. ?S:exp: ?S: This is the same as the variable, but is filename expanded ?S: so that later Configure units can look at the file if desired. ?S:. ?C:<%FILE>: ?C: The name of the file. The name may have ~ on the front so the ?C: program must be prepared to do filename expansion. ?C:. ?C:<%FILE>_EXP: ?C: The same as but ~name expansion has been done by Configure. ?C:. ?H:#define <%FILE> "$" /**/ ?H:#define <%FILE>_EXP "$exp" /**/ ?H:. : locate file echo " " case "$" in '') dflt= ;; *) dflt="$";; esac fn=l~: rp='Where is the file?' . getfile ="$ans" exp="$ansexp" dist_3.5-36.001/mcon/files/type.U0000644000175000017500000000274210473316164016564 0ustar srivastasrivasta?RCS: $Id: type.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: type.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:11 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:uidtype: Myread Oldconfig contains usrinc ?MAKE: -pick add $@ %< ?S:uidtype: ?S: This variable defines UIDTYPE to be something like uid_t, int, ?S: ushort, or whatever type is used to declare user ids in the kernel. ?S:. ?C:Uid_t (UIDTYPE): ?C: This symbol holds the type used to declare user ids in the kernel. ?C: It can be int, ushort, uid_t, etc... It may be necessary to include ?C: to get any typedef'ed information. ?C:. ?H:#define Uid_t $uidtype /* UID type */ ?H:. : see what type uids are declared as in the kernel case "$uidtype" in '') if $contains 'uid_t;' $usrinc/sys/types.h >/dev/null 2>&1 ; then dflt='uid_t'; else set `grep '_ruid;' $usrinc/sys/user.h 2>/dev/null` unsigned short case $1 in unsigned) dflt="$1 $2" ;; *) dflt="$1" ;; esac fi ;; *) dflt="$uidtype";; esac echo " " rp="What type are user ids on this system declared as?" . myread uidtype="$ans" dist_3.5-36.001/mcon/files/i_include.U0000644000175000017500000000207110473316164017531 0ustar srivastasrivasta?RCS: $Id: i_include.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: i_include.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:07 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:i_: Inhdr ?MAKE: -pick add $@ %< ?S:i_: ?S: This variable conditionally defines the I_<%INCLUDE> symbol, which ?S: indicates to the C program that <.h> exists and should ?S: be included. ?S:. ?C:I_<%INCLUDE>: ?C: This symbol, if defined, indicates that <.h> exists and should ?C: be included. ?C:. ?H:#$i_ I_<%INCLUDE> /**/ ?H:. ?LINT:set i_ : see if .h is available set .h i_ eval $inhdr dist_3.5-36.001/mcon/files/dir.U0000644000175000017500000000257410473316164016364 0ustar srivastasrivasta?RCS: $Id: dir.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: dir.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:06 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:

exp: Oldconfig Getfile ?MAKE: -pick add $@ %< ?S:: ?S: Where files are located. The name may have ~ on the front. ?S:. ?S:exp: ?S: This is the same as the variable, but is filename expanded ?S: so that later Configure units can look at the directory if desired. ?S:. ?C:<%DIR>: ?C: The directory where files are located. The name may have ~ on ?C: the front so the C program must be prepared to do ~ expansion. ?C:. ?C:<%DIR>_EXP: ?C: The same as , but ~name expantion has been done by Configure. ?C:. ?H:#define <%DIR> "$" /**/ ?H:#define <%DIR>_EXP "$exp" /**/ ?H:. : locate directory echo " " case "$" in '') dflt= ;; *) dflt="$";; esac fn=d~ rp='Where is the directory?' . getfile ="$ans" exp="$ansexp" dist_3.5-36.001/mcon/files/question.U0000644000175000017500000000351310473316164017447 0ustar srivastasrivasta?RCS: $Id: question.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: question.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:09 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_scorfl: cat Myread Oldconfig nametype Setvar ?MAKE: -pick add $@ %< ?S:d_scorfl: ?S: This variable conditionally defines the SCOREFULL symbol, which ?S: indicates to the C program that any scoreboard kept by the program ?S: should be kept on the basis of the user's full name as opposed to ?S: the user's login name. ?S:. ?C:SCOREFULL: ?C: This symbol, if defined, indicates that any scoreboard kept by the ?C: program should be kept on the basis of the user's full name as opposed ?C: to the user's login name. If the user can change his full name he ?C: can enter multiple scores if this is defined. ?C:. ?H:#$d_scorfl SCOREFULL /**/ ?H:. ?LINT:set d_scorfl : see how they want the scoreboard kept case "$d_scorfl" in "$define") dflt=y ;; *) dflt=n ;; esac case "$nametype" in other) val="$undef" ;; *) $cat <<'EOM' The scoreboard can be kept with one score per login name, or one score per full name. If users can change their full name, or if there is more than one person on your system with the same full name, you should keep the score by login name (the full name is still printed). EOM rp='Do you want the scoreboard kept by full name?' . myread case "$ans" in y*) val="$define" ;; *) val="$undef" ;; esac ;; esac set d_scorfl eval $setvar dist_3.5-36.001/mcon/files/shell.U0000644000175000017500000000366610473316164016720 0ustar srivastasrivasta?RCS: $Id: shell.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: shell.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:10 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:cc: cat contains sysman +large Mcc Myread Guess Oldconfig Loc ?MAKE: -pick add $@ %< ?DEF:cc=cc ?S:cc: ?S: This variable holds the name of a command to execute a C compiler which ?S: can resolve multiple global references that happen to have the same ?S: name. Usual values are "cc", "Mcc", "cc -M", and "gcc". ?S:. : see if we need a special compiler echo " " if usg; then case "$cc" in '') case "$Mcc" in /*) dflt='Mcc';; *) case "$large" in -M*) dflt='cc';; *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then dflt='cc' else dflt='cc -M' fi else dflt='cc' fi;; esac;; esac;; *) dflt="$cc";; esac $cat <<'EOM' On some systems the default C compiler will not resolve multiple global references that happen to have the same name. On some such systems the "Mcc" command may be used to force these to be resolved. On other systems a "cc -M" command is required. (Note that the -M flag on other systems indicates a memory model to use!) If you have the Gnu C compiler, you might wish to use that instead. EOM rp="What command will force resolution on this system?" . myread cc="$ans" else case "$cc" in '') dflt=cc;; *) dflt="$cc";; esac rp="Use which C compiler?" . myread cc="$ans" fi case "$cc" in gcc*) cpp=`loc gcc-cpp $cpp $pth`;; esac dist_3.5-36.001/mcon/files/d_function.U0000644000175000017500000000177710473316164017742 0ustar srivastasrivasta?RCS: $Id: d_function.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_function.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:05 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_: Inlibc ?MAKE: -pick add $@ %< ?S:d_: ?S: This variable conditionally defines HAS_<%FUNCTION> if () is ?S: available to ... ?S:. ?C:HAS_<%FUNCTION>: ?C: This symbol, if defined, indicates that the () routine is ?C: available to ... ?C:. ?H:#$d_ HAS_<%FUNCTION> /**/ ?H:. ?LINT:set d_ : see if exists set d_ eval $inlibc dist_3.5-36.001/mcon/files/file.U0000644000175000017500000000256410473316164016524 0ustar srivastasrivasta?RCS: $Id: file.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: file.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:06 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE: exp: Oldconfig Getfile ?MAKE: -pick add $@ %< ?S:: ?S: The name of the file. The name may have ~ on the front. ?S:. ?S:exp: ?S: This is the same as the variable, but is filename expanded ?S: so that later Configure units can look at the file if desired. ?S:. ?C:<%FILE>: ?C: The name of the file. The name may have ~ on the front so the ?C: program must be prepared to do filename expansion. ?C:. ?C:<%FILE>_EXP: ?C: The same as but ~name expansion has been done by Configure. ?C:. ?H:#define <%FILE> "$" /**/ ?H:#define <%FILE>_EXP "$exp" /**/ ?H:. : locate file echo " " case "$" in '') dflt= ;; *) dflt="$";; esac fn=f~ rp='Where is the file?' . getfile ="$ans" exp="$ansexp" dist_3.5-36.001/mcon/files/rcshead.U0000644000175000017500000000112410473316164017205 0ustar srivastasrivasta?RCS: $Id: rcshead.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: rcshead.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:10 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: dist_3.5-36.001/mcon/files/Internal.U0000644000175000017500000000126110473316164017352 0ustar srivastasrivasta?RCS: $Id: Internal.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Internal.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:04 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: This unit does this and that. ?X: ?MAKE:<^INTERNAL>: Myinit ?MAKE: -pick add $@ %< dist_3.5-36.001/mcon/files/keyword.U0000644000175000017500000000302010473316164017255 0ustar srivastasrivasta?RCS: $Id: keyword.U 1 2006-08-24 12:32:52Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: keyword.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:08 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_const: cat cc ccflags Setvar ?MAKE: -pick add $@ %< ?S:d_: ?S: This variable conditionally defines the HASCONST symbol, which ?S: indicates to the C program that this C compiler knows about the ?S: type. ?S:. ?C:HAS<%KEY> ~ %<: ?C: This symbol, if defined, indicates that this C compiler knows about ?C: the type. There is no need to actually test for that symbol ?C: within your programs. The mere use of the "" keyword will ?C: trigger the necessary tests. ?C:. ?H:?%<:#$d_ HAS<%KEY> /**/ ?H:?%<:#ifndef HAS<%KEY> ?H:?%<:#define ?H:?%<:#endif ?H:. ?W:%<: ?LINT:set d_ ?LINT:known : check for keyword echo " " echo 'Checking to see if your C compiler knows about ""...' $cat >.c <<'EOCP' main() { char *foo; } EOCP if $cc -c $ccflags .c >/dev/null 2>&1 ; then val="$define" echo "Yup, it does." else val="$undef" echo "Nope, it doesn't." fi set d_ eval $setvar dist_3.5-36.001/mcon/files/README0000644000175000017500000000027510473316164016334 0ustar srivastasrivastaThis directory contains unit templates. It is hoped metaconfig will have a tool to generate "standard" units based on some well-known templates. For now, it has a documentary-only value. dist_3.5-36.001/mcon/mxref.SH0000755000175000017500000001016611710770661015733 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac REVISION=`grep REVISION $TOP/revision.h | head -n1 | cut -d' ' -f4` case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting mcon/mxref (with variable substitutions)" cat >mxref < # # $Log: mxref.SH,v $ # Revision 3.0.1.3 1997/02/28 16:30:49 ram # patch61: new -L option to match metaconfig and metalint # # Revision 3.0.1.2 1994/01/24 14:21:04 ram # patch16: added ~/.dist_profile awareness # # Revision 3.0.1.1 1993/08/19 06:42:27 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:18 ram # Baseline for dist 3.0 netwide release. # # Perload ON \$MC = '$privlib'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; \$revision = '$REVISION'; \$grep = '$grep'; !GROK!THIS! $spitshell >>mxref <<'!NO!SUBS!' &profile; # Read ~/.dist_profile use Getopt::Std; &usage unless getopts("df:hkmsVL:"); chop($date = `date`); chop($WD = `pwd`); # Working directory $MC = $opt_L if $opt_L; # May override library path $MC = &tilda_expand($MC); # ~name expansion chdir $MC || die "Can't chdir to $MC: $!\n"; chop($MC = `pwd`); # Real metaxref lib path (no symbolic links) chdir $WD || die "Can't chdir back to $WD: $!\n"; if ($opt_V) { print STDERR "metaxref $version-$revision\n"; exit 0; } elsif ($opt_h) { &usage; } $NEWMANI = $opt_f || (-f 'MANIFEST.new' ? 'MANIFEST.new' : 'MANIFEST'); &init; # Various initializations `mkdir .MT 2>&1` unless -d '.MT'; # For private temporary files unlink 'Obsolete'; # Obsolete file rebuilt &locate_units; # Fill in @ARGV with a unit list &extract_dependencies; # Extract dependencies from units &extract_filenames; # Get source files from MANIFEST.new &build_xref; # Parse files, build I.* output if ($opt_k) { print "Leaving subdirectory .MT unremoved so you can peruse it.\n" unless $opt_s; } else { `rm -rf .MT 2>&1`; } print "Done.\n" unless $opt_s; # General initializations sub init { &init_except; # Token which have upper-cased letters &init_depend; # The %Depend array records control line handling } # Record the exceptions -- all symbols but these are lower case sub init_except { $Except{'Author'}++; $Except{'Date'}++; $Except{'Header'}++; $Except{'Id'}++; $Except{'Locker'}++; $Except{'Log'}++; $Except{'RCSfile'}++; $Except{'Revision'}++; $Except{'Source'}++; $Except{'State'}++; } # Print out metaxref's usage and exits sub usage { print STDERR <>mxref $grep -v '^;#' pl/common.pl >>mxref $grep -v '^;#' pl/xref.pl >>mxref $grep -v '^;#' pl/files.pl >>mxref $grep -v '^;#' pl/init.pl >>mxref $grep -v '^;#' pl/extract.pl >>mxref $grep -v '^;#' pl/obsolete.pl >>mxref $grep -v '^;#' pl/xwant.pl >>mxref $grep -v '^;#' pl/gensym.pl >>mxref $grep -v '^;#' ../pl/manifake.pl >>mxref $grep -v '^;#' ../pl/tilde.pl >>mxref $grep -v '^;#' ../pl/profile.pl >>mxref chmod +x mxref $eunicefix mxref dist_3.5-36.001/mcon/makegloss.SH0000755000175000017500000001406211017210567016570 0ustar srivastasrivastacase $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting mcon/makegloss (with variable substitutions)" $spitshell >makegloss <>makegloss <<'!NO!SUBS!' # $Id: makegloss.SH 22 2008-05-28 08:01:59Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # # You may redistribute only under the terms of the Artistic Licence, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of # that same Artistic Licence; a copy of which may be found at the root # of the source tree for dist 4.0. # # Original Author: Larry Wall # # $Log: makegloss.SH,v $ # Revision 3.0.1.3 1994/01/24 14:17:49 ram # patch16: now understands internal-use only defined variables # # Revision 3.0.1.2 1993/10/16 13:50:39 ram # patch12: updated to support new ?M: lines # # Revision 3.0.1.1 1993/08/19 06:42:21 ram # patch1: leading config.sh searching was not aborting properly # # Revision 3.0 1993/08/18 12:10:12 ram # Baseline for dist 3.0 netwide release. # open(G,">Glossary") || die "Can't create Glossary.\n"; print G '[This Glossary is automatically generated from the Unit files. Do not edit this file or your changes will be lost. Edit the appropriate Unit instead.] This file contains a listing of all the C preprocessor symbols and shell variables whose value can be determined by a Configure script. For the most part, any symbol in UPPERCASE is a C preprocessor symbol, and will be defined in config.h. Symbols in lowercase are shell variables, and are defined in config.sh. If you write your shell scripts and C programs in terms of these symbols, metaconfig can automatically build you a Configure script that will determine the value of those symbols. See the README file for a description of how to use metaconfig. In the following listing, the Unit: line indicates the name of the unit where this symbol is defined, and the Wants: line indicates what other symbols must be determined in order to figure out the value of this one. If there is an "(Also defines ...)" entry, it indicates what other symbols are defined by the Unit other than the one corresponding to the unit name. Variable of the form d_* either have the value "define" or "/*define", and control whether some C preprocessor symbol gets defined or not. '; @ARGV = ; while (<>) { if (/^\?[\w\-]+:/) { # We may have found a control line # Long lines may be escaped with a final backslash $_ .= &complete_line if s/\\\s*$//; } if (/^\?MAKE:.*:/) { ($also, $wants) = /^\?MAKE:\s*(.*):\s*(.*)/; ($unit = $ARGV) =~ s|.*/(.*)\.U$|$1|; @Also = split(/ /, $also); $also = ''; $internal = ''; foreach (@Also) { if (s/^\+//) { $internal .= "$_ "; } else { $also .= "$_ "; } } $also =~ s/$unit\s//; chop($also); chop($internal); @Wants = split(/ /, $wants); $wants = ''; $option = ''; foreach (@Wants) { if (s/^\+//) { $option .= "$_ "; } else { $wants .= "$_ "; } } chop($option); chop($wants); $head = ''; $_ = "Unit: $unit"; $_ .= " (Also defines $also)" if $also; $_ .= " (With private $internal)" if $internal; $head .= &format($_); if ($wants) { $_ = "Wants: $wants"; $head .= &format($_); } if ($option) { $_ = "Optional: $option"; $head .= &format($_); } $head .= "\n"; } # Example of expression matched by the following pattern: # ?C:symbol ~ alias (obsolete list): # The main symbol (optionally aliased) can be followed by a list of # obsolete symbols (the list is space separated). if (/^\?[CS]:(\w+)(\s*~\s*\S+)?\s*(\(.*\))?:\s*$/) { $sym = $1; $obsoleted = $3; push(@syms, $sym); $header{$sym} .= $head; if ($obsoleted =~ s/^\((.*)\)$/$1/) { @obsoleted = split(' ', $obsoleted); foreach $obs (@obsoleted) { push(@syms, $obs); $header{$obs} = "\tObsoleted by $sym.\n\n"; } } } elsif (s/^\?[CS]://) { # Must be inside definition if (/^\.$/) { # Closing line $def{$sym} .= "\n"; $sym = ''; } else { s/^(\t| ? ? ? ? ? ? ?)//; $def{$sym} .= "\t" . $_; } } elsif (/^\?M:(\w+):\s*([\w\s]*)\n$/) { # Magic mapping introduction $sym = $1; $cdep = $2; push(@syms, $sym); $cdep =~ s/^\s*//; $cdep = ", needs: $cdep" if $cdep ne ''; $header{$sym} = "\tMagic symbol$cdep\n" . $head; } elsif (s/^\?M://) { # Must be a magic mapping definition if (/^\.$/) { # Closing line $def{$sym} .= "\n"; $sym = ''; } else { $def{$sym} .= "\t" . $_; } } } foreach $sym (sort @syms) { print G "$sym:\n"; print G $header{$sym}; print G $def{$sym}; } close G; # Format $_ to fit in 80 columns (70 + size of tabs) # Long lines are split, and the all but the first are indented # by two leading spaces. The whole thing is then indented by # one tab. sub format { local($tmp); local($head) = ''; local($_) = shift(@_); while (length($_) > 70) { $tmp = substr($_,0,70); $tmp =~ s/^(.*) .*/$1/; $head .= "\t$tmp\n"; $_ = ' ' . substr($_,length($tmp),9999); } $head .= "\t$_\n"; } # The first line was escaped with a final \ character. Every following line # is to be appended to it (until we found a real \n not escaped). Note that # the leading spaces of the continuation line are removed, so any space should # be added before the former \ if needed. sub complete_line { local($_); local($read) = ''; # Concatenation of all the continuation lines found while (<>) { s/^\s+//; # Remove leading spaces if (s/\\\s*$//) { # Still followed by a continuation line $read .= $_; } else { # We've reached the end of the continuation return $read . $_; } } } !NO!SUBS! chmod 755 makegloss $eunicefix makegloss dist_3.5-36.001/mcon/U/0002755000175000017500000000000012645366701014561 5ustar srivastasrivastadist_3.5-36.001/mcon/U/ebcdic.U0000644000175000017500000000310212142511050016067 0ustar srivastasrivasta?RCS: $Id: ebcdic.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Copyright (c) 1998 Andy Dougherty ?RCS: ?RCS: Original author Jarkko Hietaniemi ?RCS: Merged into dist by Andy Dougherty July 13, 1998 ?RCS: ?MAKE:ebcdic: Compile Setvar cat rm run ?MAKE: -pick add $@ %< ?S:ebcdic: ?S: This variable conditionally defines EBCDIC if this ?S: system uses EBCDIC encoding. Among other things, this ?S: means that the character ranges are not contiguous. ?S: See trnl.U ?S:. ?C:EBCDIC: ?C: This symbol, if defined, indicates that this system uses ?C: EBCDIC encoding. ?C:. ?H:#$ebcdic EBCDIC /**/ ?H:. ?F:!try ?LINT:set ebcdic : look whether system uses EBCDIC echo " " echo "Determining whether or not we are on an EBCDIC system..." >&4 $cat >try.c <<'EOM' int main() { if ('M'==0xd4) return 0; return 1; } EOM val=$undef set try if eval $compile_ok; then if $run ./try; then echo "You seem to speak EBCDIC." >&4 val="$define" else echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4 fi else echo "I'm unable to compile the test program." >&4 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4 fi $rm -f try try.* set ebcdic eval $setvar dist_3.5-36.001/mcon/U/d_normsig.U0000644000175000017500000000370212142511050016645 0ustar srivastasrivasta?RCS: $Id: d_normsig.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_normsig.U,v $ ?RCS: Revision 3.0.1.2 1997/02/28 15:37:03 ram ?RCS: patch61: replaced .a with $_a all over the place ?RCS: ?RCS: Revision 3.0.1.1 1994/10/29 16:14:48 ram ?RCS: patch36: call ./bsd explicitely instead of relying on PATH ?RCS: ?RCS: Revision 3.0 1993/08/18 12:06:44 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_normsig jobslib: test Setvar Guess _a ?MAKE: -pick add $@ %< ?S:d_normsig: ?S: This variable conditionally defines the NORMSIG symbol, which ?S: indicates to the C program that the normal signal handling routines ?S: should be used, as opposed to the ones in 4.1bsd (sigset, etc.). ?S:. ?S:jobslib: ?S: This variable holds the argument to be passed to the loader to include ?S: the strange signal handling routines from 4.1bsd. On systems that ?S: have NORMSIG defined this variable is null. ?S:. ?C:NORMSIG: ?C: This symbol, if defined, indicates that normal signal handling routines ?C: should be used, as opposed to the ones in 4.1bsd (sigset, etc.). ?C:. ?H:#$d_normsig NORMSIG /**/ ?H:. ?LINT:set d_normsig : see if we need -ljobs and if we have sigset, etc. echo " " if $test -r /usr/lib/libjobs$_a || $test -r /usr/local/lib/libjobs$_a ; then echo "Jobs library found." >&4 val="$undef" jobslib='-ljobs' else if ./bsd; then echo "No jobs library found. (I suppose this is at least 4.2...)" >&4 else echo "No jobs library found. (That's okay, we all have our faults.)" >&4 fi val="$define" jobslib='' fi set d_normsig eval $setvar dist_3.5-36.001/mcon/U/Configdir.U0000644000175000017500000000202012142511050016560 0ustar srivastasrivasta?RCS: $Id: Configdir.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Configdir.U,v $ ?RCS: Revision 3.0.1.1 1997/02/28 14:58:36 ram ?RCS: patch61: have README explicitely mention the package name ?RCS: ?RCS: Revision 3.0 1993/08/18 12:04:49 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:Configdir: package ?MAKE: -pick add $@ %< : create .config dir to save info across Configure sessions test -d ../.config || mkdir ../.config cat >../.config/README <&4 ?X: ?X: Files spelled uppercased and beginning with PACK are produced by the ?X: shell archive builder and may be removed by the user. Usually, they are ?X: not listed in the MANIFEST file, but you never know... ?X: ?X: "split -l" is the new way of running a split, but we also try the older way ?X: awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \ (split -l 50 2>/dev/null || split -50) rm -f missing tmppwd=`pwd` for filelist in x??; do (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \ >/dev/null 2>>"$tmppwd/missing") done if test -s missing; then cat missing >&4 cat >&4 <<'EOM' THIS PACKAGE SEEMS TO BE INCOMPLETE. You have the option of continuing the configuration process, despite the distinct possibility that your kit is damaged, by typing 'y'es. If you do, don't blame me if something goes wrong. I advise you to type 'n'o and contact the author (). EOM ?X: Can't use $echo at this early stage echo $n "Continue? [n] $c" >&4 read ans case "$ans" in y*) echo "Continuing..." >&4 rm -f missing ;; *) ?X: ?X: Use kill and not exit, so that the trap gets executed to clean up ?X: echo "ABORTING..." >&4 kill $$ ;; esac else echo "Looks good..." fi else echo "There is no MANIFEST file. I hope your kit is complete !" fi rm -f missing x?? @end dist_3.5-36.001/mcon/U/d_casti32.U0000644000175000017500000000422212142511050016435 0ustar srivastasrivasta?RCS: $Id: d_casti32.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Andy Dougherty ?RCS: ?RCS: $Log: d_casti32.U,v $ ?RCS: Revision 3.0.1.3 1995/05/12 12:10:45 ram ?RCS: patch54: made sure cc and ccflags are conditional dependencies ?RCS: ?RCS: Revision 3.0.1.2 1994/10/29 16:09:37 ram ?RCS: patch36: declare signal handler correctly (ADO) ?RCS: ?RCS: Revision 3.0.1.1 1994/08/29 16:07:06 ram ?RCS: patch32: created by ADO ?RCS: ?X: ?X: Can the compiler cast large floats to 32-bit integers? ?X: ?MAKE:d_casti32: cat +cc +ccflags rm intsize Setvar test signal_t ?MAKE: -pick add $@ %< ?S:d_casti32: ?S: This variable conditionally defines CASTI32, which indicates ?S: whether the C compiler can cast large floats to 32-bit ints. ?S:. ?C:CASTI32: ?C: This symbol is defined if the C compiler can cast negative ?C: or large floating point numbers to 32-bit ints. ?C:. ?T:xxx yyy ?H:#$d_casti32 CASTI32 /**/ ?H:. ?F:!try ?LINT:set d_casti32 : check for ability to cast large floats to 32-bit ints. echo " " echo 'Checking whether your C compiler can cast large floats to int32.' >&4 if $test "$intsize" -eq 4; then xxx=int else xxx=long fi $cat >try.c < #include $signal_t blech() { exit(3); } int main() { $xxx i32; double f; int result = 0; signal(SIGFPE, blech); f = (double) 0x7fffffff; f = 10 * f; i32 = ($xxx) f; if (i32 != ($xxx) f) result |= 1; exit(result); } EOCP if $cc $ccflags -o try try.c >/dev/null 2>&1; then ./try yyy=$? else echo "(I can't seem to compile the test program--assuming it can't)" yyy=1 fi case "$yyy" in 0) val="$define" echo "Yup, it can." ;; *) val="$undef" echo "Nope, it can't." ;; esac set d_casti32 eval $setvar $rm -f try try.* dist_3.5-36.001/mcon/U/d_times.U0000644000175000017500000000462712142511050016317 0ustar srivastasrivasta?RCS: $Id: d_times.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_times.U,v $ ?RCS: Revision 3.0.1.2 1995/07/25 14:07:50 ram ?RCS: patch56: typo fix, sytem -> system ?RCS: ?RCS: Revision 3.0.1.1 1994/08/29 16:14:00 ram ?RCS: patch32: now uses new Typedef unit to compute type information ?RCS: ?RCS: Revision 3.0 1993/08/18 12:07:46 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: What is the type returned by times() ? ?X: ?X: Force inclusion of ?X:INC: i_systypes ?MAKE:d_times clocktype: Csym Myread Typedef i_systimes ?MAKE: -pick add $@ %< ?S:d_times: ?S: This variable conditionally defines the HAS_TIMES symbol, which indicates ?S: that the times() routine exists. The times() routine is normally ?S: provided on UNIX systems. You may have to include . ?S:. ?S:clocktype: ?S: This variable holds the type returned by times(). It can be long, ?S: or clock_t on BSD sites (in which case should be ?S: included). ?S:. ?C:HAS_TIMES (TIMES): ?C: This symbol, if defined, indicates that the times() routine exists. ?C: Note that this became obsolete on some systems (SUNOS), which now ?C: use getrusage(). It may be necessary to include . ?C:. ?C:Clock_t (CLOCKTYPE): ?C: This symbol holds the type returned by times(). It can be long, ?C: or clock_t on BSD sites (in which case should be ?C: included). ?C:. ?H:#$d_times HAS_TIMES /**/ ?H:#define Clock_t $clocktype /* Clock time */ ?H:. ?T:val inc : see if times exists echo " " if set times val -f d_times; eval $csym; $val; then echo 'times() found.' >&4 d_times="$define" inc='' case "$i_systimes" in "$define") inc='sys/times.h';; esac set clock_t clocktype long stdio.h sys/types.h $inc eval $typedef dflt="$clocktype" echo " " rp="What type is returned by times() on this system?" . ./myread clocktype="$ans" else echo 'times() NOT found, hope that will do.' >&4 d_times="$undef" ?X: The following is needed for typedef (won't like an empty variable) clocktype='int' fi dist_3.5-36.001/mcon/U/sbrksmart.U0000644000175000017500000000515012142511050016673 0ustar srivastasrivasta?RCS: $Id: sbrksmart.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: sbrksmart.U,v $ ?RCS: Revision 3.0.1.2 1995/01/11 15:35:41 ram ?RCS: patch45: now sets sbrksmart to undef explicitely when lacking sbrk() ?RCS: patch45: forgot a cast when using return value from sbrk() ?RCS: ?RCS: Revision 3.0.1.1 1994/01/24 14:16:45 ram ?RCS: patch16: created ?RCS: ?MAKE:sbrksmart: cat d_sbrk +cc +ccflags +libs rm ?MAKE: -pick add $@ %< ?S:sbrksmart: ?S: This variable conditionally defines HAS_SMART_SBRK if the sbrk() ?S: routine honors a negative argument to lower the break value. ?S:. ?C:HAS_SMART_SBRK: ?C: This symbol is defined when the sbrk() system call may be used with ?C: a negative argument to lower the break value, therefore releasing ?C: core to the system. If not, you'd probably be better off using the ?C: mmap() system call. ?C:. ?H:#$sbrksmart HAS_SMART_SBRK /**/ ?H:. ?T:dumb ?F:!sbrk : see whether sbrk can release core to the kernel echo " " case "$d_sbrk" in "$define") echo "Let's see if your sbrk() is smart enough to release core..." >&4 $cat > sbrk.c </dev/null 2>&1; then ./sbrk >/dev/null 2>&1 case $? in 0) sbrksmart="$define" echo "Yes, it can be used with negative values." ;; 1) echo "Sorry, not enough memory $dumb" ;; 2) echo "No it's not, and besides it seems to be buggy..." ;; 3) echo "No, it fails with negative values." ;; 4) echo "Nope, your sbrk() is too dumb." ;; *) echo "Err... Unexpected result $dumb" ;; esac else echo "(Could not compile test program $dumb)" fi ;; *) echo "Since you don't have sbrk(), let's forget about the smart test!" sbrksmart="$undef" ;; esac $rm -f sbrk sbrk.* core dist_3.5-36.001/mcon/U/d_gettext.U0000644000175000017500000000200112142511050016642 0ustar srivastasrivasta?RCS: $Id: d_gettext.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_gettext: Trylink cat ?MAKE: -pick add $@ %< ?S:d_gettext: ?S: This variable conditionally defines the HAS_GETTEXT symbol, which ?S: indicates to the C program that the gettext() routine is available. ?S:. ?C:HAS_GETTEXT: ?C: This symbol, if defined, indicates that the gettext routine is ?C: available. ?C:. ?H:#$d_gettext HAS_GETTEXT /**/ ?H:. ?LINT:set d_gettext : see if gettext exists $cat >try.c < int main(void) { static char ret; ret |= *gettext("msgid"); return ret ? 0 : 1; } EOC cyn=gettext set d_gettext -lintl eval $trylink dist_3.5-36.001/mcon/U/d_fd_set.U0000644000175000017500000001034312142511050016432 0ustar srivastasrivasta?RCS: $Id: d_fd_set.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_fd_set.U,v $ ?RCS: Revision 3.0.1.3 1997/02/28 15:33:16 ram ?RCS: patch61: added ?F: metalint hint ?RCS: ?RCS: Revision 3.0.1.2 1994/06/20 06:57:23 ram ?RCS: patch30: extended scope for fd_set checks (ADO) ?RCS: ?RCS: Revision 3.0.1.1 1994/01/24 14:06:27 ram ?RCS: patch16: comments for HAS_FD_* symbols were not consistent ?RCS: ?RCS: Revision 3.0 1993/08/18 12:06:02 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_fd_set d_fd_macros d_fds_bits: cat +cc +ccflags rm Oldconfig \ d_socket i_systime i_sysselct i_syssock ?MAKE: -pick add $@ %< ?S:d_fd_set: ?S: This variable contains the eventual value of the HAS_FD_SET symbol, ?S: which indicates if your C compiler knows about the fd_set typedef. ?S:. ?S:d_fd_macros: ?S: This variable contains the eventual value of the HAS_FD_MACROS symbol, ?S: which indicates if your C compiler knows about the macros which ?S: manipulate an fd_set. ?S:. ?S:d_fds_bits: ?S: This variable contains the eventual value of the HAS_FDS_BITS symbol, ?S: which indicates if your fd_set typedef contains the fds_bits member. ?S: If you have an fd_set typedef, but the dweebs who installed it did ?S: a half-fast job and neglected to provide the macros to manipulate ?S: an fd_set, HAS_FDS_BITS will let us know how to fix the gaffe. ?S:. ?C:HAS_FD_SET: ?C: This symbol, when defined, indicates presence of the fd_set typedef ?C: in ?C:. ?C:HAS_FD_MACROS: ?C: This symbol, when defined, indicates presence of the macros used to ?C: manipulate an fd_set. ?C:. ?C:HAS_FDS_BITS: ?C: This symbol, when defined, indicates presence of the fds_bits member in ?C: fd_set. This knowledge is useful if fd_set is available but the macros ?C: aren't. ?C:. ?H:#$d_fd_set HAS_FD_SET /**/ ?H:#$d_fd_macros HAS_FD_MACROS /**/ ?H:#$d_fds_bits HAS_FDS_BITS /**/ ?H:. ?F:!fd_set : check for fd_set items $cat <, which is included (perhaps) ?X: by . We won't force people to include ?X: because it might introduce other ?X: incompatibilities. $cat >fd_set.c < #ifdef HAS_SOCKET #ifdef I_SYS_SOCKET #include /* Might include */ #endif #endif #ifdef I_SYS_TIME #include #endif #ifdef I_SYS_SELECT #include #endif int main() { fd_set fds; #ifdef TRYBITS if(fds.fds_bits); #endif #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO) exit(0); #else exit(1); #endif } EOCP if $cc $ccflags -DTRYBITS -o fd_set fd_set.c >fd_set.out 2>&1 ; then d_fds_bits="$define" d_fd_set="$define" echo "Well, your system knows about the normal fd_set typedef..." >&4 if ./fd_set; then echo "and you have the normal fd_set macros (just as I'd expect)." >&4 d_fd_macros="$define" else $cat >&4 <<'EOM' but not the normal fd_set macros! Gaaack! I'll have to cover for you. EOM d_fd_macros="$undef" fi else $cat <<'EOM' Hmm, your compiler has some difficulty with fd_set. Checking further... EOM if $cc $ccflags -o fd_set fd_set.c >fd_set.out 2>&1 ; then d_fds_bits="$undef" d_fd_set="$define" echo "Well, your system has some sort of fd_set available..." >&4 if ./fd_set; then echo "and you have the normal fd_set macros." >&4 d_fd_macros="$define" else $cat <<'EOM' but not the normal fd_set macros! Gross! More work for me... EOM d_fd_macros="$undef" fi else echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4 d_fd_set="$undef" d_fds_bits="$undef" d_fd_macros="$undef" fi fi $rm -f fd_set* dist_3.5-36.001/mcon/U/perlpath.U0000644000175000017500000000311312142511050016477 0ustar srivastasrivasta?RCS: $Id: perlpath.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: perlpath.U,v $ ?RCS: Revision 3.0.1.2 1995/09/25 09:17:04 ram ?RCS: patch59: unit is now forced to the top of Configure, if possible ?RCS: ?RCS: Revision 3.0.1.1 1995/01/11 15:33:53 ram ?RCS: patch45: can now use Loc variables since path stripping is deferred ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:32 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: The purpose of this unit is to locate perl good enough to construct a #! ?X: ?MAKE:perlpath: Getfile Oldconfig Loc perl ?MAKE: -pick add $@ %< ?Y:TOP ?S:perlpath: ?S: This variable contains the eventual value of the PERLPATH symbol, ?S: which contains the absolute location of the perl interpreter. ?S:. ?C:PERLPATH: ?C: This symbol contains the absolute location of the perl interpreter. ?C:. ?H:#define PERLPATH "$perlpath" /**/ ?H:. : determine perl absolute location case "$perlpath" in '') if test -f /usr/bin/perl; then dflt=/usr/bin/perl else case "$perl" in */*) dflt="$perl";; *) dflt=/usr/bin/perl;; esac fi ;; *) dflt="$perlpath" ;; esac echo " " fn=f~/ rp="Where is perl located on your system?" . ./getfile perlpath="$ans" dist_3.5-36.001/mcon/U/man1dir.U0000644000175000017500000001016612142511050016221 0ustar srivastasrivasta?RCS: $Id: man1dir.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1996, Andy Dougherty ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: man1dir.U,v $ ?RCS: Revision 3.0.1.1 1997/02/28 16:10:29 ram ?RCS: patch61: created ?RCS: ?X: ?X: This was originally specific to perl5. Since perl5 has man pages that ?X: go in both man1/ and man3/ directories, we need both man1dir ?X: and man3dir. This unit is basically dist's mansrc.U with ?X: man1 used instead of man everywhere. ?X: ?MAKE:man1dir man1direxp man1ext installman1dir: afs cat nroff Loc Oldconfig \ spackage test Getfile Prefixit prefixexp Prefixup sysman Myread ?MAKE: -pick add $@ %< ?Y:TOP ?S:man1dir: ?S: This variable contains the name of the directory in which manual ?S: source pages are to be put. It is the responsibility of the ?S: Makefile.SH to get the value of this into the proper command. ?S: You must be prepared to do the ~name expansion yourself. ?S:. ?S:man1direxp: ?S: This variable is the same as the man1dir variable, but is filename ?S: expanded at configuration time, for convenient use in makefiles. ?S:. ?S:installman1dir: ?S: This variable is really the same as man1direxp, unless you are using ?S: AFS in which case it points to the read/write location whereas ?S: man1direxp only points to the read-only access location. For extra ?S: portability, you should only use this variable within your makefiles. ?S:. ?S:man1ext: ?S: This variable contains the extension that the manual page should ?S: have: one of 'n', 'l', or '1'. The Makefile must supply the '.'. ?S: See man1dir. ?S:. ?T:lookpath : determine where manual pages go set man1dir man1dir none eval $prefixit $cat <bsd echo exit 1 >usg echo exit 1 >v7 echo exit 1 >osf1 echo exit 1 >eunice echo exit 1 >xenix echo exit 1 >venix echo exit 1 >os2 echo exit 1 >gnu echo exit 1 >linux echo exit 1 >dos echo exit 1 >windows d_bsd="$undef" d_linux="$undef" d_dos="$undef" d_os2="$undef" d_windows="$undef" ?X: ?X: Do not use 'usrinc', or we get a circular dependency. because ?X: usrinc is defined in usrinc.U, which relies on us... ?X: $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1 then echo "Looks kind of like an OSF/1 system, but we'll see..." echo exit 0 >osf1 elif test `echo abc | $tr a-z A-Z` = Abc ; then xxx=`./loc addbib blurfl $pth` if $test -f $xxx; then echo "Looks kind of like a USG system with BSD features, but we'll see..." echo exit 0 >bsd echo exit 0 >usg else if $contains SIGTSTP foo >/dev/null 2>&1 ; then echo "Looks kind of like an extended USG system, but we'll see..." else echo "Looks kind of like a USG system, but we'll see..." fi echo exit 0 >usg fi elif $contains SIGTSTP foo >/dev/null 2>&1 ; then echo "Looks kind of like a BSD system, but we'll see..." d_bsd="$define" echo exit 0 >bsd elif $rm --version 2>/dev/null >foo; $contains "Free Software Foundation" foo >/dev/null then xxx=`uname` echo exit 0 >gnu echo "Looks kind of like a GNU/$xxx system, but we'll see..." if $test X$xxx = XLinux; then d_linux="$define" echo exit 0 >linux fi else echo "Looks kind of like a Version 7 system, but we'll see..." echo exit 0 >v7 fi case "$eunicefix" in *unixtovms*) $cat <<'EOI' There is, however, a strange, musty smell in the air that reminds me of something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. EOI echo exit 0 >eunice d_eunice="$define" : it so happens the Eunice I know will not run shell scripts in Unix format ;; *) echo " " echo "Congratulations. You aren't running Eunice." d_eunice="$undef" ;; esac if test -d c:/.; then case "X${MACHTYPE:-nonesuchmach}" in *cygwin) echo " "; echo "Hah!... you're running under Cygwin!";; *msys) echo " "; echo "Hah!... you're running under MinGW!";; esac case "X${MACHTYPE:-nonesuchmach}" in *cygwin|*msys) echo exit 0 >windows d_windows="$define" ;; esac fi case "$p_" in :) ;; *) $cat <<'EOI' I have the feeling something is not exactly right, however...don't tell me... EOI if test -n "$DJGPP"; then echo exit 0 >dos d_dos="$define" else $cat <<'EOI' lemme think...does HAL ring a bell?...no, of course, you're only running OS/2! EOI echo exit 0 >os2 d_os2="$define" fi ;; esac if test -f /xenix; then echo "Actually, this looks more like a XENIX system..." echo exit 0 >xenix d_xenix="$define" else echo " " echo "It's not Xenix..." d_xenix="$undef" fi chmod +x xenix $eunicefix xenix if test -f /venix; then echo "Actually, this looks more like a VENIX system..." echo exit 0 >venix else echo " " if ./xenix; then : null else echo "Nor is it Venix..." fi fi chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux windows $eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux windows $rm -f foo dist_3.5-36.001/mcon/U/cf_email.U0000644000175000017500000000352412142511050016425 0ustar srivastasrivasta?RCS: $Id: cf_email.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: cf_email.U,v $ ?RCS: Revision 3.0.1.1 1994/01/24 14:05:06 ram ?RCS: patch16: created ?RCS: ?RCS: ?MAKE:cf_email: cat cf_by test myhostname mydomain Oldconfig Myread ?MAKE: -pick add $@ %< ?S:cf_email: ?S: Electronic mail address of the person who ran Configure. This can be ?S: used by units that require the user's e-mail, like MailList.U. ?S:. ?T:cont maildomain ?LINT:extern MAILDOMAIN : determine the e-mail address of the user who is running us $cat < needs to be included ?X: ?MAKE:i_sysresrc: Inhdr ?MAKE: -pick add $@ %< ?S:i_sysresrc: ?S: This variable conditionally defines the I_SYS_RESOURCE symbol, ?S: and indicates whether a C program should include . ?S:. ?C:I_SYS_RESOURCE (I_SYSRESOURCE): ?C: This symbol, if defined, indicates to the C program that it should ?C: include . ?C:. ?H:#$i_sysresrc I_SYS_RESOURCE /**/ ?H:. ?LINT:set i_sysresrc : see if sys/resource.h has to be included set sys/resource.h i_sysresrc eval $inhdr dist_3.5-36.001/mcon/U/d_rdchk.U0000644000175000017500000000244012142511050016260 0ustar srivastasrivasta?RCS: $Id: d_rdchk.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_rdchk.U,v $ ?RCS: Revision 3.0 1993/08/18 12:06:51 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_rdchk: Trylink cat ?MAKE: -pick add $@ %< ?S:d_rdchk: ?S: This variable conditionally defines the HAS_RDCHK symbol, which ?S: indicates to the C program that the rdchk() routine is available ?S: to find out if there is input pending on an IO channel. ?S:. ?C:HAS_RDCHK (RDCHK): ?C: This symbol, if defined, indicates that the rdchk routine is available ?C: to find out if there is input pending on an IO channel. Generally ?C: the routine is used only if FIONREAD and O_NDELAY aren't available. ?C:. ?H:#$d_rdchk HAS_RDCHK /**/ ?H:. ?LINT:set d_rdchk : see if rdchk exists $cat >try.c < exists and should ?S: be included. ?S:. ?S:i_varargs: ?S: This variable conditionally defines I_VARARGS, which indicates ?S: to the C program that it should include . ?S:. ?S:i_varhdr: ?S: Contains the name of the header to be included to get va_dcl definition. ?S: Typically one of varargs.h or stdarg.h. ?S:. ?C:I_STDARG: ?C: This symbol, if defined, indicates that exists and should ?C: be included. ?C:. ?C:I_VARARGS: ?C: This symbol, if defined, indicates to the C program that it should ?C: include . ?C:. ?H:#$i_stdarg I_STDARG /**/ ?H:#$i_varargs I_VARARGS /**/ ?H:. ?W:%<:va_dcl ?F:!varargs ?T:valstd ?LINT:set i_stdarg i_varargs ?X: ?X: Don't use setvar because the varags test below might override these. ?X: Actually, the messages here are just informative. We don't wish to set ?X: i_varargs or i_stdarg to their final value before knowing which of the ?X: two we'll include. ?X: : see if stdarg is available echo " " if $test `./findhdr stdarg.h`; then echo " found." >&4 valstd="$define" else echo " NOT found." >&4 valstd="$undef" fi : see if varags is available echo " " if $test `./findhdr varargs.h`; then echo " found." >&4 else echo " NOT found, but that's ok (I hope)." >&4 fi ?X: ?X: if you have stdarg.h, you need to support prototypes to actually use it; ?X: but if stdarg.h exists and the compiler doesn't support prototypes (for some ?X: bizarre reason), we'll fall back to varargs.h anyway so it's not so bad. ?X: : set up the varargs testing programs $cat > varargs.c < #endif #ifdef I_VARARGS #include #endif #ifdef I_STDARG int f(char *p, ...) #else int f(va_alist) va_dcl #endif { va_list ap; #ifndef I_STDARG char *p; #endif #ifdef I_STDARG va_start(ap,p); #else va_start(ap); p = va_arg(ap, char *); #endif va_end(ap); return 0; } EOP $cat > varargs <&4 val="$undef"; set i_stdarg; eval $setvar val="$undef"; set i_varargs; eval $setvar ;; *) set i_varhdr eval $setvar case "$i_varhdr" in stdarg.h) val="$define"; set i_stdarg; eval $setvar val="$undef"; set i_varargs; eval $setvar ;; varargs.h) val="$undef"; set i_stdarg; eval $setvar val="$define"; set i_varargs; eval $setvar ;; esac echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;; esac $rm -f varargs* dist_3.5-36.001/mcon/U/afs.U0000644000175000017500000000322312142511050015433 0ustar srivastasrivasta?RCS: $Id: afs.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: afs.U,v $ ?RCS: Revision 3.0.1.2 1997/02/28 15:23:06 ram ?RCS: patch61: can now explicitely tell Configure whether AFS is running ?RCS: ?RCS: Revision 3.0.1.1 1993/08/24 12:24:43 ram ?RCS: patch3: created ?RCS: ?MAKE:afs afsroot: test ?MAKE: -pick add $@ %< ?S:afs: ?S: This variable is set to 'true' if AFS (Andrew File System) is used ?S: on the system, 'false' otherwise. It is possible to override this ?S: with a hint value or command line option, but you'd better know ?S: what you are doing. ?S:. ?S:afsroot: ?S: This variable is by default set to '/afs'. In the unlikely case ?S: this is not the correct root, it is possible to override this with ?S: a hint value or command line option. This will be used in subsequent ?S: tests for AFSness in the configure and test process. ?S:. : allow them to override the AFS root case "$afsroot" in '') afsroot=/afs ;; *) afsroot=$afsroot ;; esac : is AFS running? echo " " case "$afs" in $define|true) afs=true ;; $undef|false) afs=false ;; *) if $test -d $afsroot; then afs=true else afs=false fi ;; esac if $afs; then echo "AFS may be running... I'll be extra cautious then..." >&4 else echo "AFS does not seem to be running..." >&4 fi dist_3.5-36.001/mcon/U/bin.U0000644000175000017500000000556012142511050015440 0ustar srivastasrivasta?RCS: $Id: bin.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: bin.U,v $ ?RCS: Revision 3.0.1.4 1995/09/25 09:15:32 ram ?RCS: patch59: unit is now forced to the top of Configure, if possible ?RCS: ?RCS: Revision 3.0.1.3 1995/01/30 14:32:40 ram ?RCS: patch49: can now handle installation prefix changes (from WED) ?RCS: ?RCS: Revision 3.0.1.2 1994/08/29 16:05:28 ram ?RCS: patch32: now uses installation prefix ?RCS: ?RCS: Revision 3.0.1.1 1993/09/13 15:56:51 ram ?RCS: patch10: made prompting more explicit (WAD) ?RCS: ?RCS: Revision 3.0 1993/08/18 12:05:26 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:bin binexp installbin: Prefixit Getfile Oldconfig afs cat test ?MAKE: -pick add $@ %< ?Y:TOP ?S:bin: ?S: This variable holds the name of the directory in which the user wants ?S: to put publicly executable images for the package in question. It ?S: is most often a local directory such as /usr/local/bin. Programs using ?S: this variable must be prepared to deal with ~name substitution. ?S:. ?S:binexp: ?S: This is the same as the bin variable, but is filename expanded at ?S: configuration time, for use in your makefiles. ?S:. ?S:installbin: ?S: This variable is the same as binexp unless AFS is running in which case ?S: the user is explicitely prompted for it. This variable should always ?S: be used in your makefiles for maximum portability. ?S:. ?C:BIN: ?C: This symbol holds the path of the bin directory where the package will ?C: be installed. Program must be prepared to deal with ~name substitution. ?C:. ?C:BIN_EXP: ?C: This symbol is the filename expanded version of the BIN symbol, for ?C: programs that do not want to deal with that at run-time. ?C:. ?H:#define BIN "$bin" /**/ ?H:#define BIN_EXP "$binexp" /**/ ?H:. ?D:bin='/usr/local/bin' : determine where public executables go echo " " set dflt bin bin eval $prefixit fn=d~ rp='Pathname where the public executables will reside?' . ./getfile if $test "X$ansexp" != "X$binexp"; then installbin='' fi bin="$ans" binexp="$ansexp" if $afs; then $cat <. ?S:. ?C:I_SYS_SYSCTL: ?C: This symbol, if defined, indicates to the C program that it should ?C: include . ?C:. ?H:#$i_syssysctl I_SYS_SYSCTL /**/ ?H:. ?LINT:set i_syssysctl : see if this is a sys/sysctl system set sys/sysctl.h i_syssysctl eval $inhdr dist_3.5-36.001/mcon/U/voidflags.U0000644000175000017500000001237612142511050016651 0ustar srivastasrivasta?RCS: $Id: voidflags.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: voidflags.U,v $ ?RCS: Revision 3.0.1.2 1997/02/28 16:27:58 ram ?RCS: patch61: don't prompt them if the void support is high enough for us ?RCS: ?RCS: Revision 3.0.1.1 1995/01/11 15:37:44 ram ?RCS: patch45: cosmetic change to avoid spurious blank lines when using -s ?RCS: ?RCS: Revision 3.0 1993/08/18 12:10:01 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:voidflags defvoidused: cat sed rm contains +cc +ccflags package \ Oldconfig Myread ?MAKE: -pick add $@ %< ?S:voidflags: ?S: This variable contains the eventual value of the VOIDFLAGS symbol, ?S: which indicates how much support of the void type is given by this ?S: compiler. See VOIDFLAGS for more info. ?S:. ?S:defvoidused: ?S: This variable contains the default value of the VOIDUSED symbol (15). ?S:. ?X: Exceptionally, we have to explicitely alias the symbol name for ?X: config_h.SH, otherwise the comment would not appear. ?C:VOIDFLAGS ~ %<: ?C: This symbol indicates how much support of the void type is given by this ?C: compiler. What various bits mean: ?C: ?C: 1 = supports declaration of void ?C: 2 = supports arrays of pointers to functions returning void ?C: 4 = supports comparisons between pointers to void functions and ?C: addresses of void functions ?C: 8 = suports declaration of generic void pointers ?C: ?C: The package designer should define VOIDUSED to indicate the requirements ?C: of the package. This can be done either by #defining VOIDUSED before ?C: including config.h, or by defining defvoidused in Myinit.U. If the ?C: latter approach is taken, only those flags will be tested. If the ?C: level of void support necessary is not present, defines void to int. ?C:. ?H:?%<:#ifndef VOIDUSED ?H:?%<:#define VOIDUSED $defvoidused ?H:?%<:#endif ?H:?%<:#define VOIDFLAGS $voidflags ?H:?%<:#if (VOIDFLAGS & VOIDUSED) != VOIDUSED ?H:?%<:#define void int /* is void to be avoided? */ ?H:?%<:#define M_VOID /* Xenix strikes again */ ?H:?%<:#endif ?H:. ?W:%<:void ?F:!.out !try.c !flags ?LINT:usefile .out flags try.c ?INIT:: full support for void wanted by default ?INIT:defvoidused=15 ?INIT: ?LINT:known void M_VOID VOIDUSED : check for void type echo " " echo "Checking to see how well your C compiler groks the void type..." >&4 $cat >flags <try.c <<'EOCP' extern int doit(); #if TRY & 1 void sub() { #else sub() { #endif extern void moo(); /* function returning void */ void (*goo)(); /* ptr to func returning void */ #if TRY & 2 static void (*foo[10])(); #endif #if TRY & 8 void *hue; /* generic ptr */ char buf[] = "buf"; int *iptr; #endif #if TRY & 2 if (doit()) { foo[0] = moo; (*foo[0])(); } #endif #if TRY & 4 if (doit()) goo = moo; if (goo == moo) doit(); #endif #if TRY & 8 hue = buf; if (doit()) iptr = hue; #endif doit(); } EOCP ?X: This unit used to use cc -S in those tests to try to speed up things, but ?X: unfortunately, AIX 3.2 does not support this option. if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then voidflags=$defvoidused echo "Good. It appears to support void to the level $package wants." if $contains warning .out >/dev/null 2>&1; then echo "However, you might get some warnings that look like this:" $sed -e 's/^/ /' .out fi else echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4 $cat >&4 flags $rm -f flags if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then echo "It supports 1..." if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then echo "It also supports 2..." if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then voidflags=7 echo "And it supports 4 but not 8 definitely." else echo "It doesn't support 4..." if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then voidflags=11 echo "But it supports 8." else voidflags=3 echo "Neither does it support 8." fi fi else echo "It does not support 2..." if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then voidflags=13 echo "But it supports 4 and 8." else if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then voidflags=5 echo "And it supports 4 but has not heard about 8." else echo "However it supports 8 but not 4." fi fi fi else echo "There is no support at all for void." voidflags=0 fi fi esac ?X: Only prompt user if support does not match the level we want case "$voidflags" in "$defvoidused") ;; *) dflt="$voidflags"; test -f flags && $cat flags rp="Your void support flags add up to what?" . ./myread voidflags="$ans" ;; esac $rm -f try.* .out flags dist_3.5-36.001/mcon/U/i_values.U0000644000175000017500000000233512142511050016474 0ustar srivastasrivasta?RCS: $Id: i_values.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1996, Andy Dougherty ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: i_values.U,v $ ?RCS: Revision 3.0.1.1 1997/02/28 15:48:34 ram ?RCS: patch61: created ?RCS: ?MAKE:i_values: Inhdr ?MAKE: -pick add $@ %< ?S:i_values: ?S: This variable conditionally defines the I_VALUES symbol, and indicates ?S: whether a C program may include to get symbols like MAXLONG ?S: and friends. ?S:. ?C:I_VALUES: ?C: This symbol, if defined, indicates to the C program that it should ?C: include to get definition of symbols like MINFLOAT or ?C: MAXLONG, i.e. machine dependant limitations. Probably, you ?C: should use instead, if it is available. ?C:. ?H:#$i_values I_VALUES /**/ ?H:. ?LINT:set i_values : see if this is a values.h system set values.h i_values eval $inhdr dist_3.5-36.001/mcon/U/Warn_v7EXT.U0000644000175000017500000000234312142511050016570 0ustar srivastasrivasta?RCS: $Id: Warn_v7EXT.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Warn_v7EXT.U,v $ ?RCS: Revision 3.0.1.1 1994/10/29 16:01:42 ram ?RCS: patch36: call ./v7 explicitely instead of relying on PATH ?RCS: ?RCS: Revision 3.0 1993/08/18 12:05:17 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: This unit issues warnings to V7 sites that they are living dangerously. ?X: This unit needs to get mentioned in End.U to get included. ?X: ?MAKE:Warn_v7EXT: package Guess ?MAKE: -pick add $@ %< : Warnings if ./v7; then cat < ?RCS: ?RCS: $Log: d_wctomb.U,v $ ?RCS: Revision 3.0.1.1 1994/08/29 16:20:43 ram ?RCS: patch32: created by ADO ?RCS: ?MAKE:d_wctomb: Trylink cat i_stdlib i_limits ?MAKE: -pick add $@ %< ?S:d_wctomb: ?S: This variable conditionally defines the HAS_WCTOMB symbol, which ?S: indicates to the C program that the wctomb() routine is available ?S: to convert a wide character to a multibyte. ?S:. ?C:HAS_WCTOMB (WCTOMB): ?C: This symbol, if defined, indicates that the wctomb routine is available ?C: to covert a wide character to a multibyte. ?C:. ?H:#$d_wctomb HAS_WCTOMB /**/ ?H:. ?LINT:set d_wctomb : see if wctomb exists $cat >try.c < #endif #$i_limits I_LIMITS #ifdef I_LIMITS #include #endif int main(void) { static int ret; static char dst[MB_LEN_MAX]; static wchar_t wc; ret |= wctomb(dst, wc); return ret ? 0 : 1; } EOC cyn=wctomb set d_wctomb eval $trylink dist_3.5-36.001/mcon/U/d_attribut.U0000644000175000017500000000341312142511050017024 0ustar srivastasrivasta?RCS: $Id: d_attribut.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Andy Dougherty ?RCS: ?RCS: $Log: d_attribut.U,v $ ?RCS: Revision 3.0.1.3 1995/01/30 14:33:45 ram ?RCS: patch49: test C program now includes (WED) ?RCS: ?RCS: Revision 3.0.1.2 1995/01/11 15:25:47 ram ?RCS: patch45: fixed typo in the d_attribut variable (ADO) ?RCS: ?RCS: Revision 3.0.1.1 1994/10/29 16:08:55 ram ?RCS: patch36: created by ADO ?RCS: ?MAKE:d_attribut: Myread Oldconfig Trylink cat ?MAKE: -pick add $@ %< ?S:d_attribut (d_attrib): ?S: This variable conditionally defines HASATTRIBUTE, which ?S: indicates the C compiler can check for function attributes, ?S: such as printf formats. ?S:. ?C:HASATTRIBUTE ~ %< (GNUC_ATTRIBUTE_CHECK): ?C: This symbol indicates the C compiler can check for function attributes, ?C: such as printf formats. This is normally only supported by GNU cc. ?C:. ?H:?%<:#$d_attribut HASATTRIBUTE /**/ ?H:?%<:#ifndef HASATTRIBUTE ?H:?%<:#define __attribute__(_arg_) ?H:?%<:#endif ?H:. ?W:%<:__attribute__ ?LINT:set d_attribut ?LINT:known __attribute__ : Look for GNU-cc style attribute checking $cat >try.c <<'EOCP' #include void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn)); int main(void) { return 0; } EOCP cyn="whether your compiler can handle __attribute__" set d_attribut eval $trylink dist_3.5-36.001/mcon/U/i_niip.U0000644000175000017500000000167512142511050016142 0ustar srivastasrivasta?RCS: $Id: i_niip.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?X: ?X: This unit looks whether is available or not ?X: ?MAKE:i_niip: Inhdr ?MAKE: -pick add $@ %< ?S:i_niip: ?S: This variable conditionally defines I_NETINET_IP, which indicates ?S: to the C program that it should include . ?S:. ?C:I_NETINET_IP: ?C: This symbol, if defined, indicates to the C program that it should ?C: include . ?C:. ?H:#$i_niip I_NETINET_IP /**/ ?H:. ?LINT:set i_niip : see if this is a netinet/ip.h system set netinet/ip.h i_niip eval $inhdr dist_3.5-36.001/mcon/U/i_systwgcf.U0000644000175000017500000000205612142511050017046 0ustar srivastasrivasta?RCS: $Id: i_systwgcf.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: i_systwgcf.U,v $ ?RCS: Revision 3.0 1993/08/18 12:08:39 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:i_systwgcf: Inhdr ?MAKE: -pick add $@ %< ?S:i_systwgcf: ?S: This variable conditionally defines the I_SYS_TWG_CF symbol, and ?S: indicates whether a C program should include sys/twg_config.h. ?S:. ?C:I_SYS_TWG_CF: ?C: This symbol, if defined, indicates to the C program that it should ?C: include sys/twg_config.h. ?C:. ?H:#$i_systwgcf I_SYS_TWG_CF /**/ ?H:. ?LINT:set i_systwgcf : see if this is a sys/twg_config.h system set sys/twg_config.h i_systwgcf eval $inhdr dist_3.5-36.001/mcon/U/yacc.U0000644000175000017500000000440312142511050015602 0ustar srivastasrivasta?RCS: $Id: yacc.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: yacc.U,v $ ?RCS: Revision 3.0.1.1 1994/05/13 15:28:48 ram ?RCS: patch27: added byacc as another alternative (ADO) ?RCS: ?RCS: Revision 3.0 1993/08/18 12:10:03 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:yacc yaccflags: Guess Myread Loc Oldconfig byacc bison cat test ?MAKE: -pick add $@ %< ?S:yacc: ?S: This variable holds the name of the compiler compiler we ?S: want to use in the Makefile. It can be yacc, byacc, or bison -y. ?S:. ?S:yaccflags: ?S: This variable contains any additional yacc flags desired by the ?S: user. It is up to the Makefile to use this. ?S:. ?T:comp : determine compiler compiler echo " " comp='yacc' if $test -f "$byacc"; then comp="byacc or $comp" fi if $test -f "$bison"; then comp="$comp or bison -y" fi case "$yacc" in '') yacc=`./loc yacc yacc $pth` if $test -f "$yacc"; then dflt='yacc' elif $test -f "$byacc"; then dflt='byacc' elif $test -f "$bison"; then dflt='bison' else dflt='' fi ;; *) dflt="$yacc";; esac rp="Which compiler compiler ($comp) shall I use?" . ./myread yacc="$ans" case "$yacc" in *bis*) case "$yacc" in *-y*) ;; *) yacc="$yacc -y" echo "(Adding -y option to bison to get yacc-compatible behaviour.)" ;; esac ;; esac @if yaccflags : see if we need extra yacc flags dflt="$yaccflags" case "$dflt" in '') dflt=none;; esac $cat < ?RCS: ?RCS: $Log: d_alarm.U,v $ ?RCS: Revision 3.0.1.1 1994/08/29 16:06:58 ram ?RCS: patch32: created by ADO ?RCS: ?MAKE:d_alarm: Trylink cat i_unistd ?MAKE: -pick add $@ %< ?S:d_alarm: ?S: This variable conditionally defines the HAS_ALARM symbol, which ?S: indicates to the C program that the alarm() routine is available. ?S:. ?C:HAS_ALARM : ?C: This symbol, if defined, indicates that the alarm routine is ?C: available. ?C:. ?H:#$d_alarm HAS_ALARM /**/ ?H:. ?LINT:set d_alarm : see if alarm exists $cat >try.c < #endif int main(void) { static unsigned ret; ret |= alarm(1); return ret ? 0 : 1; } EOC cyn=alarm set d_alarm eval $trylink dist_3.5-36.001/mcon/U/d_herror.U0000644000175000017500000000170712142511050016473 0ustar srivastasrivasta?RCS: $Id: d_herror.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_herror: Trylink cat ?MAKE: -pick add $@ %< ?S:d_herror: ?S: This variable conditionally defines the HAS_HERROR symbol, which ?S: indicates to the C program that the herror() routine is available. ?S:. ?C:HAS_HERROR: ?C: This symbol, if defined, indicates that the herror routine is ?C: available. ?C:. ?H:#$d_herror HAS_HERROR /**/ ?H:. ?LINT:set d_herror : see if herror exists $cat >try.c < int main(void) { herror("string"); return 0; } EOC cyn=herror set d_herror eval $trylink dist_3.5-36.001/mcon/U/d_flexfnam.U0000644000175000017500000000511712142511050016771 0ustar srivastasrivasta?RCS: $Id: d_flexfnam.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_flexfnam.U,v $ ?RCS: Revision 3.0 1993/08/18 12:06:04 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_flexfnam: cat rm test Setvar ?MAKE: -pick add $@ %< ?S:d_flexfnam: ?S: This variable conditionally defines the FLEXFILENAMES symbol, which ?S: indicates that the system supports filenames longer than 14 characters. ?S:. ?C:FLEXFILENAMES: ?C: This symbol, if defined, indicates that the system supports filenames ?C: longer than 14 characters. ?C:. ?H:#$d_flexfnam FLEXFILENAMES /**/ ?H:. ?T:first second tmpdir ?LINT:set d_flexfnam ?LINT:extern TMPDIR : see if we can have long filenames echo " " ?X: ?X: We have to test in both /tmp and . because of NFS (remote server may allow ?X: long filenames while the local filesystem cannot support them). If at least ?X: one of those file systems cannot support long filenames, then we assume the ?X: whole system can't. ?X: tmpdir="${TMPDIR:-/tmp}" rmlist="$rmlist $tmpdir/cf$$" $test -d "$tmpdir/cf$$" || mkdir "$tmpdir/cf$$" first=123456789abcdef second="$tmpdir/cf$$/$first" $rm -f $first $second if (echo hi >$first) 2>/dev/null; then if $test -f 123456789abcde; then echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4 val="$undef" else if (echo hi >$second) 2>/dev/null; then if $test -f "$tmpdir/cf$$/123456789abcde"; then $cat <<'EOM' That's peculiar... You can have filenames longer than 14 characters, but only on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems I shall consider your system cannot support long filenames at all. EOM val="$undef" else echo 'You can have filenames longer than 14 characters.' >&4 val="$define" fi else $cat <<'EOM' How confusing! Some of your filesystems are sane enough to allow filenames longer than 14 characters but some others like /tmp can't even think about them. So, for now on, I shall assume your kernel does not allow them at all. EOM val="$undef" fi fi else $cat <<'EOM' You can't have filenames longer than 14 chars. You can't even think about them! EOM val="$undef" fi set d_flexfnam eval $setvar $rm -rf "$tmpdir/cf$$" 123456789abcde* dist_3.5-36.001/mcon/U/d_syscall.U0000644000175000017500000000240212142511050016635 0ustar srivastasrivasta?RCS: $Id: d_syscall.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_syscall.U,v $ ?RCS: Revision 3.0 1993/08/18 12:07:42 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_syscall: Trylink cat i_unistd ?MAKE: -pick add $@ %< ?S:d_syscall: ?S: This variable conditionally defines HAS_SYSCALL if syscall() is ?S: available call arbitrary system calls. ?S:. ?C:HAS_SYSCALL (SYSCALL): ?C: This symbol, if defined, indicates that the syscall routine is ?C: available to call arbitrary system calls. If undefined, that's tough. ?C:. ?H:#$d_syscall HAS_SYSCALL /**/ ?H:. ?LINT:set d_syscall : see if syscall exists $cat >try.c < #$i_unistd I_UNISTD #ifdef I_UNISTD #include #endif int main(void) { static int ret, number; ret |= syscall(number, 0); return ret ? 0 : 1; } EOC cyn=syscall set d_syscall eval $trylink dist_3.5-36.001/mcon/U/defeditor.U0000644000175000017500000000243312142511050016631 0ustar srivastasrivasta?RCS: $Id: defeditor.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: defeditor.U,v $ ?RCS: Revision 3.0.1.1 1995/01/11 15:30:16 ram ?RCS: patch45: can now use the 'vi' variable since path stripping is deferred ?RCS: ?RCS: Revision 3.0 1993/08/18 12:08:05 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:defeditor: Getfile Oldconfig Loc vi ?MAKE: -pick add $@ %< ?S:defeditor: ?S: This variable contains the eventual value of the DEFEDITOR symbol, ?S: which contains the name of the default editor. ?S:. ?C:DEFEDITOR: ?C: This symbol contains the full pathname of the default editor. ?C:. ?H:#define DEFEDITOR "$defeditor" /**/ ?H:. : determine default editor echo " " case "$defeditor" in '') case "$vi" in */*) dflt="$vi";; *) dflt=/usr/ucb/vi;; esac ;; *) dflt="$defeditor" ;; esac fn=f/ rp="What is the default editor on your system?" . ./getfile defeditor="$ans" dist_3.5-36.001/mcon/U/d_charsprf.U0000644000175000017500000000310412142511050016773 0ustar srivastasrivasta?RCS: $Id: d_charsprf.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_charsprf.U,v $ ?RCS: Revision 3.0 1993/08/18 12:05:49 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_charsprf: cat rm +cc Setvar ?MAKE: -pick add $@ %< ?S:d_charsprf: ?S: This variable conditionally defines CHARSPRINTF if this system ?S: declares "char *sprintf()" in stdio.h. The trend seems to be to ?S: declare it as "int sprintf()". ?S:. ?C:CHARSPRINTF: ?C: This symbol is defined if this system declares "char *sprintf()" in ?C: stdio.h. The trend seems to be to declare it as "int sprintf()". It ?C: is up to the package author to declare sprintf correctly based on the ?C: symbol. ?C:. ?H:#$d_charsprf CHARSPRINTF /**/ ?H:. ?F:!ucbsprf.c !ucbsprf ?LINT:set d_charsprf : see if sprintf is declared as int or pointer to char echo " " $cat >ucbsprf.c <<'EOF' int main() { int sprintf(); char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); } EOF if $cc -o ucbsprf ucbsprf.c >/dev/null 2>&1 && ./ucbsprf; then echo "Your sprintf() returns (int)." >&4 val="$undef" else echo "Your sprintf() returns (char*)." >&4 val="$define" fi set d_charsprf eval $setvar $rm -f ucbsprf* dist_3.5-36.001/mcon/U/warnflags.U0000644000175000017500000000311612142511050016647 0ustar srivastasrivasta?RCS: $Id: warnflags.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Graham Stoney ?RCS: ?RCS: $Log: warnflags.U,v $ ?RCS: Revision 3.0 1993/08/18 12:10:02 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:warnflags: cat cc contains Myread Guess Oldconfig Findhdr ?MAKE: -pick add $@ %< ?S:warnflags: ?S: This variable contains any additional C compiler flags to generate ?S: warnings from the compiler. It is up to the Makefile to use this. ?S:. : offer additional warning flags for compilation $cat </dev/null 2>&1; then : else dflt="$dflt -Wno-implicit" fi ;; *) dflt="none";; esac ;; ' ') dflt="none";; *) dflt="$warnflags";; esac rp="Any $cc flags to enable warnings?" . ./myread case "$ans" in none) warnflags=' ';; *) warnflags="$ans";; esac dist_3.5-36.001/mcon/U/randfunc.U0000644000175000017500000001030312142511050016457 0ustar srivastasrivasta?RCS: $Id: randfunc.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: randfunc.U,v $ ?RCS: Revision 3.0 1993/08/18 12:09:39 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: This is the new unit that should be used when random ?X: functions are to be used. It thus makes randbits.U obsolete. ?X: ?MAKE:randfunc mrand seedfunc nrandbits: cat +cc rm test Myread Csym ?MAKE: -pick add $@ %< ?S:randfunc: ?S: Indicates the name of the random number function to use. ?S: Values include drand48, random, and rand. In C programs, ?S: the 'nrand' macro is defined to generate uniformly distributed ?S: random numbers over the range [0., 1.] (see mrand and nrand). ?S:. ?S:mrand: ?S: Indicates the macro to be used to generate normalized ?S: random numbers. Uses randfunc, often divided by ?S: (double) ((1 << nrandbits) -1) in order to normalize the result. ?S: In C programs, the macro 'nrand' is maped on mrand. ?S:. ?S:seedfunc: ?S: Indicates the random number generating seed function. ?S: Values include srand48, srandom, and srand. ?S:. ?S:nrandbits: ?S: Indicates how many bits are produced by the function used to ?S: generate normalized random numbers. ?S:. ?C:nrand: ?C: This macro is to be used to generate uniformly distributed ?C: random numbers over the range [0., 1.]. ?C:. ?C:seednrand: ?C: This symbol defines the macro to be used in seeding the ?C: random number generator (see nrand). ?C:. ?H:#define nrand() $mrand /**/ ?H:#define seednrand(x) $seedfunc(x) /**/ ?H:. ?T:cont val ?LINT:nothere $nrandbits) : How can we generate normalized random numbers ? echo " " case "$randfunc" in '') if set drand48 val -f; eval $csym; $val; then dflt="drand48" echo "Good, found drand48()." >&4 elif set random val -f; eval $csym; $val; then dflt="random" echo "OK, found random()." >&4 else dflt="rand" echo "Yick, looks like I have to use rand()." >&4 fi echo " " ;; *) dflt="$randfunc" ;; esac cont=true while $test "$cont"; do rp="Use which function to generate random numbers?" . ./myread ?X: Invalidates nrandbits if the answer is not the default so ?X: that the value stored in config.sh will not be used when ?X: we change our random function. if $test "$ans" = "$dflt"; then : null else nrandbits='' fi randfunc="$ans" if set $ans val -f; eval $csym; $val; then cont='' else dflt=n rp="Function $ans does not exists. Use that name anyway?" . ./myread dflt=rand case "$ans" in [yY]*) cont='';; esac fi case "$cont" in '') case "$randfunc" in drand48) mrand="drand48()" seedfunc="srand48" ;; rand*) case "$nrandbits" in '') echo "Checking to see how many bits your $randfunc() function produces..." >&4 $cat >try.c < int main() { register int i; register unsigned long tmp; register unsigned long max = 0L; extern long random(); for (i = 1000; i; i--) { tmp = (unsigned long)$randfunc(); if (tmp > max) max = tmp; } for (i = 0; max; i++) max /= 2; printf("%d\n",i); } EOCP if $cc -o try try.c >/dev/null 2>&1 ; then dflt=`try` else dflt='?' echo "(I can't seem to compile the test program...)" fi ;; *) dflt="$nrandbits" ;; esac rp="How many bits does your $randfunc() function produce?" . ./myread nrandbits="$ans" $rm -f try.c try mrand="($randfunc() / (double) ((1 << $nrandbits) -1))" seedfunc="srand" ;; ?X: The following is provided just in case... *) dflt="31" rp="How many bits does your $randfunc() function produce?" . ./myread nrandbits="$ans" seedfunc="s$randfunc" mrand="($randfunc() / (double) ((1 << $nrandbits) -1))" if set $seedfunc val -f; eval $csym; $val; then echo "(Using $seedfunc() to seed random generator)" else echo "(Warning: no $seedfunc() to seed random generator)" seedfunc=rand fi ;; esac ;; esac done dist_3.5-36.001/mcon/U/cf_name.U0000644000175000017500000000411512142511050016253 0ustar srivastasrivasta?RCS: $Id: cf_name.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Graham Stoney ?RCS: ?RCS: $Log: cf_name.U,v $ ?RCS: Revision 3.0.1.2 1994/05/06 14:29:36 ram ?RCS: patch23: fixed user name computation from /etc/passwd in bsd systems ?RCS: ?RCS: Revision 3.0.1.1 1994/01/24 14:05:11 ram ?RCS: patch16: created ?RCS: ?RCS: ?MAKE:+cf_name: cf_by passcat Filexp nametype cat test ?MAKE: -pick add $@ %< ?S:cf_name: ?S: Full name of the person who ran the Configure script and answered the ?S: questions. This can be used by units that require the user's full name. ?S: This variable is for internal use only. ?S:. ?T:xxx fn NAME : figure out their full name case "$NAME" in '') case "$nametype" in other) fn=`./filexp ~/.fullname` xxx=usg $test -f $fn && xxx=other ;; *) xxx="$nametype" ;; esac case "$xxx" in bsd) cf_name=`$passcat | grep "^$cf_by:" | \ sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \ -e 's/,.*//'` ;; usg) cf_name=`$passcat | grep "^$cf_by:" | \ sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \ -e 's/[^-]*-\(.*\)(.*)/\1/'` ;; *) cf_name=`$cat $fn` ;; esac ;; *) cf_name="$NAME" ;; esac ?X: ?X: In the original unit, Graham asked for the user name, in case the above ?X: code was unable to figure it out correctly. Since now cf_name has been ?X: made an internal variable only (i.e. it is not saved in config.sh), letting ?X: the user override the computed default each time would be a pain. ?X: Therefore, I have decided to trust the above code to get it right, and for ?X: those rare cases where it will fail, too bad :-) --RAM. ?X: echo " " echo "Pleased to meet you, $cf_name." dist_3.5-36.001/mcon/U/End.U0000644000175000017500000000201612142511050015367 0ustar srivastasrivasta?RCS: $Id: End.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: End.U,v $ ?RCS: Revision 3.0 1993/08/18 12:04:51 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: This unit serves as the goal which forces make to choose all the units that ?X: ask questions. The $W on the ?MAKE: line is the list of all symbols wanted. ?X: To force any unit to be included, copy this unit to your private U directory ?X: and add the name of the unit desired to the ?MAKE: dependency line. ?X: ?MAKE:End: $W ?MAKE: -pick add $@ %< ?LINT:use $W : end of configuration questions echo " " echo "End of configuration questions." dist_3.5-36.001/mcon/U/d_initstate.U0000644000175000017500000000234312142511050017173 0ustar srivastasrivasta?RCS: $Id: d_initstate.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_initstate: Trylink cat i_stdlib ?MAKE: -pick add $@ %< ?S:d_initstate: ?S: This variable conditionally defines the HAS_INITSTATE symbol, which ?S: indicates to the C program that the initstate() routine is available ?S: to initialize the random() number generator. ?S:. ?C:HAS_INITSTATE: ?C: This symbol, if defined, indicates that the initstate routine is ?C: available to initialize the random() number generator. ?C:. ?H:#$d_initstate HAS_INITSTATE /**/ ?H:. ?LINT:set d_initstate : see if initstate exists $cat >try.c < #endif int main(void) { static long state[31]; static size_t size; static char ret; ret |= *initstate(1U, (char *) state, size); return ret ? 0 : 1; } EOC cyn=initstate set d_initstate eval $trylink dist_3.5-36.001/mcon/U/shm_for.U0000644000175000017500000000615612142511050016327 0ustar srivastasrivasta?RCS: $Id: shm_for.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: shm_for.U,v $ ?RCS: Revision 3.0.1.1 1994/10/29 16:28:37 ram ?RCS: patch36: call ./Cppsym explicitely instead of relying on PATH ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:46 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:shm_for shm_att shm_lim: Cppsym Myread ipc uname ?MAKE: -pick add $@ %< ?S:shm_for: ?S: This variable tells us the type of machine we're expecting the ?S: shared memory code to run on. The value is available to C programs ?S: in the C_SHM_FOR manifest. ?S:. ?S:shm_att: ?S: This variable tells us where a shared memory segment should be ?S: attached. Good values are HIGH, LOW, and ZERO. ?S:. ?S:shm_lim: ?S: This variable tells us if shared memory attached HIGH should ?S: have an upper limit. ?S:. ?X: ---------------------------------------------------------- ?X: It's a potential lose to define anything beginning with SHM... ?X: At least we can think that S_ stands for "String version of ..." -- HMS ?X: ---------------------------------------------------------- ?C:S_SHM_FOR ~ %<: ?C: This symbol identifies what we chose for the target system's ?C: default shared memory configuration parameters. ?C:. ?C:S_SHM_ATT ~ %<: ?C: This symbol holds the default "place" to attach shared memory. ?C: Values are "HIGH", "ZERO", and "LOW". ?C:. ?C:S_SHM_LIM ~ %<: ?C: This symbol holds the default upper bound address limit if shared ?C: memory is attached HIGH. If zero, there is no upper limit. ?C:. ?H:?%<:#ifdef SERVE_SHM ?H:?%<:#define S_SHM_FOR "$shm_for" ?H:?%<:#define S_SHM_ATT "$shm_att" ?H:?%<:#define S_SHM_LIM "$shm_lim" ?H:?%<:#endif ?H:. ?W:%<:S_SHM_FOR S_SHM_ATT S_SHM_LIM : see how to attach shared memory echo " " echo "Deciding how to attach shared memory..." >&4 case "$ipc" in shm) shm_for='Default case' shm_att='HIGH' shm_lim='0x0' if ./Cppsym tower32 tower32_600; then echo "NCR Towers are usually normal..." : echo "Oh, an NCR Tower." : This works for the 600 shm_for='NCR Tower 32' shm_att='LOW' else case "$uname" in */uname) case "`uname -m`" in ACS??68*) echo "Oh, an Altos 3068." shm_for='Altos 3068:' shm_lim='0x800000' ;; esac ;; *) echo "Looks normal to me..." ;; esac fi dflt="$shm_for" rp='Description of shared memory configuration?' . ./myread shm_for="$ans" dflt="$shm_att" rp='Where should shared memory be attached?' . ./myread shm_att="$ans" case "$shm_att" in HIGH) dflt="$shm_lim" rp='What is the upper address limit for shared memory?' . ./myread shm_lim="$ans" ;; *) shm_lim='' ;; esac ;; *) echo "but you aren't using shared memory so I won't bother." >&4 shm_for='NOT CONFIGURED' shm_att='NONE' shm_lim='-1' ;; esac dist_3.5-36.001/mcon/U/Magic_h.U0000644000175000017500000000317612142511050016220 0ustar srivastasrivasta?RCS: $Id: Magic_h.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Magic_h.U,v $ ?RCS: Revision 3.0.1.2 1993/11/10 17:32:58 ram ?RCS: patch14: forgot to mention Id in the dependencies ?RCS: ?RCS: Revision 3.0.1.1 1993/10/16 13:46:59 ram ?RCS: patch12: created for ?M: lines support (magic symbols) ?RCS: ?X: ?X: This file ends up producing the confmagic.h include, which is used to ?X: automagically remap some C symbols via cpp redefinitions. ?X: ?X: The file ./Magic_h below contains all the ?M: lines extracted out of all ?X: the units. Metaconfig itself adds the final #endif statement. ?X: Note that this code isn't included into Configure, but must be shipped with. ?X: ?MAKE:Magic_h: Id Config_h ?MAKE: -pick cm_h_weed $@ %< ?MAKE: -pick cm_h_weed $@ ./Magic_h ?LINT:nocomment /* * This file was produced by running metaconfig and is intended to be included * after config.h and after all the other needed includes have been dealt with. * * This file may be empty, and should not be edited. Rerun metaconfig instead. * If you wish to get rid of this magic, remove this file and rerun metaconfig * without the -M option. * * $Id: Magic_h.U 167 2013-05-08 17:58:00Z rmanfredi $ */ #ifndef _confmagic_h_ #define _confmagic_h_ dist_3.5-36.001/mcon/U/d_strcoll.U0000644000175000017500000000235212142511050016651 0ustar srivastasrivasta?RCS: $Id: d_strcoll.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Andy Dougherty ?RCS: ?RCS: $Log: d_strcoll.U,v $ ?RCS: Revision 3.0.1.1 1994/08/29 16:12:01 ram ?RCS: patch32: created by ADO ?RCS: ?MAKE:d_strcoll: Trylink cat ?MAKE: -pick add $@ %< ?S:d_strcoll: ?S: This variable conditionally defines HAS_STRCOLL if strcoll() is ?S: available to compare strings using collating information. ?S:. ?C:HAS_STRCOLL: ?C: This symbol, if defined, indicates that the strcoll routine is ?C: available to compare strings using collating information. ?C:. ?H:#$d_strcoll HAS_STRCOLL /**/ ?H:. ?LINT:set d_strcoll : see if strcoll exists $cat >try.c < int main(void) { static int ret; ret |= strcoll("A", "B"); return ret ? 0 : 1; } EOC cyn=strcoll set d_strcoll eval $trylink dist_3.5-36.001/mcon/U/sockopt.U0000644000175000017500000000475712142511050016361 0ustar srivastasrivasta?RCS: $Id: sockopt.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: sockopt.U,v $ ?RCS: Revision 3.0.1.1 1995/07/25 14:16:14 ram ?RCS: patch56: obsoleted KEEPALIVE in favor of CAN_KEEPALIVE for consistency ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:48 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_keepalive: cat rm contains +cc +ccflags socketlib sockethdr \ d_oldsock libs Oldconfig Setvar Findhdr ?MAKE: -pick add $@ %< ?S:d_keepalive: ?S: This symbol conditionally defines CAN_KEEPALIVE which indicates to the C ?S: program that setsockopt SO_KEEPALIVE will work properly. ?S:. ?C:CAN_KEEPALIVE (KEEPALIVE): ?C: This symbol if defined indicates to the C program that the SO_KEEPALIVE ?C: option of setsockopt() will work as advertised in the manual. ?C:. ?H:#$d_keepalive CAN_KEEPALIVE /**/ ?H:. ?F:!socket ?LINT:set d_keepalive : see if setsockopt with SO_KEEPALIVE works as advertised echo " " case "$d_oldsock" in "$undef") if $contains SO_KEEPALIVE `./findhdr sys/socket.h` \ /dev/null >/dev/null 2>&1 then echo "OK, let's see if SO_KEEPALIVE works as advertised..." >&4 $cat > socket.c < #include #include #include int main() { int s = socket(AF_INET, SOCK_STREAM, 0); if (s == -1) exit(1); if (-1 == setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, 0, 0)) exit(2); exit(0); } EOP if $cc $ccflags $sockethdr -o socket socket.c $libs \ $socketlib >/dev/null 2>&1; then ./socket >/dev/null 2>&1 case $? in 0) echo "Yes, it does!" val="$define";; 1) $cat <try.c < #endif int main(void) { static int ret, flags; static void *addr; static size_t len; flags |= MS_ASYNC; flags |= MS_SYNC; flags |= MS_INVALIDATE; ret |= msync(addr, len, flags); return ret ? 0 : 1; } EOC cyn=msync set d_msync eval $trylink dist_3.5-36.001/mcon/U/sysman.U0000644000175000017500000000366612142511050016207 0ustar srivastasrivasta?RCS: $Id: sysman.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: sysman.U,v $ ?RCS: Revision 3.0.1.2 1994/06/20 07:08:43 ram ?RCS: patch30: now explicitely states that /usr/man/man1 is the default ?RCS: patch30: added /usr/local/man/man1 to the search list ?RCS: ?RCS: Revision 3.0.1.1 1993/09/13 16:13:50 ram ?RCS: patch10: added support for /local/man/man1 (WAD) ?RCS: patch10: added temporary syspath variable to cut down on line length ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:55 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:sysman: test Loc Oldconfig ?MAKE: -pick add $@ %< ?S:sysman: ?S: This variable holds the place where the manual is located on this ?S: system. It is not the place where the user wants to put his manual ?S: pages. Rather it is the place where Configure may look to find manual ?S: for unix commands (section 1 of the manual usually). See mansrc. ?S:. ?T:syspath : determine where manual pages are on this system echo " " case "$sysman" in '') syspath='/usr/share/man/man1 /usr/man/man1' syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1" syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1" syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1" syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1" syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1" sysman=`./loc . /usr/man/man1 $syspath` ;; esac if $test -d "$sysman"; then echo "System manual is in $sysman." >&4 else echo "Could not find manual pages in source form." >&4 fi dist_3.5-36.001/mcon/U/d_lockf.U0000644000175000017500000000255512142511050016272 0ustar srivastasrivasta?RCS: $Id: d_lockf.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Andy Dougherty ?RCS: ?RCS: $Log: d_lockf.U,v $ ?RCS: Revision 3.0.1.1 1994/08/29 16:09:36 ram ?RCS: patch32: created by ADO ?RCS: ?MAKE:d_lockf: Trylink cat i_unistd ?MAKE: -pick add $@ %< ?S:d_lockf: ?S: This variable conditionally defines HAS_LOCKF if lockf() is ?S: available to do file locking. ?S:. ?C:HAS_LOCKF (LOCKF): ?C: This symbol, if defined, indicates that the lockf routine is ?C: available to do file locking. ?C:. ?H:#$d_lockf HAS_LOCKF /**/ ?H:. ?LINT:set d_lockf : see if lockf exists $cat >try.c < #$i_unistd I_UNISTD #ifdef I_UNISTD #include #endif int main(void) { static int fd, ret; static off_t size; ret |= lockf(fd, F_ULOCK, size); ret |= lockf(fd, F_LOCK, size); ret |= lockf(fd, F_TLOCK, size); ret |= lockf(fd, F_TEST, size); return ret ? 0 : 1; } EOC cyn=lockf set d_lockf eval $trylink dist_3.5-36.001/mcon/U/ipc.U0000644000175000017500000001050512142511050015436 0ustar srivastasrivasta?RCS: $Id: ipc.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: ipc.U,v $ ?RCS: Revision 3.0 1993/08/18 12:08:53 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:ipc serve_shm serve_msg serve_inet_udp serve_inet_tcp serve_unix_udp \ serve_unix_tcp: test Myread Oldconfig d_socket d_msg d_shm d_sem ?MAKE: -pick add $@ %< ?LINT:use d_msg d_sem ?S:ipc: ?S: This variable holds the type of IPC service we'll be using. Values ?S: include "ip", "shm", "msg", "cms" and "os9". We don't worry about ?S: cms or os9 here, because Configure doesn't run in those places--HMS. ?S:. ?S:serve_shm: ?S: This variable controls the definition of SERVE_SHM, which tells the ?S: C program to use USG shared memory for IPC. ?S:. ?S:serve_msg: ?S: This variable controls the definition of SERVE_MSG, which tells the ?S: C program to use USG message queues for IPC. ?S:. ?S:serve_inet_udp: ?S: This variable controls the definition of SERVE_INET_UDP, which tells ?S: the C program to enable InterNet-domain UDP support for IPC. ?S:. ?S:serve_inet_tcp: ?S: This variable controls the definition of SERVE_INET_TCP, which tells ?S: the C program to enable InterNet-domain TCP support for IPC. ?S:. ?S:serve_unix_udp: ?S: This variable controls the definition of SERVE_UNIX_UDP, which tells ?S: the C program to enable Unix-domain UDP support for IPC. ?S:. ?S:serve_unix_tcp: ?S: This variable controls the definition of SERVE_UNIX_TCP, which tells ?S: the C program to enable Unix-domain TCP support for IPC. ?S:. ?C:SERVE_SHM: ?C: If defined, tells the C program to use USG shared memory for IPC. ?C:. ?C:SERVE_MSG: ?C: If defined, tells the C program to use USG message queues for IPC. ?C:. ?C:SERVE_INET_UDP: ?C: If defined, tells the C program to enable InterNet-domain UDP ?C: support for IPC. ?C:. ?C:SERVE_INET_TCP: ?C: If defined, tells the C program to enable InterNet-domain TCP ?C: support for IPC. ?C:. ?C:SERVE_UNIX_UDP: ?C: If defined, tells the C program to enable Unix-domain UDP ?C: support for IPC. ?C:. ?C:SERVE_UNIX_TCP: ?C: If defined, tells the C program to enable Unix-domain TCP ?C: support for IPC. ?C:. ?H:#$serve_shm SERVE_SHM /**/ ?H:#$serve_msg SERVE_MSG /**/ ?H:#$serve_inet_udp SERVE_INET_UDP /**/ ?H:#$serve_inet_tcp SERVE_INET_TCP /**/ ?H:#$serve_unix_udp SERVE_UNIX_UDP /**/ ?H:#$serve_unix_tcp SERVE_UNIX_TCP /**/ ?H:. ?X: FIXME -- RAM ?INIT:serve_shm='' ?INIT:serve_msg="$undef" ?INIT:serve_inet_udp='' ?INIT:serve_inet_tcp='' ?INIT:serve_unix_udp='' ?INIT:serve_unix_tcp='' : get IPC mechanism echo " " ipc='' while $test -z "$ipc" do if $test "$ipc" != "shm" -a "$d_socket" = "$define"; then ipc='' if $test "$serve_inet_udp" = "$undef"; then dflt=n else dflt=y fi rp='Provide InterNet-domain UDP service?' . ./myread dflt='' case "$ans" in n*) serve_inet_udp="$undef";; *) serve_inet_udp="$define" ipc='ip' ;; esac if $test "$serve_inet_tcp" = "$define"; then dflt=y else dflt=n fi rp='Provide InterNet-domain TCP service?' . ./myread dflt='' case "$ans" in n*) serve_inet_tcp="$undef";; *) serve_inet_tcp="$define" ipc='ip' ;; esac if $test "$serve_unix_udp" = "$define"; then dflt=y else dflt=n fi rp='Provide Unix-domain UDP service?' . ./myread dflt='' case "$ans" in n*) serve_unix_udp="$undef";; *) serve_unix_udp="$define" ipc='ip' ;; esac if $test "$serve_unix_tcp" = "$define"; then dflt=y else dflt=n fi rp='Provide Unix-domain TCP service?' . ./myread dflt='' case "$ans" in n*) serve_unix_tcp="$undef";; *) serve_unix_tcp="$define" ipc='ip' ;; esac else serve_inet_udp="$undef" serve_inet_tcp="$undef" serve_unix_udp="$undef" serve_unix_tcp="$undef" fi if $test "$ipc" != "ip" -a "$d_shm" = "$define"; then echo "Providing USG shared memory IPC support." >&4 serve_shm="$define" ipc='shm' else serve_shm="$undef" fi if $test -z "$ipc"; then echo "You must select an IPC mechanism." >&4 fi done dist_3.5-36.001/mcon/U/Options.U0000644000175000017500000002676212514676641016357 0ustar srivastasrivasta?RCS: $Id: Options.U 191 2015-04-19 10:04:17Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Options.U,v $ ?RCS: Revision 3.0.1.7 1997/02/28 15:08:15 ram ?RCS: patch61: optdef.sh now starts with a "startsh" ?RCS: patch61: moved some code from Head.U ?RCS: ?RCS: Revision 3.0.1.6 1995/09/25 09:14:46 ram ?RCS: patch59: protected option parsing code against 'echo -*' option failure ?RCS: ?RCS: Revision 3.0.1.5 1995/05/12 12:04:52 ram ?RCS: patch54: added -K option for experts ?RCS: ?RCS: Revision 3.0.1.4 1995/01/30 14:27:52 ram ?RCS: patch49: this unit now exports file optdef.sh, not a variable ?RCS: ?RCS: Revision 3.0.1.3 1995/01/11 15:19:00 ram ?RCS: patch45: new -O option allowing -D and -U to override config.sh settings ?RCS: patch45: file optdef.sh is no longer removed after sourcing ?RCS: ?RCS: Revision 3.0.1.2 1994/10/29 15:58:06 ram ?RCS: patch36: ensure option definition file is removed before appending ?RCS: patch36: protect variable definitions with spaces in them ?RCS: ?RCS: Revision 3.0.1.1 1994/06/20 06:55:44 ram ?RCS: patch30: now uses new me symbol to tag error messages ?RCS: patch30: new -D and -U options to define/undef symbols (JHI) ?RCS: ?RCS: Revision 3.0 1993/08/18 12:05:14 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: Command line parsing. It is really important that the variables used here ?X: be not listed in the MAKE line, or they will be saved in config.sh and ?X: loading this file to fetch default answers would clobber the values set ?X: herein. ?X: ?MAKE:Options: startsh ?MAKE: -pick wipe $@ %< ?V:reuseval alldone error realsilent silent extractsh fastread \ override knowitall: config_sh ?T:arg argn symbol config_arg0 config_args config_argc xxx yyy zzz uuu ?T:args_exp args_sep arg_exp ?F:!Configure ?F:./optdef.sh ./cmdline.opt ./posthint.sh ./cmdl.opt : Save command line options in file UU/cmdline.opt for later use in : generating config.sh. ?X: This temporary file will be read by Oldsym.U. I used a temporary ?X: file to preserve all sorts of potential command line quotes and ?X: also because we don't know in advance how many variables we'll ?X: need, so I can't actually declare them on the MAKE line. ?X: The config_args variable won't be quite correct if Configure is ?X: fed something like ./Configure -Dcc="gcc -B/usr/ccs/bin/" ?X: since the quotes are gone by the time we see them. You'd have to ?X: reconstruct the command line from the config_arg? lines, but since ?X: I don't imagine anyone actually having to do that, I'm not going ?X: to worry too much. cat > cmdline.opt <>cmdline.opt < cmdl.opt $arg EOC arg_exp=`cat cmdl.opt` args_exp="$args_exp$args_sep'$arg_exp'" argn=`expr $argn + 1` args_sep=' ' done ?X: args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@" ?X: used by hints/os2.sh in Perl, for instance rm -f cmdl.opt : produce awk script to parse command line options cat >options.awk <<'EOF' BEGIN { optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification len = length(optstr); for (i = 1; i <= len; i++) { c = substr(optstr, i, 1); ?X: some older awk's do not have the C ?: construct if (i < len) a = substr(optstr, i + 1, 1); else a = ""; if (a == ":") { arg[c] = 1; i++; } opt[c] = 1; } } { expect = 0; str = $0; if (substr(str, 1, 1) != "-") { printf("'%s'\n", str); next; } len = length($0); for (i = 2; i <= len; i++) { c = substr(str, i, 1); if (!opt[c]) { printf("-%s\n", substr(str, i)); next; } printf("-%s\n", c); if (arg[c]) { if (i < len) printf("'%s'\n", substr(str, i + 1)); else expect = 1; next; } } } END { if (expect) print "?"; } EOF : process the command line options ?X: Use "$@" to keep arguments with spaces in them from being split apart. ?X: For the same reason, awk will output quoted arguments and the final eval ?X: removes them and sets a proper $* array. An 'X' is prepended to each ?X: argument before being fed to echo to guard against 'echo -x', where -x ?X: would be understood as an echo option! It is removed before feeding awk. set X `for arg in "$@"; do echo "X$arg"; done | sed -e s/X// | awk -f options.awk` eval "set $*" shift rm -f options.awk : set up default values fastread='' reuseval=false config_sh='' alldone='' error='' silent='' extractsh='' override='' knowitall='' rm -f optdef.sh posthint.sh cat >optdef.sh <&4 redirection based on the value of the ?X: realsilent variable... -- RAM, 18/93/96 ?X: : option parsing while test $# -gt 0; do case "$1" in -d) shift; fastread=yes;; -e) shift; alldone=cont;; -f) shift cd .. if test -r "$1"; then config_sh="$1" else echo "$me: cannot read config file $1." >&2 error=true fi cd UU shift;; -h) shift; error=true;; -r) shift; reuseval=true;; -s) shift; silent=true; realsilent=true;; -E) shift; alldone=exit;; -K) shift; knowitall=true;; -O) shift; override=true;; -S) shift; silent=true; extractsh=true;; -D) shift case "$1" in *=) echo "$me: use '-U symbol=', not '-D symbol='." >&2 echo "$me: ignoring -D $1" >&2 ;; *=*) echo "$1" | \ sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;; *) echo "$1='define'" >> optdef.sh;; esac shift ;; -U) shift case "$1" in *=) echo "$1" >> optdef.sh;; *=*) echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2 echo "$me: ignoring -U $1" >&2 ;; *) echo "$1='undef'" >> optdef.sh;; esac shift ;; -A) shift xxx='' yyy="$1" zzz='' uuu=undef case "$yyy" in *=*) zzz=`echo "$yyy"|sed 's!=.*!!'` case "$zzz" in *:*) zzz='' ;; *) xxx=append zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'` yyy=`echo "$yyy"|sed 's!=.*!!'` ;; esac ;; esac case "$xxx" in '') case "$yyy" in *:*) xxx=`echo "$yyy"|sed 's!:.*!!'` yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` zzz=`echo "$yyy"|sed 's!^[^=]*=!!'` yyy=`echo "$yyy"|sed 's!=.*!!'` ;; *) xxx=`echo "$yyy"|sed 's!:.*!!'` yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;; esac ;; esac case "$xxx" in append) echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;; clear) echo "$yyy=''" >> posthint.sh ;; define) case "$zzz" in '') zzz=define ;; esac echo "$yyy='$zzz'" >> posthint.sh ;; eval) echo "eval \"$yyy=$zzz\"" >> posthint.sh ;; prepend) echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;; undef) case "$zzz" in '') zzz="$uuu" ;; esac echo "$yyy=$zzz" >> posthint.sh ;; *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;; esac shift ;; -V) echo "$me generated by metaconfig -." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; *) break;; esac done case "$error" in true) cat >&2 <&1 case "$silent" in true) exec 1>/dev/null;; esac ?X: Patch from H.Merijn Brand -- 2015-04-19 ?X: The reasoning behind this change is that optdef.sh gets sourced and the ?X: arguments, like prefix, are passed around in different quotation styles ?X: and subshells all around, and the (unescaped) backslash will not be ?X: pertained in the final config.sh ?X: Note that -q is POSIX but to be sure, we also silence all output --RAM touch optdef.sh if grep -q '\\' optdef.sh >/dev/null 2>&1; then echo "Configure does not support \\ in -D or -U arguments" >&2 exit 1 fi : run the defines and the undefines, if any, but leave the file out there... . ./optdef.sh : create the posthint manipulation script and leave the file out there... ?X: this file will be perused by Oldconfig.U touch posthint.sh dist_3.5-36.001/mcon/U/d_pwrite.U0000644000175000017500000000242712142511050016504 0ustar srivastasrivasta?RCS: $Id: d_pwrite.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_pwrite.U,v $ ?RCS: ?MAKE:d_pwrite: Trylink cat i_unistd ?MAKE: -pick add $@ %< ?S:d_pwrite: ?S: This variable conditionally defines the HAS_PWRITE symbol, which ?S: indicates to the C program that the pwrite() routine is available. ?S:. ?C:HAS_PWRITE : ?C: This symbol, if defined, indicates that the pwrite routine is ?C: available to perform writes on a file descriptor at a given offset. ?C:. ?H:#$d_pwrite HAS_PWRITE /**/ ?H:. ?LINT:set d_pwrite : see if pwrite exists $cat >try.c < #$i_unistd I_UNISTD #ifdef I_UNISTD #include #endif int main(void) { static ssize_t ret; static int fd; static char buf[1]; static size_t size; static off_t offset; ret |= pwrite(fd, buf, size, offset); return ret ? 0 : 1; } EOC cyn=pwrite set d_pwrite eval $trylink dist_3.5-36.001/mcon/U/d_sockaddr_in_sin_len.U0000644000175000017500000000274012142511050021157 0ustar srivastasrivasta?RCS: $Id: d_sockaddr_in_sin_len.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_sockaddr_in_sin_len: Trylink cat i_arpainet i_syssock i_winsock2 i_niin ?MAKE: -pick add $@ %< ?S:d_sockaddr_in_sin_len: ?S: This variable conditionally defines the HAS_SOCKADDR_IN_SIN_LEN symbol, ?S: indicates to the C program that struct sockaddr_in has a member named ?S: "sin_len". ?S:. ?C:HAS_SOCKADDR_IN_SIN_LEN: ?C: This symbol is defined if struct sockaddr_in has sin_len. ?C:. ?H:#$d_sockaddr_in_sin_len HAS_SOCKADDR_IN_SIN_LEN ?H:. ?LINT: set d_sockaddr_in_sin_len : does struct sockaddr_in has sin_len $cat >try.c < #ifdef I_SYS_SOCKET #include #endif #ifdef I_NETINET_IN #include #endif #ifdef I_ARPA_INET #include #endif #ifdef I_WINSOCK2 #include #endif int main(void) { static struct sockaddr_in addr; addr.sin_len = 1; return 0; } EOC cyn="whether 'struct sockaddr_in' has a 'sin_len' member" set d_sockaddr_in_sin_len eval $trylink dist_3.5-36.001/mcon/U/d_nolnbuf.U0000644000175000017500000000467512142511050016644 0ustar srivastasrivasta?RCS: $Id: d_nolnbuf.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_nolnbuf.U,v $ ?RCS: Revision 3.0.1.1 1994/05/06 14:46:07 ram ?RCS: patch23: avoid looping in the "see that again?" prompt (WED) ?RCS: ?RCS: Revision 3.0 1993/08/18 12:06:43 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_nolnbuf: test +cc cat rm Setvar Myread ?MAKE: -pick add $@ %< ?S:d_nolnbuf: ?S: This variable conditionally defines the NOLINEBUF symbol, which ?S: indicates to the C program that stdout is not buffered, so that ?S: the program can call setbuf() or setlinebuf() for efficiency. ?S:. ?C:NOLINEBUF: ?C: This symbol, if defined, indicates that stdout is not buffered, so that ?C: the program can call setbuf() or setlinebuf() for efficiency. ?C:. ?H:#$d_nolnbuf NOLINEBUF /**/ ?H:. ?T:xxx ?F:!blurfl ?LINT:set d_nolnbuf : check for buffering of stdout echo " " case "$d_nolnbuf" in '') $cat <<'EOT' >blurfl.c #include int main() { int i; for (i = 0; i < 5; i++) { putchar(i+'a'); sleep(1); } putchar('\n'); } EOT $cc -o blurfl blurfl.c >/dev/null 2>&1; $rm -f blurfl.c $cat >&4 <<'EOM' Checking for buffering of stdout to terminal. Observe the following characters as they are printed out, to see whether they print out all at once, or with a 1 second pause between each of them. If they print out one by one, you don't have buffering. If they print together (after about a 5 second pause), you do have buffering. EOM dflt='Type return to start printing the test characters' rp='' . ./myread xxx=y while $test "$xxx" = 'y'; do ./blurfl 1>&4 dflt=n rp='Would you like to see that again?' . ./myread case "$ans" in [yY]*) xxx="y";; *) xxx="n";; esac done dflt=y rp="Do you have buffering (printed all at once)?" . ./myread case "$ans" in n*) val="$define";; *) val="$undef";; esac ;; *) case "$d_nolnbuf" in "$define") dflt=n;; *) dflt=y;; esac rp="Do you have buffering on stdout to terminals?" . ./myread case "$ans" in n*) val="$define";; *) val="$undef";; esac ;; esac set d_nolnbuf eval $setvar dist_3.5-36.001/mcon/U/h_sysfile.U0000644000175000017500000000145212142511050016651 0ustar srivastasrivasta?RCS: $Id: h_sysfile.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: h_sysfile.U,v $ ?RCS: Revision 3.0 1993/08/18 12:08:13 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:h_sysfile: Nothing ?MAKE: -pick add $@ %< ?S:h_sysfile: ?S: This is variable gets set in various places to tell i_sys_file that ?S: should be included. ?S:. : Initialize h_sysfile h_sysfile=false dist_3.5-36.001/mcon/U/locdist.U0000644000175000017500000001246512142511050016333 0ustar srivastasrivasta?RCS: $Id: locdist.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: locdist.U,v $ ?RCS: Revision 3.0.1.1 1994/05/06 15:09:20 ram ?RCS: patch23: added support for multi-state regions (WED) ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:06 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:locdist orgdist citydist statedist multistatedist cntrydist contdist: \ test newslibexp cat Myread Oldconfig ?MAKE: -pick add $@ %< ?S:locdist: ?S: This variable contains the eventual value of the LOCDIST symbol, ?S: which is the local organization's distribution name for news. ?S:. ?S:orgdist: ?S: This variable contains the eventual value of the ORGDIST symbol, ?S: which is the organization's distribution name for news. ?S:. ?S:citydist: ?S: This variable contains the eventual value of the CITYDIST symbol, ?S: which is the city's distribution name for news. ?S:. ?S:statedist: ?S: This variable contains the eventual value of the STATEDIST symbol, ?S: which is the state's or province's distribution name for news. ?S:. ?S:multistatedist: ?S: This variable contains the eventual value of the MULTISTATEDIST symbol, ?S: which is the news distribution code for multi-state region. ?S:. ?S:cntrydist: ?S: This variable contains the eventual value of the CNTRYDIST symbol, ?S: which is the country's distribution name for news. ?S:. ?S:contdist: ?S: This variable contains the eventual value of the CONTDIST symbol, ?S: which is the continent's distribution name for news. ?S:. ?C:LOCDIST: ?C: This symbol contains the distribution name for the news system that ?C: restricts article distribution to the local organization. ?C:. ?C:ORGDIST: ?C: This symbol contains the distribution name for the news system that ?C: restricts article distribution to the organization. ?C:. ?C:CITYDIST: ?C: This symbol contains the distribution name for the news system that ?C: restricts article distribution to the city. ?C:. ?C:STATEDIST: ?C: This symbol contains the distribution name for the news system that ?C: restricts article distribution to the state or province. ?C:. ?C:MULTISTATEDIST: ?C: This symbol contains the distribution name for the news system that ?C: restricts article distribution to a multi-state region. ?C:. ?C:CNTRYDIST: ?C: This symbol contains the distribution name for the news system that ?C: restricts article distribution to the country. ?C:. ?C:CONTDIST: ?C: This symbol contains the distribution name for the news system that ?C: restricts article distribution to the continent. ?C:. ?H:#define LOCDIST "$locdist" /**/ ?H:#define ORGDIST "$orgdist" /**/ ?H:#define CITYDIST "$citydist" /**/ ?H:#define MULTISTATEDIST "$multistatedist" /**/ ?H:#define STATEDIST "$statedist" /**/ ?H:#define CNTRYDIST "$cntrydist" /**/ ?H:#define CONTDIST "$contdist" /**/ ?H:. : get the local distributions $cat <<'EOH' Distribution groups are the things you use on the Distribution line to limit where an article will go to. You are likely to be a member of several distribution groups, such as organization, city, state, province, country, continent, etc. For example, Los Angeles has the distribution code "la", New Jersey has the code "nj", and Europe has the code "eunet". The categories you will be asked are: local organization (Could be just one machine or a cluster or an office) organization att, dec, kgb, ... city la, ny, mosc, ... state/province ca, nj, bc, ... multi-state region pnw, ne, ... country usa, can, rok, whatever continent na (North America), asia, etc. EOH if $test -f $newslibexp/distributions; then case "$silent" in true) ;; *) dflt='Hit return to continue' rp='' . ./myread ;; esac echo "Here is your distributions file:" >&4 echo " " >&4 $cat >&4 $newslibexp/distributions echo " " >&4 fi echo "Use 'none' for any distributions you don't have." echo " " case "$locdist" in '') dflt="none";; *) dflt="$locdist";; esac rp="What is the distribution code for your local organization?" . ./myread locdist="$ans" case "$orgdist" in '') dflt="none";; *) dflt="$orgdist";; esac rp="What is the distribution code for your organization?" . ./myread orgdist="$ans" case "$citydist" in '') dflt="none";; *) dflt="$citydist";; esac rp="What is the distribution code for your city?" . ./myread citydist="$ans" case "$statedist" in '') dflt="none";; *) dflt="$statedist";; esac rp="What is the distribution code for your state/province?" . ./myread statedist="$ans" case "$multistatedist" in '') dflt="none";; *) dflt="$multistatedist";; esac rp="What is the distribution code for your multi-state region?" . ./myread multistatedist="$ans" case "$cntrydist" in '') dflt="none";; *) dflt="$cntrydist";; esac rp="What is the distribution code for your country?" . ./myread cntrydist="$ans" case "$contdist" in '') dflt="none";; *) dflt="$contdist";; esac rp="What is the distribution code for your continent?" . ./myread contdist="$ans" $cat <<'EOM' If you have any other distribution groups you will need to edit Pnews and newsetup to add them. EOM dist_3.5-36.001/mcon/U/d_getpwent.U0000644000175000017500000000235012142511050017022 0ustar srivastasrivasta?RCS: $Id: d_getpwent.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_getpwent.U,v $ ?RCS: Revision 3.0 1993/08/18 12:06:17 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_getpwent: Trylink cat ?MAKE: -pick add $@ %< ?S:d_getpwent: ?S: This variable conditionally defines the HAS_GETPWENT symbol, which ?S: indicates to the C program that it should use the getpwent() ?S: routine instead of the getpw() routine. ?S:. ?C:HAS_GETPWENT (GETPWENT): ?C: This symbol, if defined, indicates that the getpwent() routine ?C: should be used instead of the getpw() routine. ?C:. ?H:#$d_getpwent HAS_GETPWENT /**/ ?H:. ?LINT:set d_getpwent : see if there is a getpwent $cat >try.c < int main(void) { struct passwd pw; pw = *getpwent(); return pw.pw_name ? 0 : 1; } EOC cyn=getpwent set d_getpwent eval $trylink dist_3.5-36.001/mcon/U/d_regparm.U0000644000175000017500000000236212142511050016625 0ustar srivastasrivasta?RCS: $Id: d_regparm.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_regparm: Myread Setvar cat rm cc ccflags ldflags gccversion ?MAKE: -pick add $@ %< ?S:d_regparm: ?S: This variable conditionally defines the HAS_REGPARM symbol, which ?S: indicates to the C program that attribute regparm is available. ?S:. ?C:HAS_REGPARM: ?C: This symbol is defined when __attribute__((__regparm__(n))) can be used. ?C:. ?H:#$d_regparm HAS_REGPARM ?H:. ?LINT:set d_regparm : check whether '__attribute__((__regparm__(n)))' can be used val="$undef" if [ "x$gccversion" != x ] then $cat >try.c <<'EOC' static __attribute__((__regparm__(1))) int blah(int x) { return x / 2; } int main(int argc, char *argv[]) { (void) argv; return blah(argc); } EOC if $cc $ccflags -Werror $ldflags -o try try.c >/dev/null 2>&1 then val="$define" fi $rm -rf try try.* fi set d_regparm eval $setvar dist_3.5-36.001/mcon/U/d_tminsys.U0000644000175000017500000000266712142511050016706 0ustar srivastasrivasta?RCS: $Id: d_tminsys.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_tminsys.U,v $ ?RCS: Revision 3.0 1993/08/18 12:07:47 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_tminsys: contains Setvar Findhdr ?MAKE: -pick add $@ %< ?S:d_tminsys: ?S: This variable conditionally defines TM_IN_SYS if this system ?S: declares "struct tm" in rather than . ?S:. ?C:TM_IN_SYS (TMINSYS): ?C: This symbol is defined if this system declares "struct tm" in ?C: in rather than . We can't just say ?C: -I/usr/include/sys because some systems have both time files, and ?C: the -I trick gets the wrong one. ?C:. ?H:#$d_tminsys TM_IN_SYS /**/ ?H:. ?LINT:set d_tminsys : see if struct tm is defined in sys/time.h echo " " if $contains 'struct tm' `./findhdr time.h` >/dev/null 2>&1 ; then echo "You have struct tm defined in rather than ." >&4 val="$undef" else echo "You have struct tm defined in rather than ." >&4 val="$define" fi set d_tminsys eval $setvar dist_3.5-36.001/mcon/U/d_locale_charset.U0000644000175000017500000000216612142511050020142 0ustar srivastasrivasta?RCS: $Id: d_locale_charset.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_locale_charset: Trylink cat i_libcharset ?MAKE: -pick add $@ %< ?S:d_locale_charset: ?S: This variable conditionally defines the HAS_LOCALE_CHARSET symbol, which ?S: indicates to the C program that locale_charset() support is available. ?S:. ?C:HAS_LOCALE_CHARSET: ?C: This symbol is defined when locale_charset() can be used. ?C:. ?H:#$d_locale_charset HAS_LOCALE_CHARSET ?H:. ?LINT: set d_locale_charset : can we use locale_charset? $cat >try.c < #endif int main(void) { static char ret; ret |= *locale_charset(); return ret ? 0 : 1; } EOC cyn=locale_charset set d_locale_charset eval $trylink dist_3.5-36.001/mcon/U/sh.U0000644000175000017500000000527012142511050015300 0ustar srivastasrivasta?RCS: $Id: sh.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1997, Chip Salzenberg ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: sh.U,v $ ?RCS: Revision 3.0.1.1 1997/02/28 16:20:13 ram ?RCS: patch61: created ?RCS: ?MAKE:sh: Head ?MAKE: -pick wipe $@ %< ?S:sh: ?S: This variable contains the full pathname of the shell used ?S: on this system to execute Bourne shell scripts. Usually, this will be ?S: /bin/sh, though it's possible that some systems will have /bin/ksh, ?S: /bin/pdksh, /bin/ash, /bin/bash, or even something such as ?S: D:/bin/sh.exe. ?S: This unit comes before Options.U, so you can't set sh with a -D ?S: option, though you can override this (and startsh) ?S: with -O -Dsh=/bin/whatever -Dstartsh=whatever ?S:. ?C:SH_PATH: ?C: This symbol contains the full pathname to the shell used on this ?C: on this system to execute Bourne shell scripts. Usually, this will be ?C: /bin/sh, though it's possible that some systems will have /bin/ksh, ?C: /bin/pdksh, /bin/ash, /bin/bash, or even something such as ?C: D:/bin/sh.exe. ?C:. ?H:#define SH_PATH "$sh" /**/ ?H:. ?T:xxx try pth p SYSTYPE ?LINT:extern maintloc maintname ?X: ?X: Be quiet unless something unusual happens because this gets ?X: loaded up even before options are processed. ?X: Can't use ./loc because that depends on startsh, which, in turn ?X: depends on this unit. ?X: : Find the basic shell for Bourne shell scripts case "$sh" in '') ?X: SYSTYPE is for some older MIPS systems. ?X: I do not know if it is still needed. case "$SYSTYPE" in *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";; *) xxx='/bin/sh';; esac if test -f "$xxx"; then sh="$xxx" else : Build up a list and do a single loop so we can 'break' out. pth=`echo $PATH | sed -e "s/$p_/ /g"` for xxx in sh bash ksh pdksh ash; do for p in $pth; do try="$try ${p}/${xxx}" done done for xxx in $try; do if test -f "$xxx"; then sh="$xxx" break elif test -f "$xxx$_exe"; then sh="$xxx$_exe" break elif test -f "$xxx.exe"; then sh="$xxx.exe" break fi done fi ;; esac ?X: fd 4 isn't open yet... case "$sh" in '') cat >&2 <) at <$maintloc> and we'll try to straighten this all out. EOM exit 1 ;; esac dist_3.5-36.001/mcon/U/d_dirent_d_type.U0000644000175000017500000000273212514132114020025 0ustar srivastasrivasta?RCS: $Id: d_dirent_d_type.U 185 2015-04-17 07:20:44Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_dirent_d_type: Trylink cat i_dirent ?MAKE: -pick add $@ %< ?S:d_dirent_d_type: ?S: This variable conditionally defines the HAS_DIRENT_D_TYPE symbol, ?S: which indicates to the C program that struct dirent has an ?S: integer member d_type. ?S:. ?C:HAS_DIRENT_D_TYPE: ?C: This symbol, if defined, indicates that struct dirent has an ?C: integer member d_type. Note that DT_WHT is BSD-specific and may ?C: not be available. If DT_UNKNOWN is returned, the filesystem does ?C: not fill d_type even though it is present in the dir entry. ?C:. ?H:#$d_dirent_d_type HAS_DIRENT_D_TYPE /**/ ?H:. ?LINT:set d_dirent_d_type : check whether struct dirent has a member d_type. $cat >try.c < #$i_dirent I_DIRENT #ifdef I_DIRENT #include #endif int main(void) { static struct dirent dir_entry; dir_entry.d_type |= 1 | DT_UNKNOWN | DT_FIFO | DT_CHR | DT_DIR | DT_BLK | DT_REG | DT_LNK | DT_SOCK; return 0; } EOC cyn="whether struct dirent has a d_type member" set d_dirent_d_type eval $trylink dist_3.5-36.001/mcon/U/d_waitpid.U0000644000175000017500000000247112142511050016632 0ustar srivastasrivasta?RCS: $Id: d_waitpid.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_waitpid.U,v $ ?RCS: Revision 3.0 1993/08/18 12:08:02 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_waitpid: Trylink cat i_syswait ?MAKE: -pick add $@ %< ?S:d_waitpid: ?S: This variable conditionally defines HAS_WAITPID if waitpid() is ?S: available to wait for child process. ?S:. ?C:HAS_WAITPID (WAITPID): ?C: This symbol, if defined, indicates that the waitpid routine is ?C: available to wait for child process. ?C:. ?H:#$d_waitpid HAS_WAITPID /**/ ?H:. ?LINT:set d_waitpid : see if waitpid exists $cat >try.c < #$i_syswait I_SYS_WAIT #ifdef I_SYS_WAIT #include #endif int main(void) { static pid_t ret, pid; static int status, options; options |= WNOHANG; options |= WUNTRACED; ret |= waitpid(pid, &status, options); return ret ? 0 : 1; } EOC cyn=waitpid set d_waitpid eval $trylink dist_3.5-36.001/mcon/U/d_srandom.U0000644000175000017500000000200512142511050016625 0ustar srivastasrivasta?RCS: $Id: d_srandom.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_srandom: Trylink cat i_stdlib ?MAKE: -pick add $@ %< ?S:d_srandom: ?S: This variable conditionally defines the HAS_SRANDOM symbol, which ?S: indicates to the C program that the srandom() routine is available. ?S:. ?C:HAS_SRANDOM: ?C: This symbol, if defined, indicates that the srandom routine is ?C: available. ?C:. ?H:#$d_srandom HAS_SRANDOM /**/ ?H:. ?LINT:set d_srandom : see if srandom exists $cat >try.c < #endif int main(void) { srandom(1UL); return 0; } EOC cyn=srandom set d_srandom eval $trylink dist_3.5-36.001/mcon/U/d_memchr.U0000644000175000017500000000243312142511050016442 0ustar srivastasrivasta?RCS: $Id: d_memchr.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_memchr.U,v $ ?RCS: Revision 3.0 1993/08/18 12:06:32 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_memchr: Trylink cat ?MAKE: -pick add $@ %< ?S:d_memchr: ?S: This variable conditionally defines the HAS_MEMCHR symbol, which ?S: indicates to the C program that the memchr() routine is available ?S: to scan a block of memory for a character. ?S:. ?C:HAS_MEMCHR: ?C: This symbol, if defined, indicates that the memchr routine is available ?C: to scan a block of memory for a character. If undefined, roll your own. ?C:. ?H:#$d_memchr HAS_MEMCHR /**/ ?H:. ?LINT:set d_memchr : see if memchr exists $cat >try.c < int main(void) { static char s[] = "xxx"; static size_t n = sizeof(s); void *p; p = memchr(s, 'x', n); return p ? 0 : 1; } EOC cyn=memchr set d_memchr eval $trylink dist_3.5-36.001/mcon/U/d_getifaddrs.U0000644000175000017500000000264112142511050017304 0ustar srivastasrivasta?RCS: $Id: d_getifaddrs.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_getifaddrs: Trylink cat i_netif ?MAKE: -pick add $@ %< ?S:d_getifaddrs: ?S: This variable conditionally defines the HAS_GETIFADDRS symbol, which ?S: indicates to the C program that getifaddrs() support is available. ?S:. ?C:HAS_GETIFADDRS: ?C: This symbol is defined when getifaddrs() and freeifaddrs() can be used. ?C:. ?H:#$d_getifaddrs HAS_GETIFADDRS ?H:. ?LINT: set d_getifaddrs : can we use getifaddrs? $cat >try.c < #include #$i_netif I_NET_IF #ifdef I_NET_IF #include #endif #include int main(void) { struct ifaddrs *ifa0, *ifa; static int ret; ret |= getifaddrs(&ifa0); for (ifa = ifa0; ifa; ifa = ifa->ifa_next) { (void) ifa->ifa_flags; (void) ifa->ifa_addr; (void) ifa->ifa_addr->sa_family; (void) ifa->ifa_netmask; if ((IFF_LOOPBACK | IFF_UP | IFF_RUNNING) & ifa->ifa_flags) break; } freeifaddrs(ifa0); return 0; } EOC cyn=getifaddrs set d_getifaddrs eval $trylink dist_3.5-36.001/mcon/U/d_fstatat.U0000644000175000017500000000230312514735442016651 0ustar srivastasrivasta?RCS: ?RCS: Copyright (c) 2015 Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_fstatat: Trylink cat i_sysstat ?MAKE: -pick add $@ %< ?S:d_fstatat: ?S: This variable conditionally defines HAS_FSTATAT if fstatat() is ?S: available to do file stats with a relative path interepreted in ?S: the context of an opened directory. ?S:. ?C:HAS_FSTATAT: ?C: This symbol, if defined, indicates that the fstatat() routine is ?C: available to do file stats with a relative path interepreted in ?C: the context of an opened directory. ?C:. ?H:#$d_fstatat HAS_FSTATAT /**/ ?H:. ?LINT:set d_fstatat : see if fstatat exists $cat >try.c < /* AT_* constants */ #ifdef I_SYS_STAT #include #endif int main(void) { static int ret; struct stat sb; ret |= fstatat(AT_FDCWD, "path", &sb, 0); return ret ? 0 : 1; } EOC cyn=fstatat set d_fstatat eval $trylink dist_3.5-36.001/mcon/U/i_sysfile.U0000644000175000017500000000324012142511050016647 0ustar srivastasrivasta?RCS: $Id: i_sysfile.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: i_sysfile.U,v $ ?RCS: Revision 3.0.1.2 1995/07/25 14:11:36 ram ?RCS: patch56: removed <> characters from comment, per metalint suggestion ?RCS: ?RCS: Revision 3.0.1.1 1993/08/25 14:01:23 ram ?RCS: patch6: added default for i_sysfile ?RCS: ?RCS: Revision 3.0 1993/08/18 12:08:31 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:i_sysfile: h_sysfile Inhdr Setvar ?MAKE: -pick add $@ %< ?S:i_sysfile: ?S: This variable conditionally defines the I_SYS_FILE symbol, and indicates ?S: whether a C program should include to get R_OK and friends. ?S:. ?C:I_SYS_FILE (I_SYSFILE): ?C: This symbol, if defined, indicates to the C program that it should ?C: include to get definition of R_OK and friends. ?C:. ?H:#$i_sysfile I_SYS_FILE /**/ ?H:. ?T:val ?D:i_sysfile='' ?LINT:change h_sysfile ?LINT:set i_sysfile : see if this is a sys/file.h system val='' set sys/file.h val eval $inhdr : do we need to include sys/file.h ? case "$val" in "$define") echo " " if $h_sysfile; then val="$define" echo "We'll be including ." >&4 else val="$undef" echo "We won't be including ." >&4 fi ;; *) h_sysfile=false ;; esac set i_sysfile eval $setvar dist_3.5-36.001/mcon/U/newslib.U0000644000175000017500000000346512142511050016335 0ustar srivastasrivasta?RCS: $Id: newslib.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: newslib.U,v $ ?RCS: Revision 3.0 1993/08/18 12:09:23 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:newslib newslibexp: test inews Oldconfig Getfile ?MAKE: -pick add $@ %< ?S:newslib: ?S: This variable contains the eventual value of the NEWSLIB symbol, ?S: which holds the name of the directory serving as the news library. ?S: It may have a ~ on the front. See newslibexp for expanded version. ?S:. ?S:newslibexp: ?S: This variable contains the ~ expanded name of the news library ?S: directory. See newslib. ?S:. ?C:NEWSLIB: ?C: This symbol contains the name of the directory serving as the news ?C: library. The program must be prepared to do ~ expansion on it. ?C:. ?C:NEWSLIB_EXP: ?C: This symbol is the ~ expanded version of NEWSLIB, for programs that ?C: do not wish to deal with it at run-time. ?C:. ?H:#define NEWSLIB "$newslib" /**/ ?H:#define NEWSLIB_EXP "$newslibexp" /**/ ?H:. ?LINT:change inews : figure out news library case "$newslib" in '') dflt=/usr/lib/news ;; *) dflt=$newslib ;; esac echo " " fn=d~ rp='Where is your news library?' . ./getfile newslib="$ans" newslibexp="$ansexp" if $test -f $newslibexp/inews; then echo "Aha! Inews is really in $newslibexp! Maybe this is 2.10.2..." >&4 case "$inews" in inews) : null ;; *) echo "(Make sure $inews isn't an old version.)";; esac inews=$newslibexp/inews fi dist_3.5-36.001/mcon/U/d_sched_yield.U0000644000175000017500000000201412142511050017436 0ustar srivastasrivasta?RCS: Copyright (c) 2012, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_sched_yield: Trylink cat ?MAKE: -pick add $@ %< ?S:d_sched_yield: ?S: This variable conditionally defines the HAS_SCHED_YIELD symbol, which ?S: indicates to the C program that the sched_yield() routine is available ?S: to yield the CPU. ?S:. ?C:HAS_SCHED_YIELD : ?C: This symbol, if defined, indicates that the sched_yield() routine is ?C: available to yield the CPU. ?C:. ?H:#$d_sched_yield HAS_SCHED_YIELD /**/ ?H:. ?LINT:set d_sched_yield : see if sched_yield exists $cat >try.c < int main(void) { static int ret; ret |= sched_yield(); return ret ? 0 : 1; } EOC cyn=sched_yield set d_sched_yield eval $trylink dist_3.5-36.001/mcon/U/d_safemcpy.U0000644000175000017500000000674012142511050017003 0ustar srivastasrivasta?RCS: $Id: d_safemcpy.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_safemcpy.U,v $ ?RCS: Revision 3.0.1.5 1997/02/28 15:41:12 ram ?RCS: patch61: improved overlapping copy check ?RCS: patch61: comfort them if they have memmove ?RCS: patch61: added ?F: metalint hint ?RCS: ?RCS: Revision 3.0.1.4 1995/07/25 13:58:46 ram ?RCS: patch56: re-arranged compile line to include ldflags before objects ?RCS: ?RCS: Revision 3.0.1.3 1995/03/21 08:47:26 ram ?RCS: patch52: swapped two first arguments of memcpy() calls ?RCS: ?RCS: Revision 3.0.1.2 1994/10/29 16:15:10 ram ?RCS: patch36: added 'ldflags' to the test compile line (ADO) ?RCS: ?RCS: Revision 3.0.1.1 1994/05/06 14:53:12 ram ?RCS: patch23: ensure string is not optimized in read-only memory (ADO) ?RCS: ?RCS: Revision 3.0 1993/08/18 12:06:58 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_safemcpy: cat d_memcpy +cc +optimize +ccflags +libs +ldflags rm \ d_memmove i_memory i_stdlib i_string i_unistd Oldconfig Setvar ?MAKE: -pick add $@ %< ?S:d_safemcpy: ?S: This variable conditionally defines the HAS_SAFE_MEMCPY symbol if ?S: the memcpy() routine can do overlapping copies. ?S:. ?C:HAS_SAFE_MEMCPY (SAFE_MEMCPY): ?C: This symbol, if defined, indicates that the memcpy routine is available ?C: to copy potentially overlapping memory blocks. Otherwise you should ?C: probably use memmove() or memcpy(). If neither is defined, roll your ?C: own version. ?C:. ?H:#$d_safemcpy HAS_SAFE_MEMCPY /**/ ?H:. ?F:!safemcpy ?LINT: set d_safemcpy : can memcpy handle overlapping blocks? ?X: assume the worst val="$undef" case "$d_memcpy" in "$define") echo " " echo "Checking to see if your memcpy() can do overlapping copies..." >&4 $cat >foo.c <>foo.c <<'EOCP' #include #ifdef I_MEMORY # include #endif #ifdef I_STDLIB # include #endif #ifdef I_STRING # include #else # include #endif #ifdef I_UNISTD # include /* Needed for NetBSD */ #endif int main() { char buf[128], abc[128]; char *b; int len; int off; int align; /* Copy "abcde..." string to char abc[] so that gcc doesn't try to store the string in read-only memory. */ memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36); for (align = 7; align >= 0; align--) { for (len = 36; len; len--) { b = buf+align; memcpy(b, abc, len); for (off = 1; off <= len; off++) { memcpy(b+off, b, len); memcpy(b, b+off, len); if (memcmp(b, abc, len)) exit(1); } } } exit(0); } EOCP if $cc $optimize $ccflags $ldflags \ -o safemcpy foo.c $libs >/dev/null 2>&1; then if ./safemcpy 2>/dev/null; then echo "Yes, it can." val="$define" else echo "It can't, sorry." case "$d_memmove" in "$define") echo "But that's Ok since you have memmove()." ;; esac fi else echo "(I can't compile the test program, so we'll assume not...)" case "$d_memmove" in "$define") echo "But that's Ok since you have memmove()." ;; esac fi ;; esac $rm -f foo.* safemcpy core set d_safemcpy eval $setvar dist_3.5-36.001/mcon/U/d_getaddrinfo.U0000644000175000017500000000374012210146263017465 0ustar srivastasrivasta?RCS: $Id: d_getaddrinfo.U 170 2013-08-30 16:47:47Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_getaddrinfo: Trylink cat i_arpainet i_netdb i_syssock \ i_winsock2 i_ws2tcpip i_niin d_windows ?MAKE: -pick add $@ %< ?S:d_getaddrinfo: ?S: This variable conditionally defines the HAS_GETADDRINFO symbol, which ?S: indicates to the C program that the getaddrinfo() routine is available. ?S:. ?C:HAS_GETADDRINFO: ?C: This symbol is defined when getaddrinfo() can be used. ?C:. ?H:#$d_getaddrinfo HAS_GETADDRINFO ?H:. ?LINT: set d_getaddrinfo : can we use getaddrinfo? $cat >try.c < #ifdef I_SYS_SOCKET #include #endif #ifdef I_NETINET_IN #include #endif #ifdef I_ARPA_INET #include #endif #ifdef I_NETDB #include #endif #ifdef I_WINSOCK2 #include #endif #ifdef I_WS2TCPIP #include #endif int main(void) { struct addrinfo hints, *res; int ret; hints.ai_flags = 1; hints.ai_family = PF_UNSPEC; hints.ai_socktype = 1; hints.ai_protocol = 1; hints.ai_addrlen = (socklen_t) 1; hints.ai_canonname = "canonname"; hints.ai_addr = (struct sockaddr *) 0; hints.ai_next = (struct addrinfo *) 0; ret = getaddrinfo("localhost", "www", &hints, &res); if (0 != ret) { const char *s; s = gai_strerror(ret); (void) s; } if (res) freeaddrinfo(res); return 0; } EOC cyn=getaddrinfo set d_getaddrinfo '-lWs2_32' eval $trylink dist_3.5-36.001/mcon/U/charorder.U0000644000175000017500000000727712142511050016650 0ustar srivastasrivasta?RCS: $Id: charorder.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: charorder.U,v $ ?RCS: Revision 3.0.1.1 1994/10/29 16:07:08 ram ?RCS: patch36: added ?F: line for metalint file checking ?RCS: ?RCS: Revision 3.0 1993/08/18 12:05:33 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:chorder_int chorder_short chorder_long: Myread cat +cc +ccflags rm ?MAKE: -pick add $@ %< ?S:chorder_short (d_cos d_bos): ?S: Holds the value describing the byte ordering of characters in a short. ?S: On a Big-Endian machine, that would be "c0c1". ?S:. ?S:chorder_int (charoder): ?S: Holds the value describing the byte ordering of characters in an int. ?S: For instance, on a Big-Endian machine, this would be: "c0c1c2c3". ?S:. ?S:chorder_long (d_col d_bol): ?S: Holds the value describing the byte ordering of characters in a long. ?S: On a 64 bits Big-Endian machine, that would yield: "c0c1c2c3c4c5c6c7". ?S:. ?C:CHAR_ORDER_SHORT: ?C: Holds the byte ordering of characters in a short. It's a string ?C: value like "c0c1" on a Big-Endian machine. ?C:. ?C:CHAR_ORDER_INT: ?C: Holds the byte ordering of characters in an int. It's a string ?C: value like "c0c1c2c3" on a Big-Endian machine. ?C:. ?C:CHAR_ORDER_LONG: ?C: Holds the byte ordering of characters in a long. It's a string ?C: value like "c0c1c2c3c4c5c6c7" on a 64 bits Big-Endian machine. ?C:. ?H:#define CHAR_ORDER_SHORT "$chorder_short" /* byte order in a short */ ?H:#define CHAR_ORDER_INT "$chorder_int" /* byte order in an int */ ?H:#define CHAR_ORDER_LONG "$chorder_long" /* byte order in a long */ ?H:. ?F:!byteorder : check for character ordering echo " " echo "Checking out byte order..." >&4 $cat >byteorder.c <<'EOCP' #include main(argc, argv) int argc; char *argv[]; { int i; int max; union { short u_s; int u_i; long u_l; char u_c[sizeof(long)]; } u; switch (argv[1][0]) { case 'l': u.u_l = 0L; /* HMS: ASSERT: sizeof(long) < 10. */ for(i = 0; i < sizeof(long); ++i) { u.u_l *= 0x100L; u.u_l += (0xc0 + i); } max = sizeof(long); break; case 's': u.u_s = 0; /* HMS: ASSERT: sizeof(short) < 10. */ for(i = 0; i < sizeof(short); ++i) { u.u_s *= 0x100L; u.u_s += (0xc0 + i); } max = sizeof(short); break; case 'i': u.u_i = 0; /* RAM: ASSERT: sizeof(int) < 10. */ for(i = 0; i < sizeof(int); ++i) { u.u_l *= 0x100L; u.u_l += (0xc0 + i); } max = sizeof(int); break; default: max = 0; break; } for(i = 0; i < max; i++) { printf("%x", u.u_c[i] & 0x00FF); } printf("\n"); exit(0); } EOCP if $cc $ccflags -o byteorder byteorder.c >/dev/null 2>&1 ; then : null statement @if chorder_short chorder_short=`./byteorder s` @end @if chorder_int chorder_int=`./byteorder i` @end @if chorder_long chorder_long=`./byteorder l` @end else $cat <&4 val="$define" else echo "You don't have the full shm*(2) library." >&4 val="$undef" fi set d_shm eval $setvar dist_3.5-36.001/mcon/U/Config_sh.U0000644000175000017500000000702112142511050016561 0ustar srivastasrivasta?RCS: $Id: Config_sh.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Config_sh.U,v $ ?RCS: Revision 3.0.1.3 1997/02/28 14:57:53 ram ?RCS: patch61: added support for src.U ?RCS: ?RCS: Revision 3.0.1.2 1995/01/11 14:53:31 ram ?RCS: patch45: moved path stripping from d_portable.U to end of Configure ?RCS: ?RCS: Revision 3.0.1.1 1994/10/29 15:50:37 ram ?RCS: patch36: added ?F: line for metalint file checking ?RCS: ?RCS: Revision 3.0 1993/08/18 12:04:48 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: This unit ends up producing the config.sh script, which contains all the ?X: definitions figured out by Configure. The add.Config_sh command knows ?X: which variables need to be remembered. It also adds the EOT (ends the ?X: here document redirection with variable substitution). ?X: ?MAKE:Config_sh: cf_time cf_by test spitshell startsh myuname Myread \ End Obsol_sh Loc +d_portable package src cat sed ?MAKE: -pick add.Config_sh $@ %< ?MAKE: -pick add $@ ./Obsol_sh ?MAKE: -pick close.Config_sh $@ %< ?F:!config.over !config.arch ?T:file sfile xsed ?LINT:unclosed EOT : back to where it started if test -d ../UU; then cd .. fi : configuration may be unconditionally patched via a 'config.arch' file if $test -f config.arch; then echo "I see a config.arch file, loading it." >&4 . ./config.arch fi : configuration may be patched via a 'config.over' file if $test -f config.over; then echo " " dflt=y rp='I see a config.over file. Do you wish to load it?' . UU/myread case "$ans" in n*) echo "OK, I'll ignore it.";; *) . ./config.over echo "Configuration override changes have been loaded." ;; esac fi @if d_portable : in case they want portability, strip down executable paths ?X: ?X: Strip down paths in located executables. For each file, e.g. vi, there ?X: is a $vi variable whose value is for instance '/usr/bin/vi'. By resetting ?X: $vi to 'vi', we rely on the PATH variable to locate the executable... ?X: In order to allow vi='/usr/bin/nvi' which will strip down to vi='nvi', ?X: we can't just say 'eval $file="\$file"', we have to recourse to sed. ?X: We don't use basename since it is less portable than sed. ?X: case "$d_portable" in "$define") echo " " echo "Stripping down executable paths..." >&4 xsed=$sed for file in $loclist $trylist; do eval sfile="\$$file" sfile=`echo $sfile | $xsed -e 's,.*/\(.*\),\1,'` eval $file="$sfile" done ;; esac @end : create config.sh file echo " " echo "Creating config.sh..." >&4 $spitshell <config.sh $startsh # # This file was produced by running the Configure script. It holds all the # definitions figured out by Configure. Should you modify one of these values, # do not forget to propagate your changes by running "Configure -der". You may # instead choose to run each of the .SH files by yourself, or "Configure -S". # # Package name : $package # Source directory : $src # Configuration time: $cf_time # Configured by : $cf_by # Target system : $myuname EOT ?X: Command line options are saved by the Options.U unit in the ?X: temporary file UU/cmdline.opt $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh $spitshell <>config.sh dist_3.5-36.001/mcon/U/d_system.U0000644000175000017500000000225412142511050016514 0ustar srivastasrivasta?RCS: $Id: d_system.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_system.U,v $ ?RCS: Revision 3.0 1993/08/18 12:07:44 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_system: Trylink cat i_stdlib ?MAKE: -pick add $@ %< ?S:d_system: ?S: This variable conditionally defines HAS_SYSTEM if system() is ?S: available to issue a shell command. ?S:. ?C:HAS_SYSTEM (SYSTEM): ?C: This symbol, if defined, indicates that the system routine is ?C: available to issue a shell command. ?C:. ?H:#$d_system HAS_SYSTEM /**/ ?H:. ?LINT:set d_system : see if system exists $cat >try.c < #endif int main(void) { static int ret; ret |= system("command"); return ret ? 0 : 1; } EOC cyn=system set d_system eval $trylink dist_3.5-36.001/mcon/U/d_bsearch.U0000644000175000017500000000217612630137447016622 0ustar srivastasrivasta?RCS: ?RCS: Copyright (c) 2015 Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_bsearch: Trylink cat ?MAKE: -pick add $@ %< ?S:d_bsearch: ?S: This variable conditionally defines the HAS_BSEARCH symbol, which ?S: indicates to the C program that it can use the bsearch() routine ?S: to perform a binary search on a sorted array. ?S:. ?C:HAS_BSEARCH: ?C: This symbol, if defined, indicates that the bsearch() routine ?C: is available to perform a binary search on a sorted array. ?C:. ?H:#$d_bsearch HAS_BSEARCH /**/ ?H:. ?LINT:set d_bsearch : see if there is a bsearch $cat >try.c < int mycmp(const void *a, const void *b) { return (char *) a - (char *) b; } int main(int argc, char **argv) { return NULL == bsearch("foo", argv, argc, sizeof argv[0], mycmp); } EOC cyn=bsearch set d_bsearch eval $trylink dist_3.5-36.001/mcon/U/d_scorfl.U0000644000175000017500000000351012142511050016454 0ustar srivastasrivasta?RCS: $Id: d_scorfl.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_scorfl.U,v $ ?RCS: Revision 3.0 1993/08/18 12:07:01 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_scorfl: cat Myread Oldconfig nametype Setvar ?MAKE: -pick add $@ %< ?S:d_scorfl: ?S: This variable conditionally defines the SCOREFULL symbol, which ?S: indicates to the C program that any scoreboard kept by the program ?S: should be kept on the basis of the user's full name as opposed to ?S: the user's login name. ?S:. ?C:SCOREFULL: ?C: This symbol, if defined, indicates that any scoreboard kept by the ?C: program should be kept on the basis of the user's full name as opposed ?C: to the user's login name. If the user can change his full name he ?C: can enter multiple scores if this is defined. ?C:. ?H:#$d_scorfl SCOREFULL /**/ ?H:. ?LINT:set d_scorfl : see how they want the scoreboard kept case "$d_scorfl" in "$define") dflt=y ;; *) dflt=n ;; esac case "$nametype" in other) val="$undef" ;; *) $cat <<'EOM' The scoreboard can be kept with one score per login name, or one score per full name. If users can change their full name, or if there is more than one person on your system with the same full name, you should keep the score by login name (the full name is still printed). EOM rp='Do you want the scoreboard kept by full name?' . ./myread case "$ans" in y*) val="$define" ;; *) val="$undef" ;; esac ;; esac set d_scorfl eval $setvar dist_3.5-36.001/mcon/U/d_su_chown.U0000644000175000017500000000257312142511050017021 0ustar srivastasrivasta?RCS: $Id: d_su_chown.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_su_chown.U,v $ ?RCS: Revision 3.0 1993/08/18 12:07:40 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_su_chown: Csym Setvar ?MAKE: -pick add $@ %< ?S:d_su_chown (d_rootchown): ?S: This variable conditionally defines the SU_CHOWN symbol, which ?S: indicates to the C program that only root can chown() the owner ?S: of a file. ?S:. ?C:SU_CHOWN (ROOT_CHOWN): ?C: This symbol, if defined, indicates that the system allows only root ?C: can change the owner of a file with chown(). ?C:. ?H:#$d_su_chown SU_CHOWN /**/ ?H:. ?LINT:set d_su_chown : see if 'chown()' is restricted. : but not too hard, as it is late and I am tired. -- HMS echo " " if set setreuid val -f d_su_chown; eval $csym; $val; then echo 'It looks like only root can chown() the owner of a file.' >&4 val="$define" else echo 'It looks like root or the owner can chown() a file away.' >&4 val="$undef" fi set d_su_chown eval $setvar dist_3.5-36.001/mcon/U/man3dir.U0000644000175000017500000001051112142511050016215 0ustar srivastasrivasta?RCS: $Id: man3dir.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1996, Andy Dougherty ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: man3dir.U,v $ ?RCS: Revision 3.0.1.1 1997/02/28 16:10:34 ram ?RCS: patch61: created ?RCS: ?X: ?X: This was originally specific to perl5. Since perl5 has man pages that ?X: go in both man1/ and man3/ directories, we need both man1dir ?X: and man3dir. This unit is basically dist's mansrc.U with ?X: man3 used instead of man everywhere. ?X: I then added various tests because perl5 has *lots* of man3 ?X: pages with long file names. -- ADO ?X: ?MAKE:man3dir man3direxp man3ext installman3dir: afs cat nroff Loc Oldconfig \ sed man1dir spackage package Getfile prefix Prefixit Prefixup \ d_flexfnam privlib Myread ?MAKE: -pick add $@ %< ?Y:TOP ?S:man3dir: ?S: This variable contains the name of the directory in which manual ?S: source pages are to be put. It is the responsibility of the ?S: Makefile.SH to get the value of this into the proper command. ?S: You must be prepared to do the ~name expansion yourself. ?S:. ?S:man3direxp: ?S: This variable is the same as the man3dir variable, but is filename ?S: expanded at configuration time, for convenient use in makefiles. ?S:. ?S:installman3dir: ?S: This variable is really the same as man3direxp, unless you are using ?S: AFS in which case it points to the read/write location whereas ?S: man3direxp only points to the read-only access location. For extra ?S: portability, you should only use this variable within your makefiles. ?S:. ?S:man3ext: ?S: This variable contains the extension that the manual page should ?S: have: one of 'n', 'l', or '3'. The Makefile must supply the '.'. ?S: See man3dir. ?S:. : determine where library module manual pages go set man3dir man3dir none eval $prefixit $cat <try.c < #endif #ifdef I_SYS_SOCKET #include #endif #ifdef I_WINSOCK2 #include #endif #ifdef I_MSWSOCK #include #endif int main(void) { static struct msghdr msg; int ret, fd, flags; fd = 1; flags = 1; msg.msg_name = (void *) 0; msg.msg_namelen |= 1; msg.msg_iov = (void *) 0; msg.msg_iovlen |= 1; /* msg.msg_flags is intentionally excluded, see other unit */ msg.msg_control = (void *) 0; msg.msg_controllen |= 1; ret = recvmsg(fd, &msg, flags); return ret ? 0 : 1; } EOC cyn='recvmsg' set d_recvmsg eval $trylink dist_3.5-36.001/mcon/U/d_setrlimit.U0000644000175000017500000000243012142511050017200 0ustar srivastasrivasta?RCS: $Id: d_setrlimit.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2012 Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_setrlimit.U,v $ ?RCS: ?MAKE:d_setrlimit: Trylink cat i_systime ?MAKE: -pick add $@ %< ?S:d_setrlimit: ?S: This variable conditionally defines the HAS_SETRLIMIT symbol, which ?S: indicates to the C program that the setrlimit() routine is available ?S: to set process resource limits. ?S:. ?C:HAS_SETRLIMIT : ?C: This symbol, if defined, indicates that the setrlimit() routine is ?C: available to set process resource limits. ?C:. ?H:#$d_setrlimit HAS_SETRLIMIT /**/ ?H:. ?LINT:set d_setrlimit : see if setrlimit exists $cat >try.c < #endif #include int main(void) { static struct rlimit lim; int ret; lim.rlim_cur = 0; lim.rlim_max = 1; ret |= setrlimit(RLIMIT_CORE, &lim); return ret ? 0 : 1; } EOC cyn=setrlimit set d_setrlimit eval $trylink dist_3.5-36.001/mcon/U/d_keepsig.U0000644000175000017500000000455312142511050016623 0ustar srivastasrivasta?RCS: $Id: d_keepsig.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_keepsig.U,v $ ?RCS: Revision 3.0.1.4 1995/07/25 13:57:56 ram ?RCS: patch56: made cc and ccflags optional dependencies ?RCS: ?RCS: Revision 3.0.1.3 1995/01/11 15:26:25 ram ?RCS: patch45: protected "sh -c" within backquotes for Linux and SGI ?RCS: ?RCS: Revision 3.0.1.2 1994/10/29 16:13:59 ram ?RCS: patch36: call ./bsd explicitely instead of relying on PATH ?RCS: ?RCS: Revision 3.0.1.1 1993/10/16 13:48:47 ram ?RCS: patch12: comment for SIGNALS_KEPT was the other way round ?RCS: ?RCS: Revision 3.0 1993/08/18 12:06:26 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_keepsig: cat Compile rm Guess contains echo n c Setvar run ?MAKE: -pick add $@ %< ?S:d_keepsig: ?S: This variable contains the eventual value of the SIGNALS_KEPT symbol, ?S: which indicates to the C program if signal handlers need not reinstated ?S: after receipt of a signal. ?S:. ?C:SIGNALS_KEPT (PERSISTENT_SIGNAL): ?C: This symbol is defined if signal handlers needn't be reinstated after ?C: receipt of a signal. ?C:. ?H:#$d_keepsig SIGNALS_KEPT /**/ ?H:. ?F:!try !try.out ?LINT:set d_keepsig : see if signals are kept val="$undef"; echo " " echo "Checking to see if signal handlers stick around..." >&4 $cat >try.c <<'EOCP' foo() {} int main() { signal(2, foo); kill(getpid(), 2); kill(getpid(), 2); printf("abc\n"); } EOCP set try if eval $compile; then ?X: On AIX a single ./try will not work (with ksh) ?X: Backquotes required on Linux and SGI (prevents "ambiguous output redirect") ?X: (reported by Xavier LeVourch ) echo `sh -c $run ./try >try.out 2>/dev/null` >/dev/null if $contains abc try.out >/dev/null 2>&1; then echo "Yes, they do." val="$define"; else echo "No, they don't." fi else $echo $n "(I can't seem to compile the test program. Assuming $c" if ./bsd; then echo "they do.)" val="$define" else echo "they don't.)" fi fi set d_keepsig eval $setvar $rm -f try* dist_3.5-36.001/mcon/U/longsize.U0000644000175000017500000000154412142511050016520 0ustar srivastasrivasta?RCS: $Id: longsize.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: longsize.U,v $ ?RCS: Revision 3.0.1.2 1997/02/28 16:09:35 ram ?RCS: patch61: code moved to intsize.U ?RCS: ?RCS: Revision 3.0.1.1 1994/10/29 16:24:31 ram ?RCS: patch36: added ?F: line for metalint file checking ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:07 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: 'longsize' is now defined within intsize.U ?X: ?LINT: empty dist_3.5-36.001/mcon/U/d_getnameinfo.U0000644000175000017500000000346512210146263017477 0ustar srivastasrivasta?RCS: $Id: d_getnameinfo.U 170 2013-08-30 16:47:47Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2013, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_getnameinfo: Trylink cat i_arpainet i_netdb i_syssock \ i_winsock2 i_ws2tcpip i_niin d_windows ?MAKE: -pick add $@ %< ?S:d_getnameinfo: ?S: This variable conditionally defines the HAS_GETNAMEINFO symbol, which ?S: indicates to the C program that the getnameinfo() routine is available. ?S:. ?C:HAS_GETNAMEINFO: ?C: This symbol is defined when getnameinfo() can be used. ?C:. ?H:#$d_getnameinfo HAS_GETNAMEINFO ?H:. ?LINT: set d_getnameinfo : can we use getnameinfo? $cat >try.c < #ifdef I_SYS_SOCKET #include #endif #ifdef I_NETINET_IN #include #endif #ifdef I_ARPA_INET #include #endif #ifdef I_NETDB #include #endif #ifdef I_WINSOCK2 #include #endif #ifdef I_WS2TCPIP #include #endif int main(void) { int ret; static struct sockaddr sa; socklen_t salen; char host[NI_MAXHOST]; char serv[NI_MAXSERV]; salen = sizeof(sa); ret = getnameinfo(&sa, salen, host, sizeof host, serv, sizeof serv, NI_NAMEREQD | NI_DGRAM | NI_NOFQDN | NI_NUMERICHOST | NI_NUMERICSERV); return 0 == ret; } EOC cyn=getnameinfo set d_getnameinfo '-lWs2_32' eval $trylink dist_3.5-36.001/mcon/U/d_dlerror.U0000644000175000017500000000275412142511050016646 0ustar srivastasrivasta?RCS: $Id: d_dlerror.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Andy Dougherty ?RCS: ?RCS: $Log: d_dlerror.U,v $ ?RCS: Revision 3.0.1.2 1995/07/25 13:52:49 ram ?RCS: patch56: force compile-link test since symbol might lie in crt0.o (ADO) ?RCS: ?RCS: Revision 3.0.1.1 1994/10/29 16:11:23 ram ?RCS: patch36: created by ADO ?RCS: ?MAKE:d_dlerror: Trylink cat i_dlfcn ?MAKE: -pick add $@ %< ?S:d_dlerror: ?S: This variable conditionally defines the HAS_DLERROR symbol, which ?S: indicates to the C program that the dlerror() routine is available. ?S:. ?C:HAS_DLERROR : ?C: This symbol, if defined, indicates that the dlerror routine is ?C: available to return a string describing the last error that ?C: occurred from a call to dlopen(), dlclose() or dlsym(). ?C:. ?H:#$d_dlerror HAS_DLERROR /**/ ?H:. ?LINT:set d_dlerror : see if dlerror exists $cat >try.c < #endif int main(void) { static char ret; ret |= *dlerror(); return ret ? 0 : 1; } EOC cyn=dlerror set d_dlerror '-ldl' eval $trylink dist_3.5-36.001/mcon/U/Setvar.U0000644000175000017500000000320712142511050016130 0ustar srivastasrivasta?RCS: $Id: Setvar.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Setvar.U,v $ ?RCS: Revision 3.0.1.1 1994/10/29 15:58:28 ram ?RCS: patch36: call ./whoa explicitely instead of relying on PATH ?RCS: ?RCS: Revision 3.0 1993/08/18 12:05:16 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: This unit produces a variable that is intended to be eval'ed in ?X: order to define/undefine a symbol. A consistency check is made ?X: regarding any previous value and a warning is issued if there ?X: is any discrepancy. ?X: ?X: To use it, say: ?X: val= ?X: set d_variable ?X: eval $setvar ?X: ?MAKE:Setvar: Whoa ?MAKE: -pick add $@ %< ?LINT:define setvar ?S:setvar: ?S: This shell variable is used internally by Configure to set a value ?S: to a given symbol that is defined or not. A typical use is: ?S: val= ?S: set d_variable ?S: eval $setvar ?S: That will print a message in case the $val value is not the same ?S: as the previous value of $d_variable. ?S:. ?V:setvar:val ?T:var was td tu : function used to set '$1' to '$val' setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef; case "$val$was" in $define$undef) . ./whoa; eval "$var=\$td";; $undef$define) . ./whoa; eval "$var=\$tu";; *) eval "$var=$val";; esac' dist_3.5-36.001/mcon/U/active.U0000644000175000017500000000314412142511050016137 0ustar srivastasrivasta?RCS: $Id: active.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: active.U,v $ ?RCS: Revision 3.0 1993/08/18 12:05:21 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:active activeexp: newslib Oldconfig Getfile ?MAKE: -pick add $@ %< ?S:active: ?S: The name of the active file for the news system. This file contains ?S: the list of active newsgroups. The name may have ~ on the front. ?S: The variable myactive is the expanded form. ?S:. ?S:activeexp (myactive): ?S: This is the same as the active variable, but is filename expanded ?S: so that later Configure units can look at the active file if desired. ?S:. ?C:ACTIVE: ?C: The name of the active file for the news system. This file contains ?C: the list of active newsgroups. The name may have ~ on the front. ?C:. ?C:ACTIVE_EXP: ?C: This is the same as ACTIVE, but is filename expanded at configuration ?C: time, for programs that do not want to deal with it themselves. ?C:. ?H:#define ACTIVE "$active" /**/ ?H:#define ACTIVE_EXP "$activeexp" /**/ ?H:. : locate active file echo " " case "$active" in '') dflt=$newslib/active ;; *) dflt="$active";; esac fn=l~:active rp='Where is the active file?' . ./getfile active="$ans" activeexp="$ansexp" dist_3.5-36.001/mcon/U/libyacc.U0000644000175000017500000000343312142511050016273 0ustar srivastasrivasta?RCS: $Id: libyacc.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: libyacc.U,v $ ?RCS: Revision 3.0.1.4 1997/02/28 16:09:19 ram ?RCS: patch61: replaced .a with $_a all over the place ?RCS: ?RCS: Revision 3.0.1.3 1994/05/13 15:27:12 ram ?RCS: patch27: added byacc case (ADO) ?RCS: ?RCS: Revision 3.0.1.2 1994/05/06 15:09:01 ram ?RCS: patch23: now uses full library path instead of -l notation ?RCS: ?RCS: Revision 3.0.1.1 1994/01/24 14:13:49 ram ?RCS: patch16: un-obsoleted this unit for smooth yacc compilations ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:04 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:libyacc: Loc yacc libpth _a ?MAKE: -pick add $@ %< ?S:libyacc: ?S: This variable contains the argument to pass to the loader in order ?S: to get the yacc library routines. If there is no yacc or yacc ?S: library, it is null. ?S:. ?T:xxx : see if we should include -ly echo " " case "$yacc" in *byacc*) echo "You are using byacc, so I won't look for a yacc library." >&4 libyacc='' ;; *yacc) xxx=`./loc liby$_a x $libpth` case "$xxx" in x) echo "No yacc library found." >&4 libyacc='' ;; *) echo "yacc library found in $xxx." >&4 libyacc="$xxx" ;; esac ;; *bison*) echo "You are using bison, so I won't look for a yacc library." >&4 libyacc='' ;; *) echo "You don't seem to have yacc, so I won't look for the yacc library." >&4 libyacc='' ;; esac dist_3.5-36.001/mcon/U/i_ws2tcpip.U0000644000175000017500000000163212142511050016747 0ustar srivastasrivasta?RCS: $Id: i_ws2tcpip.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, 2010, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:i_ws2tcpip: Inhdr ?MAKE: -pick add $@ %< ?S:i_ws2tcpip: ?S: This variable conditionally defines the I_WS2TCPIP symbol, and indicates ?S: whether a C program may include . ?S:. ?C:I_WS2TCPIP: ?C: This symbol, if defined, indicates to the C program that it should ?C: include . ?C:. ?H:#$i_ws2tcpip I_WS2TCPIP /**/ ?H:. ?LINT:set i_ws2tcpip : see if this is a ws2tcpip.h system set ws2tcpip.h i_ws2tcpip eval $inhdr dist_3.5-36.001/mcon/U/d_newsadm.U0000644000175000017500000000403412142511050016624 0ustar srivastasrivasta?RCS: $Id: d_newsadm.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_newsadm.U,v $ ?RCS: Revision 3.0.1.2 1997/02/28 15:36:53 ram ?RCS: patch61: added Guess dependency ?RCS: ?RCS: Revision 3.0.1.1 1994/10/29 16:14:33 ram ?RCS: patch36: call ./eunice explicitely instead of relying on PATH ?RCS: ?RCS: Revision 3.0 1993/08/18 12:06:42 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_newsadm newsadmin: cat contains Guess Setvar Myread Oldconfig ?MAKE: -pick add $@ %< ?S:d_newsadm: ?S: This variable conditionally defines the NEWS_ADMIN symbol, which ?S: indicates to the C program that there is a user who is in charge ?S: of news administration. ?S:. ?S:newsadmin: ?S: This variable holds the login name of the news administrator, if any. ?S:. ?C:NEWS_ADMIN (NEWSADMIN): ?C: This symbol, if defined, contains the login name of the news ?C: administrator. ?C:. ?H:#$d_newsadm NEWS_ADMIN "$newsadmin" /**/ ?H:. ?LINT:set d_newsadm : get news administrator name case "$newsadmin" in '') if $contains "^news:" /etc/passwd >/dev/null 2>&1 ; then dflt=news elif $contains "^usenet:" /etc/passwd >/dev/null 2>&1 ; then dflt=usenet elif ./eunice; then dflt=system else dflt=root fi ;; *) dflt="$newsadmin" ;; esac $cat <<'EOM' Many systems keep their news in a private directory, or have a non-superuser in charge of administering news. (If you don't have such a user, take the default answer.) I need the login name (not directory) which is used for news administration. EOM rp="News admin login?" . ./myread newsadmin="$ans" case "$newsadmin" in root) val="$undef" ;; *) val="$define" ;; esac set d_newsadm eval $setvar dist_3.5-36.001/mcon/U/d_regcmp.U0000644000175000017500000000424412142511050016446 0ustar srivastasrivasta?RCS: $Id: d_regcmp.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_regcmp.U,v $ ?RCS: Revision 3.0.1.1 1995/01/30 14:34:45 ram ?RCS: patch49: now looks for POSIX regcomp() routine ?RCS: ?RCS: Revision 3.0 1993/08/18 12:06:53 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_regcmp d_re_comp: Csym cat ?MAKE: -pick add $@ %< ?X: ?X: Modern code should use POSIX's regcomp(). ?X: ?S:d_regcmp: ?S: This variable conditionally defines the HAS_REGCMP symbol, which ?S: indicates to the C program that the regcmp() routine is available ?S: for regular pattern matching (usually on System V). ?S:. ?S:d_re_comp: ?S: This variable conditionally defines the HAS_RECOMP symbol, which ?S: indicates to the C program that the re_comp() routine is available ?S: for regular pattern matching (usually on BSD). If so, it is likely that ?S: re_exec() exists. ?S:. ?C:HAS_REGCMP (REGCMP): ?C: This symbol, if defined, indicates that the regcmp() routine is ?C: available to do some regular pattern matching (usually on System V). ?C:. ?C:HAS_RECOMP (RECOMP): ?C: This symbol, if defined, indicates that the re_comp() routine is ?C: available to do some regular pattern matching (usually on BSD). If so, ?C: it is likely that re_exec() be available. ?C:. ?H:#$d_regcmp HAS_REGCMP /* sysV */ ?H:#$d_re_comp HAS_RECOMP /* BSD */ ?H:. ?T:val : see if regcmp or re_comp exist, for regular pattern matching echo " " if set regcmp val -f d_regcmp; eval $csym; $val; then echo 'regcmp() found.' >&4 d_regcmp="$define" d_re_comp="$undef" elif set re_comp val -f d_re_comp; eval $csym; $val; then echo 're_comp() found, assuming re_exec() also exists.' >&4 d_re_comp="$define" d_regcmp="$undef" else $cat >&4 <try.c < int main(void) { static char src, dst; void *p; p = memcpy(&dst, &src, sizeof(dst)); return p ? 0 : 1; } EOC cyn=memcpy set d_memcpy eval $trylink dist_3.5-36.001/mcon/U/Tr.U0000644000175000017500000000630112142511050015247 0ustar srivastasrivasta?RCS: $Id: Tr.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Tr.U,v $ ?RCS: Revision 3.0.1.2 1994/10/29 18:00:54 ram ?RCS: patch43: forgot to quote $@ to protect against "evil" characters ?RCS: ?RCS: Revision 3.0.1.1 1994/10/29 15:58:35 ram ?RCS: patch36: created ?RCS: ?X: ?X: This unit produces a bit of shell code that must be dotted in in order ?X: to do a character translation. It catches translations to uppercase or ?X: to lowercase, and then invokes the real tr to perform the job. ?X: ?X: This unit is necessary on HP machines (HP strikes again!) with non-ascii ?X: ROMAN8-charset, where normal letters are not arranged in a row, so a-z ?X: covers not the whole alphabet but lots of special chars. This was reported ?X: by Andreas Sahlbach . ?X: ?X: Units performing a tr '[A-Z]' '[a-z]' or the other way round should include ?X: us in their dependency and use ./tr instead. ?X: ?MAKE:Tr: startsh tr eunicefix ?MAKE: -pick add $@ %< ?F:./tr ?T:up low LC_ALL : see whether [:lower:] and [:upper:] are supported character classes echo " " case "`echo AbyZ | LC_ALL=C $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in ABYZ) echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4 up='[:upper:]' low='[:lower:]' ;; *) # There is a discontinuity in EBCDIC between 'I' and 'J' # (0xc9 and 0xd1), therefore that is a nice testing point. if test "X$up" = X -o "X$low" = X; then case "`echo IJ | LC_ALL=C $tr '[I-J]' '[i-j]' 2>/dev/null`" in ij) up='[A-Z]' low='[a-z]' ;; esac fi if test "X$up" = X -o "X$low" = X; then case "`echo IJ | LC_ALL=C $tr I-J i-j 2>/dev/null`" in ij) up='A-Z' low='a-z' ;; esac fi if test "X$up" = X -o "X$low" = X; then case "`echo IJ | od -x 2>/dev/null`" in *C9D1*|*c9d1*) echo "Hey, this might be EBCDIC." >&4 if test "X$up" = X -o "X$low" = X; then case "`echo IJ | \ LC_ALL=C $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in ij) up='[A-IJ-RS-Z]' low='[a-ij-rs-z]' ;; esac fi if test "X$up" = X -o "X$low" = X; then case "`echo IJ | LC_ALL=C $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in ij) up='A-IJ-RS-Z' low='a-ij-rs-z' ;; esac fi ;; esac fi esac case "`echo IJ | LC_ALL=C $tr \"$up\" \"$low\" 2>/dev/null`" in ij) echo "Using $up and $low to convert case." >&4 ;; *) echo "I don't know how to translate letters from upper to lower case." >&4 echo "Your tr is not acting any way I know of." >&4 exit 1 ;; esac : set up the translation script tr, must be called with ./tr of course cat >tr < to define ?S: the RTA_DATA() and other RTA_NEXT() macros. ?S:. ?C:I_LINUX_RTNETLINK: ?C: This symbol, if defined, indicates to the C program that it should ?C: include to get definitions for the RTA_DATA() and ?C: other RTA_NEXT() macros. ?C:. ?H:#$i_linux_rtnetlink I_LINUX_RTNETLINK /**/ ?H:. ?LINT:set i_linux_rtnetlink : see if this is a linux/rtnetlink.h system set linux/rtnetlink.h i_linux_rtnetlink eval $inhdr dist_3.5-36.001/mcon/U/i_poll.U0000644000175000017500000000172412142511050016144 0ustar srivastasrivasta?RCS: $Id: i_poll.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:i_poll: Inhdr ?MAKE: -pick add $@ %< ?S:i_poll: ?S: This variable conditionally defines the I_POLL symbol, which ?S: indicates to the C program that it should include . ?S:. ?C:I_POLL: ?C: This symbol, if defined, indicates that the program may include ?C: . If there is no , then you may check I_SYS_POLL ?C: instead to see whether there is a to include. ?C:. ?H:#$i_poll I_POLL /**/ ?H:. ?LINT:set i_poll : see if there is a poll.h file set poll.h i_poll eval $inhdr dist_3.5-36.001/mcon/U/d_dladdr.U0000644000175000017500000000216112142511050016417 0ustar srivastasrivasta?RCS: $Id: d_dladdr.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2012 Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_dladdr: Trylink cat i_dlfcn ?MAKE: -pick add $@ %< ?S:d_dladdr: ?S: This variable conditionally defines the HAS_DLADDR symbol, which ?S: indicates to the C program that the dladdr() routine is available. ?S:. ?C:HAS_DLADDR : ?C: This symbol, if defined, indicates that the dladdr() routine is ?C: available to query the dynamic linker about a specified address. ?C:. ?H:#$d_dladdr HAS_DLADDR /**/ ?H:. ?LINT:set d_dladdr : see if dladdr exists $cat >try.c < #endif int main(void) { Dl_info info; dladdr(main, &info); return info.dli_fbase != 0; } EOC cyn=dladdr set d_dladdr '-ldl' eval $trylink dist_3.5-36.001/mcon/U/d_truncate.U0000644000175000017500000000236012142511050017013 0ustar srivastasrivasta?RCS: $Id: d_truncate.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_truncate.U,v $ ?RCS: Revision 3.0 1993/08/18 12:07:48 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_truncate: Trylink cat i_unistd ?MAKE: -pick add $@ %< ?S:d_truncate: ?S: This variable conditionally defines HAS_TRUNCATE if truncate() is ?S: available to truncate files. ?S:. ?C:HAS_TRUNCATE (TRUNCATE): ?C: This symbol, if defined, indicates that the truncate routine is ?C: available to truncate files. ?C:. ?H:#$d_truncate HAS_TRUNCATE /**/ ?H:. ?LINT:set d_truncate : see if truncate exists $cat >try.c < #$i_unistd I_UNISTD #ifdef I_UNISTD #include #endif int main(void) { static int ret; static off_t length; ret |= truncate("path", length); return ret ? 0 : 1; } EOC cyn=truncate set d_truncate eval $trylink dist_3.5-36.001/mcon/U/d_pread.U0000644000175000017500000000240712142511050016263 0ustar srivastasrivasta?RCS: $Id: d_pread.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_pread.U,v $ ?RCS: ?MAKE:d_pread: Trylink cat i_unistd ?MAKE: -pick add $@ %< ?S:d_pread: ?S: This variable conditionally defines the HAS_PREAD symbol, which ?S: indicates to the C program that the pread() routine is available. ?S:. ?C:HAS_PREAD : ?C: This symbol, if defined, indicates that the pread routine is ?C: available to perform reads on a file descriptor at a given offset. ?C:. ?H:#$d_pread HAS_PREAD /**/ ?H:. ?LINT:set d_pread : see if pread exists $cat >try.c < #$i_unistd I_UNISTD #ifdef I_UNISTD #include #endif int main(void) { static ssize_t ret; static int fd; static char buf[1]; static size_t size; static off_t offset; ret |= pread(fd, buf, size, offset); return ret ? 0 : 1; } EOC cyn=pread set d_pread eval $trylink dist_3.5-36.001/mcon/U/d_msgget.U0000644000175000017500000000235712142511050016462 0ustar srivastasrivasta?RCS: $Id: d_msgget.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_msgget.U,v $ ?RCS: Revision 3.0 1993/08/18 12:06:39 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_msgget: Trylink cat ?MAKE: -pick add $@ %< ?S:d_msgget: ?S: This variable conditionally defines the HAS_MSGGET symbol, which ?S: indicates to the C program that the msgget() routine is available. ?S:. ?C:HAS_MSGGET: ?C: This symbol, if defined, indicates that the msgget() routine is ?C: available to get a new message queue. ?C:. ?H:#$d_msgget HAS_MSGGET /**/ ?H:. ?LINT:set d_msgget : see if msgget exists $cat >try.c < int main(void) { static int ret, flags; static key_t key; flags |= IPC_CREAT; flags |= IPC_EXCL; key = IPC_PRIVATE; ret |= msgget(key, flags); return ret ? 0 : 1; } EOC cyn=msgget set d_msgget eval $trylink dist_3.5-36.001/mcon/U/d_wait3.U0000644000175000017500000000261312142511050016216 0ustar srivastasrivasta?RCS: $Id: d_wait3.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_wait3.U,v $ ?RCS: Revision 3.0 1993/08/18 12:08:01 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_wait3: Trylink cat i_sysresrc i_syswait ?MAKE: -pick add $@ %< ?S:d_wait3: ?S: This variable conditionally defines the HAS_WAIT3 symbol, which ?S: indicates to the C program that the wait3() subroutine exists. ?S:. ?C:HAS_WAIT3: ?C: This symbol, if defined, indicates that the wait3() subroutine ?C: exists. ?C:. ?H:#$d_wait3 HAS_WAIT3 /**/ ?H:. ?LINT:set d_wait3 : see if 'wait3()' exists $cat >try.c < #$i_syswait I_SYS_WAIT #ifdef I_SYS_WAIT #include #endif #$i_sysresrc I_SYS_RESOURCE #ifdef I_SYS_RESOURCE #include #endif int main(void) { static pid_t ret; static int status, options; static struct rusage ru; options |= WNOHANG; options |= WUNTRACED; ret |= wait3(&status, options, &ru); return ret ? 0 : 1; } EOC cyn=wait3 set d_wait3 eval $trylink dist_3.5-36.001/mcon/U/d_group.U0000644000175000017500000000143212142511050016321 0ustar srivastasrivasta?RCS: $Id: d_group.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Andy Dougherty ?RCS: ?RCS: $Log: d_group.U,v $ ?RCS: Revision 3.0.1.2 1997/02/28 15:34:52 ram ?RCS: patch61: useless unit dropped. ?RCS: ?RCS: Revision 3.0.1.1 1994/08/29 16:07:48 ram ?RCS: patch32: created by ADO ?RCS: ?X: ?X: Useless unit dropped. ?X: ?LINT:empty dist_3.5-36.001/mcon/U/d_uctx_mctx.U0000644000175000017500000000257212142511050017211 0ustar srivastasrivasta?RCS: ?RCS: Copyright (c) 2012 Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_uctx_mctx: Trylink cat i_ucontext i_sys_ucontext ?MAKE: -pick add $@ %< ?S:d_uctx_mctx: ?S: This variable conditionally defines the HAS_UCONTEXT_MCONTEXT symbol, ?S: which indicates to the C program that it can access general registers ?S: through some field in ucontext->uc_mcontext. ?S:. ?C:HAS_UCONTEXT_MCONTEXT: ?C: This symbol, if defined, indicates that the C program can access the ?C: processor's general registers through some field in the uc_mcontext ?C: machine context field from the ucontext_t structure. ?C:. ?H:#$d_uctx_mctx HAS_UCONTEXT_MCONTEXT /**/ ?H:. ?LINT:set d_uctx_mctx : check for machine context field in the ucontext structure $cat >try.c < #endif #ifdef I_SYS_UCONTEXT #include #endif int main(void) { static ucontext_t *uc = 0; return (int) &uc->uc_mcontext; } EOC cyn="whether 'struct ucontext' has a 'uc_mcontext' member" set d_uctx_mctx eval $trylink dist_3.5-36.001/mcon/U/Inhdr.U0000644000175000017500000000560012142511050015727 0ustar srivastasrivasta?RCS: $Id: Inhdr.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Inhdr.U,v $ ?RCS: Revision 3.0.1.2 1995/05/12 12:01:31 ram ?RCS: patch54: deleted tabs that caused some /bin/sh to core dump (ADO) ?RCS: ?RCS: Revision 3.0.1.1 1994/10/29 15:55:01 ram ?RCS: patch36: call ./whoa explicitely instead of relying on PATH ?RCS: ?RCS: Revision 3.0 1993/08/18 12:05:01 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: This unit checks wether a set of header files exists or not. ?X: If the first header is not found, the function tries to locate ?X: the next header, and so on, until one is found or there is no ?X: more header in the list. ?X: ?X: To use it, say: ?X: set header i_header [ header2 i_header2 ... ] ?X: eval $inhdr ?X: ?MAKE:Inhdr: test Findhdr Whoa ?MAKE: -pick add $@ %< ?LINT:define inhdr ?V:inhdr ?S:inhdr: ?S: This shell variable is used internally by Configure to check ?S: wether a set of headers exist or not. A typical use is: ?S: set header i_header [ header2 i_header2 ... ] ?S: eval $inhdr ?S: That will print a message, saying wether header was found or ?S: not and set i_header* accordingly. If the first header is not ?S: found, we try the next one, until the list is empty or one is found. ?S:. ?T:xxx xxf var td xxnf tu yyy instead was cont : define an alternate in-header-list? function inhdr='echo " "; td=$define; tu=$undef; yyy=$@; cont=true; xxf="echo \"<\$1> found.\" >&4"; case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";; *) xxnf="echo \"<\$1> NOT found, ...\" >&4";; esac; case $# in 4) instead=instead;; *) instead="at last";; esac; while $test "$cont"; do xxx=`./findhdr $1` var=$2; eval "was=\$$2"; if $test "$xxx" && $test -r "$xxx"; then eval $xxf; ?X: Next line shifted left 1 tabstop to avoid sh core dump on MachTen 2.1.1. eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td"; cont=""; else eval $xxnf; ?X: Likewise, the next line has been shifted left 1 tabstop -- ADO, 08/03/95 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi; set $yyy; shift; shift; yyy=$@; case $# in 0) cont="";; 2) xxf="echo \"but I found <\$1> $instead.\" >&4"; xxnf="echo \"and I did not find <\$1> either.\" >&4";; *) xxf="echo \"but I found <\$1\> instead.\" >&4"; xxnf="echo \"there is no <\$1>, ...\" >&4";; esac; done; ?X: Remaining values are set to 'undef' while $test "$yyy"; do set $yyy; var=$2; eval "was=\$$2"; eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; set $yyy; shift; shift; yyy=$@; done' dist_3.5-36.001/mcon/U/mallocsrc.U0000644000175000017500000001243612142511050016647 0ustar srivastasrivasta?RCS: $Id: mallocsrc.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: mallocsrc.U,v $ ?RCS: Revision 3.0.1.2 1997/02/28 16:10:26 ram ?RCS: patch61: added support for Free_t, the type of free() ?RCS: patch61: replaced .o with $_o all over the place ?RCS: ?RCS: Revision 3.0.1.1 1994/05/06 15:10:46 ram ?RCS: patch23: added support for MYMALLOC, mainly for perl5 (ADO) ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:12 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:mallocsrc mallocobj usemymalloc malloctype d_mymalloc \ freetype: Myread \ Oldconfig package spackage Guess Setvar rm cat +cc +ccflags Findhdr \ i_malloc i_stdlib sed libs _o ptrsize ?MAKE: -pick add $@ %< ?X: Put near top so that other tests don't erroneously include ?X: -lmalloc. --AD 22 June 1998 ?Y:TOP ?S:usemymalloc: ?S: This variable contains y if the malloc that comes with this package ?S: is desired over the system's version of malloc. People often include ?S: special versions of malloc for efficiency, but such versions are often ?S: less portable. See also mallocsrc and mallocobj. ?S: If this is 'y', then -lmalloc is removed from $libs. ?S:. ?S:mallocsrc: ?S: This variable contains the name of the malloc.c that comes with ?S: the package, if that malloc.c is preferred over the system malloc. ?S: Otherwise the value is null. This variable is intended for generating ?S: Makefiles. ?S:. ?S:d_mymalloc: ?S: This variable conditionally defines MYMALLOC in case other parts ?S: of the source want to take special action if MYMALLOC is used. ?S: This may include different sorts of profiling or error detection. ?S:. ?S:mallocobj: ?S: This variable contains the name of the malloc.o that this package ?S: generates, if that malloc.o is preferred over the system malloc. ?S: Otherwise the value is null. This variable is intended for generating ?S: Makefiles. See mallocsrc. ?S:. ?S:freetype: ?S: This variable contains the return type of free(). It is usually ?S: void, but occasionally int. ?S:. ?S:malloctype: ?S: This variable contains the kind of ptr returned by malloc and realloc. ?S:. ?C:Free_t: ?C: This variable contains the return type of free(). It is usually ?C: void, but occasionally int. ?C:. ?C:Malloc_t (MALLOCPTRTYPE): ?C: This symbol is the type of pointer returned by malloc and realloc. ?C:. ?H:#define Malloc_t $malloctype /**/ ?H:#define Free_t $freetype /**/ ?H:. ?C:USE_MY_MALLOC (MYMALLOC): ?C: This symbol, if defined, indicates that we're using our own malloc. ?C:. ?H:#$d_mymalloc USE_MY_MALLOC /**/ ?H:. ?LINT:change libs ?X: Cannot test for mallocsrc; it is the unit's name and there is a bug in ?X: the interpreter which defines all the names, even though they are not used. @if mallocobj || USE_MY_MALLOC : determine which malloc to compile in echo " " case "$usemymalloc" in [yY]*|true|$define) dflt='y' ;; [nN]*|false|$undef) dflt='n' ;; *) case "$ptrsize" in 4) dflt='y' ;; *) dflt='n' ;; esac ;; esac $cat <&4 set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'` shift libs="$*" echo "libs = $libs" >&4 ;; esac ;; *) usemymalloc='n' mallocsrc='' mallocobj='' d_mymalloc="$undef" ;; esac @end @if MALLOCPTRTYPE || Malloc_t || Free_t : compute the return types of malloc and free echo " " $cat >malloc.c < #include #ifdef I_MALLOC #include #endif #ifdef I_STDLIB #include #endif #ifdef TRY_MALLOC void *malloc(); #endif #ifdef TRY_FREE void free(); #endif END @if MALLOCPTRTYPE || Malloc_t case "$malloctype" in '') if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then malloctype='void *' else malloctype='char *' fi ;; esac echo "Your system wants malloc to return '$malloctype', it would seem." >&4 @end @if Free_t case "$freetype" in '') if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then freetype='void' else freetype='int' fi ;; esac echo "Your system uses $freetype free(), it would seem." >&4 @end $rm -f malloc.[co] @end dist_3.5-36.001/mcon/U/d_iconv.U0000644000175000017500000000236512142511050016311 0ustar srivastasrivasta?RCS: $Id: d_iconv.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_iconv: Trylink cat i_iconv ?MAKE: -pick add $@ %< ?S:d_iconv: ?S: This variable conditionally defines the HAS_ICONV symbol, which ?S: indicates to the C program that the iconv() routine from iconv is ?S: available. ?S:. ?C:HAS_ICONV: ?C: This symbol, if defined, indicates that the iconv iconv() routine is ?C: available. ?C:. ?H:#$d_iconv HAS_ICONV /**/ ?H:. ?LINT:set d_iconv : see if iconv exists $cat >try.c < #$i_iconv I_ICONV #ifdef I_ICONV #include #endif int main(void) { static size_t n, srcleft, dstleft; static char *src, *dst; static int ret; iconv_t cd; cd = iconv_open("ISO8859-1", "UTF-8"); n |= iconv(cd, (void *) &src, &srcleft, (void *) &dst, &dstleft); ret |= iconv_close(cd); return 0 != ret; } EOC cyn=iconv set d_iconv '-liconv' eval $trylink dist_3.5-36.001/mcon/U/issymlink.U0000644000175000017500000000437212142511050016712 0ustar srivastasrivasta?RCS: $Id: issymlink.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Andy Dougherty ?RCS: ?RCS: $Log: lns.U,v $ ?RCS: Revision 3.0.1.1 1994/06/20 07:05:52 ram ?RCS: patch30: created by ADO ?RCS: ?MAKE:issymlink: lns test rm ?MAKE: -pick add $@ %< ?S:issymlink: ?S: This variable holds the test command to test for a symbolic link ?S: (if they are supported). Typical values include 'test -h' and ?S: 'test -L'. ?S:. ?T:pth p ?LINT:change PATH test : determine whether symbolic links are supported echo " " case "$lns" in *"ln"*" -s") echo "Checking how to test for symbolic links..." >&4 $lns blurfl sym if $test "X$issymlink" = X; then ?X: ?X: In some AIX 4 versions the (ksh) builtin test (-h) is broken. ?X: case "$newsh" in '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;; *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;; esac if test $? = 0; then issymlink="test -h" else echo "Your builtin 'test -h' may be broken." >&4 case "$test" in /*) ;; *) pth=`echo $PATH | sed -e "s/$p_/ /g"` for p in $pth do if test -f "$p/$test"; then test="$p/$test" break fi done ;; esac case "$test" in /*) echo "Trying external '$test -h'." >&4 issymlink="$test -h" if $test ! -h sym >/dev/null 2>&1; then echo "External '$test -h' is broken, too." >&4 issymlink='' fi ;; *) issymlink='' ;; esac fi fi if $test "X$issymlink" = X; then if $test -L sym 2>/dev/null; then issymlink="$test -L" echo "The builtin '$test -L' worked." >&4 fi fi if $test "X$issymlink" != X; then echo "You can test for symbolic links with '$issymlink'." >&4 else echo "I do not know how you can test for symbolic links." >&4 fi $rm -f blurfl sym ;; *) echo "No symbolic links, so not testing for their testing..." >&4 ;; esac dist_3.5-36.001/mcon/U/d_rusage.U0000644000175000017500000000331312142511050016453 0ustar srivastasrivasta?RCS: $Id: d_rusage.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_rusage.U,v $ ?RCS: Revision 3.0 1993/08/18 12:06:57 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: We may need to include and FIXME ?X:INC: i_sysresrc i_systime ?MAKE:d_rusage: Trylink cat i_sysresrc ?MAKE: -pick add $@ %< ?S:d_rusage (d_getrusg): ?S: This variable conditionally defines the HAS_GETRUSAGE symbol, which ?S: indicates that the getrusage() routine exists. The getrusage() routine ?S: supports sub-second accuracy for process cpu accounting. You may need ?S: to include and . ?S:. ?C:HAS_GETRUSAGE (RUSAGE GETRUSAGE): ?C: This symbol, if defined, indicates that the getrusage() routine is ?C: available to get process statistics with a sub-second accuracy. ?C: Inclusion of and may be necessary. ?C:. ?H:#$d_rusage HAS_GETRUSAGE /**/ ?H:. ?LINT:set d_rusage : see if getrusage exists $cat >try.c < #include #$i_sysresrc I_SYS_RESOURCE #ifdef I_SYS_RESOURCE #include #endif int main(void) { static struct rusage ru; static int ret; ret |= getrusage(RUSAGE_SELF, &ru); ret |= getrusage(RUSAGE_CHILDREN, &ru); return ret ? 0 : 1; } EOC cyn=getrusage set d_rusage eval $trylink dist_3.5-36.001/mcon/U/models.U0000644000175000017500000001323412142511050016150 0ustar srivastasrivasta?RCS: $Id: models.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: models.U,v $ ?RCS: Revision 3.0.1.2 1997/02/28 16:13:17 ram ?RCS: patch61: added ?F: metalint hint ?RCS: ?RCS: Revision 3.0.1.1 1993/08/25 14:02:39 ram ?RCS: patch6: added default for large ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:17 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:models split small medium large huge: test cat Myread sysman Oldconfig \ Loc Warn contains rm ?MAKE: -pick add $@ %< ?S:models: ?S: This variable contains the list of memory models supported by this ?S: system. Possible component values are none, split, unsplit, small, ?S: medium, large, and huge. The component values are space separated. ?S:. ?S:split: ?S: This variable contains a flag which will tell the C compiler and loader ?S: to produce a program that will run in separate I and D space, for those ?S: machines that support separation of instruction and data space. It is ?S: up to the Makefile to use this. ?S:. ?S:small: ?S: This variable contains a flag which will tell the C compiler and loader ?S: to produce a program running with a small memory model. It is up to ?S: the Makefile to use this. ?S:. ?S:medium: ?S: This variable contains a flag which will tell the C compiler and loader ?S: to produce a program running with a medium memory model. If the ?S: medium model is not supported, contains the flag to produce large ?S: model programs. It is up to the Makefile to use this. ?S:. ?S:large: ?S: This variable contains a flag which will tell the C compiler and loader ?S: to produce a program running with a large memory model. It is up to ?S: the Makefile to use this. ?S:. ?S:huge: ?S: This variable contains a flag which will tell the C compiler and loader ?S: to produce a program running with a huge memory model. If the ?S: huge model is not supported, contains the flag to produce large ?S: model programs. It is up to the Makefile to use this. ?S:. ?T:unsplit tans modelcc ?F:!pdp11 ?D:large='' ?LINT:extern cc : see what memory models we can support case "$models" in '') ?X: We may not use Cppsym or we get a circular dependency through cc. ?X: But this should work regardless of which cc we eventually use. $cat >pdp11.c <<'EOP' int main(void) { #ifdef pdp11 return 0; #else return 1; #endif } EOP ?X: Run cc in a subshell in case they don't have a 'cc' command. ?X: Presumably they do have gcc or something. case "$cc" in '') modelcc="$cc" ;; *) modelcc="cc" ;; esac ( $modelcc -o pdp11 pdp11.c ) >/dev/null 2>&1 if $test -f pdp11 && ./pdp11 2>/dev/null; then dflt='unsplit split' else tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge` case "$tans" in X) dflt='none';; *) if $test -d /lib/small || $test -d /usr/lib/small; then dflt='small' else dflt='' fi if $test -d /lib/medium || $test -d /usr/lib/medium; then dflt="$dflt medium" fi if $test -d /lib/large || $test -d /usr/lib/large; then dflt="$dflt large" fi if $test -d /lib/huge || $test -d /usr/lib/huge; then dflt="$dflt huge" fi esac fi;; *) dflt="$models";; esac $cat </dev/null 2>&1 || \ $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then dflt='-i' else dflt='none' fi;; *) dflt="$split";; esac rp="What flag indicates separate I and D space?" . ./myread tans="$ans" case "$tans" in none) tans='';; esac split="$tans" unsplit='';; *large*|*small*|*medium*|*huge*) case "$models" in *large*) case "$large" in '') dflt='-Ml';; *) dflt="$large";; esac rp="What flag indicates large model?" . ./myread tans="$ans" case "$tans" in none) tans=''; esac large="$tans";; *) large='';; esac case "$models" in *huge*) case "$huge" in '') dflt='-Mh';; *) dflt="$huge";; esac rp="What flag indicates huge model?" . ./myread tans="$ans" case "$tans" in none) tans=''; esac huge="$tans";; *) huge="$large";; esac case "$models" in *medium*) case "$medium" in '') dflt='-Mm';; *) dflt="$medium";; esac rp="What flag indicates medium model?" . ./myread tans="$ans" case "$tans" in none) tans=''; esac medium="$tans";; *) medium="$large";; esac case "$models" in *small*) case "$small" in '') dflt='none';; *) dflt="$small";; esac rp="What flag indicates small model?" . ./myread tans="$ans" case "$tans" in none) tans=''; esac small="$tans";; *) small='';; esac ;; *) ./warn "Unrecognized memory models--you may have to edit Makefile.SH" 4>&4 ;; esac $rm -f pdp11.* pdp11 dist_3.5-36.001/mcon/U/ssizetype.U0000644000175000017500000000643112142511050016725 0ustar srivastasrivasta?RCS: $Id: ssizetype.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Andy Dougherty ?RCS: ?RCS: $Log: ssizetype.U,v $ ?RCS: Revision 3.0.1.3 1997/02/28 16:24:21 ram ?RCS: patch61: integrated perl5 concerns for mis-configured sfio ?RCS: ?RCS: Revision 3.0.1.2 1994/10/29 16:30:28 ram ?RCS: patch36: added ?F: line for metalint file checking ?RCS: patch36: added 'ldflags' to the test compile line (ADO) ?RCS: ?RCS: Revision 3.0.1.1 1994/08/29 16:33:06 ram ?RCS: patch32: created by ADO ?RCS: ?MAKE:ssizetype: Myread Typedef sizetype cat rm \ +cc +optimize +ccflags +ldflags +libs _o ?MAKE: -pick add $@ %< ?S:ssizetype: ?S: This variable defines ssizetype to be something like ssize_t, ?S: long or int. It is used by functions that return a count ?S: of bytes or an error condition. It must be a signed type. ?S: We will pick a type such that sizeof(SSize_t) == sizeof(Size_t). ?S:. ?C:SSize_t: ?C: This symbol holds the type used by functions that return ?C: a count of bytes or an error condition. It must be a signed type. ?C: It is usually ssize_t, but may be long or int, etc. ?C: It may be necessary to include or ?C: to get any typedef'ed information. ?C: We will pick a type such that sizeof(SSize_t) == sizeof(Size_t). ?C:. ?H:#define SSize_t $ssizetype /* signed count of bytes */ ?H:. ?F:!ssize.out !ssize : see what type is used for signed size_t set ssize_t ssizetype int stdio.h sys/types.h eval $typedef dflt="$ssizetype" ?X: Now check out whether sizeof(SSize_t) == sizeof(Size_t) $cat > ssize.c < #include #define Size_t $sizetype #define SSize_t $dflt int main() { if (sizeof(Size_t) == sizeof(SSize_t)) printf("$dflt\n"); else if (sizeof(Size_t) == sizeof(int)) printf("int\n"); else printf("long\n"); fflush(stdout); exit(0); } EOM echo " " ?X: If $libs contains -lsfio, and sfio is mis-configured, then it ?X: sometimes (apparently) runs and exits with a 0 status, but with no ?X: output!. Thus we check with test -s whether we actually got any ?X: output. I think it has to do with sfio's use of _exit vs. exit, ?X: but I don't know for sure. --Andy Dougherty 1/27/97. if $cc $optimize $ccflags $ldflags -o ssize ssize.c $libs > /dev/null 2>&1 && ./ssize > ssize.out 2>/dev/null && test -s ssize.out ; then ssizetype=`$cat ssize.out` echo "I'll be using $ssizetype for functions returning a byte count." >&4 else $cat >&4 <try.c < int main(void) { static char s[] = "a.b.c", ret; ret |= *strtok(s, "."); return ret ? 0 : 1; } EOC cyn=strtok set d_strtok eval $trylink dist_3.5-36.001/mcon/U/d_crypt.U0000644000175000017500000000413712142511050016333 0ustar srivastasrivasta?RCS: $Id: d_crypt.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_crypt.U,v $ ?RCS: Revision 3.0.1.1 1997/02/28 15:31:47 ram ?RCS: patch61: replaced .a with $_a all over the place ?RCS: ?RCS: Revision 3.0 1993/08/18 12:05:52 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_crypt cryptlib: Loc test xlibpth libpth Setvar _a Trylink cat i_unistd ?MAKE: -pick add $@ %< ?S:d_crypt: ?S: This variable conditionally defines the CRYPT symbol, which ?S: indicates to the C program that the crypt() routine is available ?S: to encrypt passwords and the like. ?S:. ?S:cryptlib: ?S: This variable holds -lcrypt or the path to a libcrypt.a archive if ?S: the crypt() function is not defined in the standard C library. It is ?S: up to the Makefile to use this. ?S:. ?C:HAS_CRYPT (CRYPT): ?C: This symbol, if defined, indicates that the crypt routine is available ?C: to encrypt passwords and the like. ?C:. ?H:#$d_crypt HAS_CRYPT /**/ ?H:. ?LINT:set d_crypt ?T:val : see if crypt exists $cat >try.c < #endif int main(void) { static char ret; ret |= *crypt("key", "salt"); return ret ? 0 : 1; } EOC cyn=crypt set d_crypt -lcrypt eval $trylink case "$d_crypt" in $define) cryptlib='';; *) cryptlib=`./loc Slibcrypt$_a "" $xlibpth` if $test -z "$cryptlib"; then cryptlib=`./loc Mlibcrypt$_a "" $xlibpth` else cryptlib=-lcrypt fi if $test -z "$cryptlib"; then cryptlib=`./loc Llibcrypt$_a "" $xlibpth` else cryptlib=-lcrypt fi if $test -z "$cryptlib"; then cryptlib=`./loc libcrypt$_a "" $libpth` else cryptlib=-lcrypt fi if $test -z "$cryptlib"; then echo 'crypt() NOT found.' >&4 val="$undef" else val="$define" fi ;; esac dist_3.5-36.001/mcon/U/baserev.U0000644000175000017500000000137312142511050016315 0ustar srivastasrivasta?RCS: $Id: baserev.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: baserev.U,v $ ?RCS: Revision 3.0 1993/08/18 12:05:24 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:baserev: Null ?MAKE: -pick wipe $@ %< ?S:baserev: ?S: The base revision level of this package, from the .package file. ?S:. : set the base revision baserev= dist_3.5-36.001/mcon/U/groupstype.U0000644000175000017500000000441712142511050017111 0ustar srivastasrivasta?RCS: $Id: groupstype.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Andy Dougherty ?RCS: ?RCS: $Log: groupstype.U,v $ ?RCS: Revision 3.0.1.2 1994/10/29 16:18:08 ram ?RCS: patch36: no longer uses Setvar to set 'groupstype' (ADO) ?RCS: patch36: typo fix in the word 'argument' (ADO) ?RCS: ?RCS: Revision 3.0.1.1 1994/06/20 07:00:18 ram ?RCS: patch30: created by ADO ?RCS: ?MAKE:groupstype: gidtype d_getgrps Myread Oldconfig Findhdr cat d_setgrps ?MAKE: -pick add $@ %< ?INIT:groupstype='' ?S:groupstype: ?S: This variable defines Groups_t to be something like gid_t, int, ?S: ushort, or whatever type is used for the second argument to ?S: getgroups() and setgroups(). Usually, this is the same as ?S: gidtype (gid_t), but sometimes it isn't. ?S:. ?C:Groups_t (GROUPSTYPE): ?C: This symbol holds the type used for the second argument to ?C: getgroups() and setgroups(). Usually, this is the same as ?C: gidtype (gid_t) , but sometimes it isn't. ?C: It can be int, ushort, gid_t, etc... ?C: It may be necessary to include to get any ?C: typedef'ed information. This is only required if you have ?C: getgroups() or setgroups().. ?C:. ?H:?%<:#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS) ?H:?%<:#define Groups_t $groupstype /* Type for 2nd arg to [sg]etgroups() */ ?H:?%<:#endif ?H:. ?W:%<:getgroups HAS_GETGROUPS setgroups HAS_SETGROUPS : Find type of 2nd arg to 'getgroups()' and 'setgroups()' echo " " case "$d_getgrps$d_setgrps" in *define*) case "$groupstype" in '') dflt="$gidtype" ;; *) dflt="$groupstype" ;; esac $cat <try.c < #$i_unistd I_UNISTD #ifdef I_UNISTD #include #endif int main(void) { static int ret; static uid_t uid; ret |= setruid(uid); return ret ? 0 : 1; } EOC cyn=setruid set d_setruid eval $trylink dist_3.5-36.001/mcon/U/i_mswsock.U0000644000175000017500000000161412142511050016662 0ustar srivastasrivasta?RCS: $Id: i_mswsock.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, 2010 Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:i_mswsock: Inhdr ?MAKE: -pick add $@ %< ?S:i_mswsock: ?S: This variable conditionally defines the I_MSWSOCK symbol, and indicates ?S: whether a C program may include . ?S:. ?C:I_MSWSOCK: ?C: This symbol, if defined, indicates to the C program that it should ?C: include . ?C:. ?H:#$i_mswsock I_MSWSOCK /**/ ?H:. ?LINT:set i_mswsock : see if this is a mswsock.h system set mswsock.h i_mswsock eval $inhdr dist_3.5-36.001/mcon/U/d_pipe.U0000644000175000017500000000243412615421471016141 0ustar srivastasrivasta?RCS: $Id: d_pipe.U 196 2015-11-01 14:35:37Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Andy Dougherty ?RCS: ?RCS: $Log: d_pipe.U,v $ ?RCS: Revision 3.0.1.1 1994/08/29 16:11:44 ram ?RCS: patch32: created by ADO ?RCS: ?MAKE:d_pipe: Trylink cat i_unistd ?MAKE: -pick add $@ %< ?S:d_pipe: ?S: This variable conditionally defines the HAS_PIPE symbol, which ?S: indicates to the C program that the pipe() routine is available ?S: to create an inter-process channel. ?S:. ?C:HAS_PIPE: ?C: This symbol, if defined, indicates that the pipe routine is ?C: available to create an inter-process channel. ?C:. ?H:#$d_pipe HAS_PIPE /**/ ?H:. ?LINT:set d_pipe : see if pipe exists $cat >try.c < #endif int main(void) { static int fds[2], ret; ret |= pipe(fds); return ret ? 0 : 1; } EOC cyn=pipe set d_pipe eval $trylink dist_3.5-36.001/mcon/U/startsh.U0000644000175000017500000000277512142511050016365 0ustar srivastasrivasta?RCS: $Id: startsh.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: startsh.U,v $ ?RCS: Revision 3.0.1.1 1997/02/28 16:25:31 ram ?RCS: patch61: avoid needless chatter since this is now done very early ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:51 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:startsh: sh sharpbang eunicefix ?MAKE: -pick add $@ %< ?S:startsh: ?S: This variable contains the string to put on the front of a shell ?S: script to make sure (hopefully) that it runs with sh and not some ?S: other shell. ?S:. ?F:!sharp : figure out how to guarantee sh startup ?X: Avoid needless chatter since this is now done very early. ?X: echo " " ?X: echo "Checking out how to guarantee sh startup..." >&2 case "$startsh" in '') startsh=${sharpbang}${sh} ;; *) ?X: echo "Let's see if '$startsh' works..." ;; esac cat >sharp < ?RCS: ?RCS: $Log: lex.U,v $ ?RCS: Revision 3.0.1.3 1994/10/29 16:22:50 ram ?RCS: patch36: spurious single quote could cause Configure to crash ?RCS: patch36: (reported by Xavier Le Vourch .) ?RCS: ?RCS: Revision 3.0.1.2 1994/08/29 16:27:09 ram ?RCS: patch32: added lexflags variable for lex flags setting ?RCS: ?RCS: Revision 3.0.1.1 1994/05/06 15:06:01 ram ?RCS: patch23: added trailing blank line for metalint ?RCS: ?RCS: Revision 3.0 1993/08/18 12:08:55 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:lex lexflags: Guess Myread Oldconfig flex test ?MAKE: -pick add $@ %< ?S:lex: ?S: This variable holds the name of the lexical analyser generator we ?S: want to use in the Makefile. It can be lex or flex. ?S:. ?S:lexflags: ?S: This variable holds any flags that should be passed to the lexical ?S: analyzer. It is up to the Makefile to use it. ?S:. : determine lexical analyser generator case "$lex" in '') dflt=lex;; *) dflt="$lex";; esac echo " " if $test -f "$flex"; then rp='Which lexical analyser generator (lex or flex) shall I use?' else rp='Which lexical analyser generator shall I use?' fi . ./myread lex="$ans" @if lexflags : if using lex this will normally be useless, but flex frequently takes args echo " " case "$lexflags" in '') dflt='none';; *) dflt="$lexflags";; esac rp="What flags should be given to $lex?" . ./myread case "$ans" in none) lexflags='';; *) lexflags="$ans";; esac @end dist_3.5-36.001/mcon/U/Oldsym.U0000644000175000017500000000504412142511050016134 0ustar srivastasrivasta?RCS: $Id: Oldsym.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Oldsym.U,v $ ?RCS: Revision 3.0.1.1 1997/02/28 15:06:58 ram ?RCS: patch61: added support for src.U ?RCS: ?RCS: Revision 3.0 1993/08/18 12:05:13 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: This unit follows the creation of the config.sh file. It adds some ?X: special symbols: defines from patchlevel.h file if any and CONFIG, ?X: which is set to true. Then, we try to keep all the new symbols that ?X: may come from a hint file or a previous config.sh file. ?X: ?MAKE:Oldsym: Config_sh Options test hint src sed sort uniq ?MAKE: -pick add $@ %< ?T:CONFIG sym tmp ?F:!UU : add special variables $test -f $src/patchlevel.h && \ awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh ?X: In revision.h we expect something like: ?X: #define REVISION "$Revision: 167 $" ?X: which is supposed to be expanded by the revision control system. $test -f $src/revision.h && \ sed -ne 's/^#define \([A-Za-z0-9_]*\) ".*: \([0-9]*\).*"/\1=\2/p' \ < $src/revision.h >>config.sh echo "CONFIG=true" >>config.sh : propagate old symbols if $test -f UU/config.sh; then ?X: Make sure each symbol is unique in oldconfig.sh UU/oldconfig.sh ?X: ?X: All the symbols that appear twice come only from config.sh (hence the ?X: two config.sh in the command line). These symbols will be removed by ?X: the uniq -u command. The oldsyms file thus contains all the symbols ?X: that did not appear in the produced config.sh (Larry Wall). ?X: ?X: Do not touch the -u flag of uniq. This means you too, Jarkko. ?X: $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \ config.sh config.sh UU/oldconfig.sh |\ $sort | $uniq -u >UU/oldsyms set X `cat UU/oldsyms` shift case $# in 0) ;; *) cat <>config.sh for sym in `cat UU/oldsyms`; do echo " Propagating $hint variable "'$'"$sym..." eval 'tmp="$'"${sym}"'"' echo "$tmp" | \ sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh done ;; esac fi dist_3.5-36.001/mcon/U/fpostype.U0000644000175000017500000000261012142511050016532 0ustar srivastasrivasta?RCS: $Id: fpostype.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: fpostype.U,v $ ?RCS: Revision 3.0.1.2 1994/08/29 16:20:52 ram ?RCS: patch32: now uses new Typedef unit to compute type information ?RCS: ?RCS: Revision 3.0.1.1 1994/06/20 06:59:59 ram ?RCS: patch30: created ?RCS: ?MAKE:fpostype: Myread Typedef ?MAKE: -pick add $@ %< ?S:fpostype: ?S: This variable defines Fpos_t to be something like fpost_t, long, ?S: uint, or whatever type is used to declare file positions in libc. ?S:. ?C:Fpos_t: ?C: This symbol holds the type used to declare file positions in libc. ?C: It can be fpos_t, long, uint, etc... It may be necessary to include ?C: to get any typedef'ed information. ?C:. ?H:#define Fpos_t $fpostype /* File position type */ ?H:. : see what type file positions are declared as in the library set fpos_t fpostype long stdio.h sys/types.h eval $typedef echo " " dflt="$fpostype" rp="What is the type for file position used by fsetpos()?" . ./myread fpostype="$ans" dist_3.5-36.001/mcon/U/d_PORTAR.U0000644000175000017500000000402212142511050016172 0ustar srivastasrivasta?RCS: $Id: d_PORTAR.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_PORTAR.U,v $ ?RCS: Revision 3.0.1.1 1994/10/29 16:08:42 ram ?RCS: patch36: added ?F: line for metalint file checking ?RCS: ?RCS: Revision 3.0 1993/08/18 12:05:40 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_PORTAR: cat +cc rm Setvar ?MAKE: -pick add $@ %< ?S:d_PORTAR: ?S: This variable conditionally handles definition of PORTAR, ?S: a creation of greater minds than I can imagine. ?S:. ?C:PORTAR: ?C: This manifest constant must be defined to 1 for some implementations ?C: of ar.h to get the portable ar most everybody uses. ?C:. ?L:ar_fmag: ?L:ARFMAG: ?L:SARMAG: ?H:#$d_PORTAR PORTAR 1 /**/ ?H:. ?F:!portar ?LINT:set d_PORTAR : see if we need to define PORTAR echo " " echo 'Checking to see if we need to define PORTAR for portable archives...' >&4 $cat >portar.c <<'EOCP' #include int main() { char *arfmag = ARFMAG; int sarmag = SARMAG; struct ar_hdr arh; strncpy(arh.ar_fmag, arfmag, 2); #ifdef PORTAR printf("D\n"); #else printf("U\n"); #endif exit(0);} EOCP if $cc -o portar portar.c >/dev/null 2>&1 || \ $cc -DPORTAR=1 -o portar portar.c >/dev/null 2>&1 ; then case "`./portar`" in D) val="$define" echo "We'll be defining PORTAR for you." ;; U) val="$undef" echo "We don't seem to need PORTAR defined here." ;; *) val="$define" echo "(My test program gave me an unexpected value!)" echo "I'll just define PORTAR to be sure." ;; esac else echo "(Strange, I couldn't get my test program to compile.)" echo "We'll just define PORTAR in this case." val="$define" fi set d_PORTAR eval $setvar $rm -f portar* dist_3.5-36.001/mcon/U/d_speedopt.U0000644000175000017500000000351312142511050017012 0ustar srivastasrivasta?RCS: $Id: d_speedopt.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_speedopt.U,v $ ?RCS: Revision 3.0.1.1 1994/10/29 16:15:51 ram ?RCS: patch36: call ./Cppsym explicitely instead of relying on PATH ?RCS: ?RCS: Revision 3.0 1993/08/18 12:07:27 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_speedopt: Myread Cppsym Oldconfig cat models Setvar ?MAKE: -pick add $@ %< ?S:d_speedopt: ?S: This variable conditionally defines the SPEED_OVER_MEM symbol, which ?S: indicates to the C program that it can burn memory in order to save ?S: CPU time. ?S:. ?C:SPEED_OVER_MEM (SPEEDOVERMEM): ?C: This symbol, if defined, indicates that the program can use more ?C: memory in order to reduce CPU time. The symbol doesn't say whether ?C: we are more interested in saving text space or data space. ?C:. ?H:#$d_speedopt SPEED_OVER_MEM /**/ ?H:. ?LINT:set d_speedopt : do we want speed at the expense of memory $cat <<'EOM' I can try to optimize this package for either speed or memory. If you have limited address space you may wish to optimize for memory. Otherwise you should probably optimize for speed. EOM case "$d_speedopt" in '') if ./Cppsym $smallmach; then case "$models" in *large*|*huge*) dflt=speed;; *) dflt=memory;; esac else dflt=speed fi ;; *define*) dflt=speed;; *) dflt=memory;; esac rp="What to optimize for?" . ./myread case "$ans" in mem*) val="$undef";; *) val="$define";; esac set d_speedopt eval $setvar dist_3.5-36.001/mcon/U/d_getuid.U0000644000175000017500000000200112142511050016437 0ustar srivastasrivasta?RCS: $Id: d_getuid.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_getuid: Trylink cat i_unistd ?MAKE: -pick add $@ %< ?S:d_getuid: ?S: This variable conditionally defines the HAS_GETUID symbol, which ?S: indicates to the C program that getuid() is available. ?S:. ?C:HAS_GETUID: ?C: This symbol is defined when getuid() can be used. ?C:. ?H:#$d_getuid HAS_GETUID ?H:. ?LINT: set d_getuid : can we use getuid? $cat >try.c < #$i_unistd I_UNISTD #ifdef I_UNISTD #include #endif int main(void) { static uid_t ret; ret |= getuid(); return ret ? 0 : 1; } EOC cyn=getuid set d_getuid eval $trylink dist_3.5-36.001/mcon/U/d_hidnet.U0000644000175000017500000000442312142511050016443 0ustar srivastasrivasta?RCS: $Id: d_hidnet.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_hidnet.U,v $ ?RCS: Revision 3.0 1993/08/18 12:06:20 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_hidnet hiddennet: cat sed myhostname mydomain Myread Oldconfig ?MAKE: -pick add $@ %< ?S:d_hidnet: ?S: This variable conditionally defines the symbol HIDDEN_NET, which ?S: tells the C program that it should pretend it is on a different ?S: host for purposes of advertising a mailing address. ?S:. ?S:hiddennet: ?S: This variable contains the value eventually given to the symbol ?S: HIDDEN_NET, if d_hidnet defines it. If defined, it's the name ?S: of the host which serves as the mail server for a network that ?S: is invisible to the outside world. ?S:. ?C:HIDDEN_NET (HIDDENNET): ?C: This symbol, if defined, contains the host name that you want to ?C: advertise to the outside world. This name can be different from ?C: your actual host name, as long as the machine you specify knows ?C: how to forward mail to you. ?C:. ?H:#$d_hidnet HIDDEN_NET "$hiddennet" /**/ ?H:. : now get the host name to advertise as our mailing address case "$hiddennet" in '') dflt=n;; *) dflt=y;; esac $cat <