install_tail 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #!/bin/sh
  2. set -e
  3. PATH=::$CONFIG/bin:$UTIL_HOME/bin:/usr/ccs/bin:/usr/ucb:$PATH
  4. export PATH
  5. $SRC_HOME/first/create_dir $CONFIG
  6. $SRC_HOME/first/create_dir $CONFIG/bin
  7. (
  8. # Slight complication here to ensure that the #! magic at the
  9. # beginning of TakeAction is preserved correctly.
  10. head -1 $SRC_HOME/TakeAction
  11. echo "PATH=:$CONFIG/bin:$UTIL_HOME/bin:$PATH; export PATH"
  12. tail +2 $SRC_HOME/TakeAction
  13. ) > $CONFIG/bin/TakeAction
  14. sed '/^#PARAMS/r make_macros' < $SRC_HOME/first/mk_makefile > $CONFIG/bin/mk_makefile
  15. cp $SRC_HOME/first/create_dir $CONFIG/bin/create_dir
  16. cp $SRC_HOME/first/cp_dir $CONFIG/bin/cp_dir
  17. chmod +x $CONFIG/bin/*
  18. $SRC_HOME/first/mk_config
  19. $SRC_HOME/first/mk_target
  20. $SRC_HOME/first/limit_impl
  21. case $SYSNAME in
  22. i386)
  23. ed -s $TARGET_HOME/lib/descr/fe << 'ABC'
  24. 1,$s/-D{NAME}/-D{NAME} -DNO_PROTOTYPE/
  25. w
  26. q
  27. ABC
  28. ;;
  29. esac
  30. : find varargs include file
  31. : if not present use our own
  32. if test -f /usr/include/varargs.h
  33. then
  34. :
  35. else
  36. cp $SRC_HOME/include/_tail_cc/varargs.h $TARGET_HOME/modules/h
  37. fi
  38. case X$SYSVAX in
  39. Xvax_sysV_2)
  40. ed -s $TARGET_HOME/lib/vax4/descr << 'ABC'
  41. /CPP_F/s/$/ -D__USG/
  42. w
  43. q
  44. ABC
  45. ed -s $CONFIG/mach/vax4/Action << 'ABC'
  46. /libbsd4_2/s/libbsd4_2/libsysV_2/
  47. w
  48. q
  49. ABC
  50. ( cd $CONFIG/mach/vax4
  51. for i in libcc libcc.ansi
  52. do
  53. ed -s $i/Makefile << 'ABC'
  54. /BFS/s/BFS/UFS/
  55. w
  56. q
  57. ABC
  58. done
  59. )
  60. ;;
  61. Xvax_bsd4_2)
  62. ed -s $TARGET_HOME/lib/vax4/descr << 'ABC'
  63. /CPP_F/s/$/ -D__BSD4_2/
  64. w
  65. q
  66. ABC
  67. ;;
  68. Xvax_bsd4_1a)
  69. ed -s $CONFIG/mach/vax4/Action << 'ABC'
  70. /libbsd4_2/s/libbsd4_2/libbsd4_1a/
  71. w
  72. q
  73. ABC
  74. ;;
  75. esac
  76. : and finally installing ...
  77. cd $CONFIG
  78. set +e
  79. exec TakeAction