|
Warning: this is a htmlized version!
The original is across this link. |
#######
#
# E-scripts on Icon
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/a/e/icon.e>
# or at <http://angg.twu.net/e/icon.e.html>.
# See also <http://angg.twu.net/emacs.html>,
# <http://angg.twu.net/a/.emacs[.html]>,
# <http://angg.twu.net/a/.zshrc[.html]>,
# <http://angg.twu.net/escripts.html>,
# and <http://angg.twu.net/>.
#
#######
######
#
# icon (hamm)
#
######
# (find-fline "/var/lib/dpkg/info/icont.list")
# (find-fline "/var/lib/dpkg/info/iconx.list")
# (find-fline "/var/lib/dpkg/info/icon-ipl.list")
rm -Rv /usr/doc/icon-ipl/
rm -Rv /usr/lib/icon/ipl/
dpkg --purge icon-ipl
dpkg -i ~/HASH/icon-ipl
##########
#
# Icon 9.3
# 97apr27
#
##########
cd /usr/src/
rm -R icon
mkdir icon
cd icon
tar -xzf /snarf/ftp/ftp.cs.arizona.edu/icon/packages/unix/unix.tar.gz
#
#
# Apply the Posix interface patch:
cd /usr/src/icon/
tar -xvzf /snarf/ftp/ftp.crl.com/users/sp/spm/unicon-patches.tar.gz
patch -p < Unicon/unicon.patch |& tee op
#
#
cd /usr/src/icon/
make Status name=ix86_linux_elf |& tee omS
# hora do patch manual, se for o caso
make X-Configure name=ix86_linux_elf |& tee omXC
make Icon |& tee omI
#
# Isso dá merda. Tire o -Wl,-E de LDFLAGS.
# Now that (^) works without the patch but I had to change dbm to gdbm
# (find-fline "/usr/src/icon/src/runtime/Makefile" 4)
# (find-fline "/usr/src/icon/config/unix/ix86_linux_elf/runtime.hdr")
# make Icon |& tee omI2
#
# To keep the intermediate C files:
# (find-fline "/usr/src/icon/config/unix/Config/runtime.make" 47)
# (find-fline "/usr/src/icon/src/runtime/Makefile" 54)
#
cd /usr/src/icon/bin/
tar -cvzf /home/compiled/icon9.3.tgz icont iconx patchstr
patchstr icont /usr/bin/iconx
cp -iv icont iconx patchstr /usr/bin/
#
cd /usr/src/icon/ipl/
Translate-icont |& tee oTi
########
#
# Icon 9.3.1
#
########
cd /usr/src/
rm -Rv icon/
mkdir /usr/src/icon/
cd /usr/src/icon/
tar -xvzf /snarf/http/www.cs.arizona.edu/icon/ftp/packages/unix/unix.tgz
echo '#define MultiThread' >> /usr/src/icon/config/unix/intel_linux/define.h
sleep 2
echo -n > .start
sleep 2
make Supported
make Status name=intel_linux
# make Configure name=intel_linux |& tee omc
make X-Configure name=intel_linux |& tee omXC
make Icon |& tee omI
cd /usr/src/icon/
find * -type f -and -anewer .start > .files.used
glimpseindex -H . -F < .files.used
cd /usr/src/icon/bin/
patchstr icont /usr/src/icon/bin/iconx
rm -v /usr/bin/icon{_vt,t,x}
ln -s /usr/src/icon/bin/icont /usr/bin/icont
ln -s /usr/src/icon/bin/iconx /usr/bin/iconx
rm -Rv /usr/src/icon/ipl/
mkdir /usr/src/icon/ipl/
cd /usr/src/icon/ipl/
tar -xvzf /snarf/http/www.cs.arizona.edu/icon/ftp/library/info.tgz
tar -xvzf /snarf/http/www.cs.arizona.edu/icon/ftp/library/bipl.tgz
tar -xvzf /snarf/http/www.cs.arizona.edu/icon/ftp/library/gipl.tgz
tar -xvzf /snarf/http/www.cs.arizona.edu/icon/ftp/library/mipl.tgz
# (find-fline "/usr/src/icon/ipl/README")
export IPATH="/usr/src/icon/ipl/mprocs /usr/src/icon/ipl/procs /usr/src/icon/ipl/gprocs"
export LPATH="/usr/src/icon/ipl/mincl /usr/src/icon/ipl/incl /usr/src/icon/ipl/gincl"
cd /usr/src/icon/ipl/procs/; for i (*.icn); do icont -c $i; done
cd /usr/src/icon/ipl/mprocs/; for i (*.icn); do icont -c $i; done
cd /usr/src/icon/ipl/gprocs/; for i (*.icn); do icont -c $i; done
cd /usr/src/icon/ipl/gprogs/; for i (*.icn); do icont $i; done
cd /usr/src/icon/ipl/mprogs/; for i (*.icn); do icont $i; done
# (find-fline "/usr/src/icon/ipl/ipd283.txt" "mticont")
# (find-fline "/usr/src/icon/ipl/docs/ipd169.doc")
# (find-fline "/usr/src/icon/src/runtime/fmisc.r")
# (find-fline "/usr/src/icon/src/h/fdefs.h")
# (find-fline "/usr/src/icon/src/runtime/interp.r" "switch ((int)lastop)")
cd /usr/src/icon/src/runtime/
agrep '^function' * | sort -t' ' +2
cd /usr/src/icon/
glimpse -y -H . MultiThread
glimpse -y -H . TallyOpt
glimpse -y -H . FncTrace
glimpse -y -H . MultipleRuns
cd /usr/src/icon/
cat $(<.files.used) | agrep '^#ifdef' | sort | uniq
agrep '^#ifdef' $(<.files.used)
#
# (find-fline "/usr/src/icon/bin/t.icn")
# (find-fline "/usr/src/icon/src/h/features.h" "multiple programs")
# cd /usr/src/icon/bin/
# ./icont t.icn
# ./t
# (find-fline "/usr/src/icon/omI" "rt.h")
# (find-fline "/usr/src/icon/src/common/doincl.c")
# (find-fline "/usr/src/icon/src/h/rt.h")
# (find-fline "/usr/src/icon/bin/rt.h")
# (find-fline "/usr/src/icon/src/h/define.h")
# (find-fline "/usr/src/icon/omXC")
# (find-fline "/usr/src/icon/config/unix/intel_linux/define.h")
# (find-fline "/usr/src/icon/src/common/")
# (find-k2tag "time_t")
# (find-node "(libc)Top")
# (find-node "(libc)High-Resolution Calendar")
# (find-fline "/usr/include/sys/time.h")
cd /usr/src/icon/bin/
cat > t.icn <<'EOF'
procedure main()
every write(&features)
every write(function())
end
EOF
./icont -o t931 t.icn
/usr/bin/icont -o trh t.icn
./t931 | sort > o931
./trh | sort > orh
diff o931 orh
# find * -name '*.[chS]' -and -anewer .mkzImage-start > .files.chS.used
# etags `cat .files.chS.used`
##########
#
# Icon 9.3
# 97apr27
#
##########
cd /usr/src/
rm -R icon
mkdir icon
cd icon
tar -xzf /snarf/ftp/ftp.cs.arizona.edu/icon/packages/unix/unix.tar.gz
#
#
# Apply the Posix interface patch:
cd /usr/src/icon/
tar -xvzf /snarf/ftp/ftp.crl.com/users/sp/spm/unicon-patches.tar.gz
patch -p < Unicon/unicon.patch |& tee op
#
#
cd /usr/src/icon/
make Status name=ix86_linux_elf |& tee omS
# hora do patch manual, se for o caso
make X-Configure name=ix86_linux_elf |& tee omXC
make Icon |& tee omI
#
# Isso dá merda. Tire o -Wl,-E de LDFLAGS.
# Now that (^) works without the patch but I had to change dbm to gdbm
# (find-fline "/usr/src/icon/src/runtime/Makefile" 4)
# (find-fline "/usr/src/icon/config/unix/ix86_linux_elf/runtime.hdr")
# make Icon |& tee omI2
#
# To keep the intermediate C files:
# (find-fline "/usr/src/icon/config/unix/Config/runtime.make" 47)
# (find-fline "/usr/src/icon/src/runtime/Makefile" 54)
#
cd /usr/src/icon/bin/
tar -cvzf /home/compiled/icon9.3.tgz icont iconx patchstr
patchstr icont /usr/bin/iconx
cp -iv icont iconx patchstr /usr/bin/
#
cd /usr/src/icon/ipl/
Translate-icont |& tee oTi
# or...
rpm -ihv /snarf/ftp/ftp.redhat.com/pub/contrib/i386/icon-9.3-1.i386.rpm
#######
#
# Icon 9.3 under Debian 2.0
#
#######
# Também falta o symlink X11 -> X11R6 em /usr.
dpkg -iEG xlib6g-dev
dpkg -iEG libelfg0 libelfg0-dev
debsource /debian/main/source/devel icon 9.3 -1
#
# (find-iconfile "debian/rules" 13)
# Change "i486_linux" to "ix86_linux_elf"
#
debian/rules binary-iconx |& tee odrbx
# (find-iconfile "debian/rules")
# (find-iconfile "odrbx")
# (find-iconfile "config/unix/ix86_linux_elf/")
# (find-iconfile "debian/rules" "dpkg")
cd /usr/src/icon-9.3/config/unix/ix86_linux_elf/
mycat * > ~/oelf
cd /usr/src/icon-9.3/config/unix/i486_linux/
mycat * > ~/o486
diff ~/oelf ~/o486
find /usr/include/ -follow
# (find-iconfile "src/runtime/fload.r")
# (find-iconfile "src/runtime/extcall.r")
# (find-iconfile "src/h/fdefs.h" "loadfunc")
# (find-iconfile "tests/calling/Makefile")
# (find-iconfile "tests/calling/loadfunc/Makefile")
# (find-iconfile "tests/calling/loadfunc/btest.icn")
# (find-iconfile "tests/calling/loadfunc/README")
# (find-iconfile "tests/calling/README")
# (find-iconfile "bin/rt.h" "LoadFunc")
# (find-iconfile "config/unix/ix86_linux_elf/define.h" "LoadFunc")
# (find-iconfile "docs/ipd238.txt")
# (find-iconfile "src/runtime/fload.r")
# (find-iconfile "src/h/fdefs.h")
# (find-iconfile "src/h/features.h" "LoadFunc")
# (find-iconfile "src/h/sys.h")
#####
#
# some tests
#
#####
# (find-fline "~/.zshrc" "iconw")
iconw 'args[1:0]' a b c d e
iconw 'args[2:-1]' a b c d e
iconw 'args[5:0]' a b c d e
iconw 'args[6:0]' a b c d e
iconw 'args[7:0]' a b c d e
iconw 'args[3:2]' a b c d e
iconw 'args[5:2]' a b c d e
####
#
# imt (meta translators)
#
####
rm -Rv /usr/src/imt/
mkdir /usr/src/imt/
cd /usr/src/imt/
tar -xvzf $S/ftp/ftp.cs.arizona.edu/icon/imt/source/meta.taz
# (find-fline "$S/ftp/ftp.cs.arizona.edu/icon/imt/")
make |& tee om
# Oops. In tlex.c, tree.h, ttoken.h: problems with yylval.