mk_makefile 508 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. : '$Id$'
  3. : This shell script inserts make macros after a line
  4. : starting with #PARAMS in "make_proto", and produces the result on
  5. : standard output.
  6. trap "rm -f /tmp/mk_mak$$" 0 1 2 3 15
  7. case $# in
  8. 1) ;;
  9. *) echo "Usage: $0 <make_proto>" 1>&2
  10. exit 1
  11. ;;
  12. esac
  13. cp $1 /tmp/mk_mak$$
  14. ed -s /tmp/mk_mak$$ << 'EOF'
  15. /^#PARAMS/c
  16. #PARAMS do not remove this line!
  17. .
  18. w
  19. q
  20. EOF
  21. case `ack_sys` in
  22. sparc_solaris)
  23. ed -s /tmp/mk_mak$$ << 'EOF'
  24. g/^EXTRALIB/s/=/= -lelf/
  25. w
  26. q
  27. EOF
  28. ;;
  29. esac
  30. cat /tmp/mk_mak$$
  31. exit 0