|
|
1.1 ! root 1: #!/bin/sh ! 2: ! 3: # ! 4: # Shell script to create proper links to machine-dependent files in ! 5: # preparation for compiling gdb. ! 6: # ! 7: # Usage: config.gdb machine ! 8: # ! 9: # If config.gdb succeeds, it leaves its status in config.status. ! 10: # If config.gdb fails after disturbing the status quo, ! 11: # config.status is removed. ! 12: # ! 13: ! 14: progname=$0 ! 15: ! 16: case $# in ! 17: 1) ! 18: machine=$1 ! 19: paramfile=m-${machine}.h ! 20: initfile=m-${machine}init.h ! 21: pinsnfile=${machine}-pinsn.c ! 22: opcodefile=${machine}-opcode.h ! 23: ! 24: case $machine in ! 25: hp9k320) ! 26: initfile=m-sun3init.h ! 27: pinsnfile=m68k-pinsn.c ! 28: opcodefile=m68k-opcode.h ! 29: ;; ! 30: hp9k320bsd) ! 31: initfile=m-sun3init.h ! 32: pinsnfile=m68k-pinsn.c ! 33: opcodefile=m68k-opcode.h ! 34: ;; ! 35: isi) ! 36: # some version of m68k-pinsn.c should work here ! 37: pinsnfile=m68k-pinsn.c ! 38: opcodefile=m68k-opcode.h ! 39: ;; ! 40: merlin) ! 41: # m-umaxinit.h? ! 42: initfile=unknown-or-unavailable ! 43: pinsnfile=ns32k-pinsn.c ! 44: opcodefile=ns32k-opcode.h ! 45: ;; ! 46: news) ! 47: pinsnfile=m68k-pinsn.c ! 48: opcodefile=m68k-opcode.h ! 49: ;; ! 50: npl) ! 51: pinsnfile=gld-pinsn.c ! 52: ;; ! 53: pn) ! 54: pinsnfile=gld-pinsn.c ! 55: ;; ! 56: sun2) ! 57: pinsnfile=m68k-pinsn.c ! 58: opcodefile=m68k-opcode.h ! 59: ;; ! 60: sun3) ! 61: pinsnfile=m68k-pinsn.c ! 62: opcodefile=m68k-opcode.h ! 63: ;; ! 64: umax) ! 65: pinsnfile=ns32k-pinsn.c ! 66: opcodefile=ns32k-opcode.h ! 67: ;; ! 68: test) ! 69: paramfile=one ! 70: initfile=two ! 71: pinsnfile=three ! 72: opcodefile=four ! 73: ;; ! 74: esac ! 75: ! 76: files="$paramfile $initfile $pinsnfile $opcodefile" ! 77: links="param.h m-init.h pinsn.c opcode.h" ! 78: ! 79: while [ -n "$files" ] ! 80: do ! 81: # set file to car of files, files to cdr of files ! 82: set $files; file=$1; shift; files=$* ! 83: set $links; link=$1; shift; links=$* ! 84: ! 85: if [ ! -r $file ] ! 86: then ! 87: echo "$progname: cannot create a link \`$link'," ! 88: echo "since the file \`$file' does not exist." ! 89: exit 1 ! 90: fi ! 91: ! 92: rm -f $link config.status ! 93: # Make a symlink if possible, otherwise try a hard link ! 94: ln -s $file $link 2>/dev/null || ln $file $link ! 95: ! 96: if [ ! -r $link ] ! 97: then ! 98: echo "$progname: unable to link \`$link' to \`$file'." ! 99: exit 1 ! 100: fi ! 101: echo "Linked \`$link' to \`$file'." ! 102: done ! 103: ! 104: echo "Links are now set up for use with a $machine." \ ! 105: | tee config.status ! 106: exit 0 ! 107: ;; ! 108: *) ! 109: echo "Usage: $progname machine" ! 110: echo -n "Where \`machine' is something like " ! 111: echo "\`vax', \`sun3', \`umax', etc." ! 112: if [ -r config.status ] ! 113: then ! 114: cat config.status ! 115: fi ! 116: exit 1 ! 117: ;; ! 118: esac ! 119:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.