mkconv 555 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/rc
  2. x=/tmp/mk$pid
  3. fn sigexit { rm -f $x }
  4. fn sigint { rm -f $x }
  5. tee $x < $1 | sed -e 's/\$\(([^)]*)\)([ :\/])/$\1\2/g
  6. s/\$\(([^)]*)\)$/$\1/g
  7. s/\$\(([^)]*)\)/${\1}/g
  8. s/^ @/ /
  9. /^ -/,/[^\\]$/{
  10. /[^\\]\$/s/$/; set -e/
  11. }
  12. /^ -/s/ -/ set +e; /
  13. s/:\&/:/
  14. s/\$% /$stem /g
  15. s/\$%\./$stem\./g
  16. s/\$%/${stem}/g
  17. s/\$@([ ]|$)/$target\1/g
  18. s/\$@/${target}/g
  19. s/\$\^/${prereq}/g
  20. s/\$\?/$newprereq/g'
  21. if(grep -s 'cd[ ]|make' < $x){
  22. {
  23. echo 'Warning: recipes containing cd or make need attention.'
  24. grep 'cd[ ]|make' < $x
  25. } >[1=2]
  26. }