Function: ede-pmake-insert-variable-shared

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

Signature

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

Documentation

Add VARNAME into the current Makefile.

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-shared (varname &rest body)
  "Add VARNAME into the current Makefile.
Execute BODY in a location where a value can be placed."
  (declare (debug t) (indent 1))
  `(let ((addcr t) (v ,varname))
     (if (save-excursion
	   (goto-char (point-max))
	   (re-search-backward (concat "^" v "\\s-*=") nil t))
	 (progn
	   (goto-char (match-end 0))
	   (ede-pmake-end-of-variable)
	   (if (< (current-column) 40)
	       (if (and (/= (preceding-char) ?=)
			(/= (preceding-char) ? ))
		   (insert " "))
	     (insert "\\\n   "))
	   (setq addcr nil))
       (insert v "="))
     ,@body
     (if addcr (insert "\n"))
     (goto-char (point-max))))