#! ${SH} # # $FreeBSD$ PATH_TO_CONFIG="${PREFIX}/etc/natams.conf" PATH_TO_LOG="/var/log/netams.log" FLAGS="-g" cd ${WRKSRC} rm -f Makefile.new cp Makefile Makefile.orig grep -v "^LIB" Makefile > Makefile.new || exit 1 grep -v "^DEFINE" Makefile.new > Makefile || exit 1 grep -v "^PATH_TO_CONFIG" Makefile > Makefile.new || exit 1 grep -v "^PATH_TO_LOG" Makefile.new > Makefile || exit 1 grep -v "^FLAGS" Makefile > Makefile.new || exit 1 grep -v "^CFLAGS" Makefile.new > Makefile || exit 1 echo "PATH_TO_CONFIG=${PATH_TO_CONFIG}" > Makefile.new || exit 1 echo "PATH_TO_LOG=${PATH_TO_LOG}" >> Makefile.new || exit 1 echo "LIB=${LIB}" >> Makefile.new || exit 1 echo "DEFINE=${DEFINE}" >> Makefile.new || exit 1 echo "FLAGS=${FLAGS}" >> Makefile.new || exit 1 echo 'CFLAGS = $(FLAGS) -I$(INCLUDE) $(DEFINE)' >> Makefile.new || exit 1 cat Makefile >> Makefile.new || exit 1 mv -f Makefile.new Makefile || exit 1