coremodule.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #! /bin/sh
  2. echo build core module $1 for architecture $2
  3. a=$0
  4. c=unknown
  5. case $a in
  6. /* )
  7. c=$a
  8. ;;
  9. */* )
  10. case $a in
  11. ./* )
  12. a=`echo $a | sed -e s+./++`
  13. ;;
  14. esac
  15. c=`pwd`/$a
  16. ;;
  17. * )
  18. for d in $PATH
  19. do
  20. if test -x $d/$a
  21. then
  22. c=$d/$a
  23. fi
  24. done
  25. if test $c = "unknown" ;then
  26. echo "Unable to find full path for script. Please re-try"
  27. echo "launching it using a fully rooted path."
  28. exit 1
  29. fi
  30. ;;
  31. esac
  32. cpsldir=`echo $c | sed -e 's+/[^/]*$++'`
  33. creduce=$cpsldir/..
  34. if test -x /usr/bin/cygpath
  35. then
  36. psldir=`cygpath -m "$cpsldir"`
  37. reduce=`cygpath -m "$creduce"`
  38. else
  39. psldir="$cpsldir"
  40. reduce="$creduce"
  41. fi
  42. fasl=red
  43. if test -f psl/64
  44. then
  45. STORE=500
  46. else
  47. STORE=64000000
  48. fi
  49. export fasl psldir reduce
  50. psl/bpsl -td $STORE -f red/bootstrap.img <<XXX > buildlogs/$1.blg
  51. symbolic;
  52. load compiler;
  53. errorset('(load compat),nil,nil); % PSL compiler support.
  54. on verboseload;
  55. load remake;
  56. !*argnochk := t;
  57. begin
  58. scalar w, i, s;
  59. i := open("$reduce/packages/package.map", 'input);
  60. s := rds i;
  61. w := read();
  62. rds s;
  63. close i;
  64. for each x in w do put(car x, 'folder, cadr x)
  65. end;
  66. package!-remake '$1;
  67. if !*faslp
  68. then system "touch $reduce/psl/mkreduce";
  69. bye;
  70. XXX
  71. grep -q '^\*\*\*\*\* ' buildlogs/$1.blg && echo Possible error building noncore module $1 - check buildlogs/$1.blg && exit 1
  72. exit 0