home *** CD-ROM | disk | FTP | other *** search
- /*
- * A script to apply to a Makefile to make it build a debugging version
- * of mg, instead of a production verion.
- */
-
- options results
- options failat 2
- signal on failure
-
- /* Get to the start of the right buffer */
- 'find-file Makefile'
- 'beginning-of-buffer'
-
- /* Fix the compile flags */
- 'search-forward CFLAGS'
- 'beginning-of-line'
- 'rexx-line'
- parse value result with first '-O' rest
- 'kill-line'
- 'rexx-insert 'slashquote(first'-g'rest, '\')
-
- /* Now, fix the link objects */
- 'search-forward tmp.lnk:'
- 'next-line'
- 'beginning-of-line'
- 'rexx-line'
- parse value result with first 'lib:cres.o' rest
- 'kill-line'
- 'rexx-insert 'slashquote(first'lib:catchres.o'rest, '\')
-
- /* And the linker flags */
- 'search-forward NODEBUG'
- 'beginning-of-line'
- 'rexx-line'
- parse value result with first 'NODEBUG' rest
- 'kill-line'
- 'rexx-insert 'slashquote(first'ADDSYM'rest, '\')
-
- /* And exit ok */
- exit 0
-
- /* We branch here if there's a problem */
- failure:
- exit 2