ack/first/mk_makefile

36 lines
508 B
Bash
Executable file

#!/bin/sh
: '$Id$'
: This shell script inserts make macros after a line
: starting with #PARAMS in "make_proto", and produces the result on
: standard output.
trap "rm -f /tmp/mk_mak$$" 0 1 2 3 15
case $# in
1) ;;
*) echo "Usage: $0 <make_proto>" 1>&2
exit 1
;;
esac
cp $1 /tmp/mk_mak$$
ed -s /tmp/mk_mak$$ << 'EOF'
/^#PARAMS/c
#PARAMS do not remove this line!
.
w
q
EOF
case `ack_sys` in
sparc_solaris)
ed -s /tmp/mk_mak$$ << 'EOF'
g/^EXTRALIB/s/=/= -lelf/
w
q
EOF
;;
esac
cat /tmp/mk_mak$$
exit 0