Function: ede-pmake-insert-variable-once

ede-pmake-insert-variable-once is a macro defined in pmake.el.gz.

Signature

(ede-pmake-insert-variable-once VARNAME &rest BODY)

Documentation

Add VARNAME into the current Makefile if it doesn't exist.

Execute BODY in a location where a value can be placed.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/pmake.el.gz
(defmacro ede-pmake-insert-variable-once (varname &rest body)
  "Add VARNAME into the current Makefile if it doesn't exist.
Execute BODY in a location where a value can be placed."
  (declare (debug t) (indent 1))
  `(let ((v ,varname))
     (unless
	 (save-excursion
	   (re-search-backward (concat "^" v "\\s-*=") nil t))
       (insert v "=")
       ,@body
       (insert "\n")
       (goto-char (point-max)))))