Function: pcmpl-gnu-make-rule-names

pcmpl-gnu-make-rule-names is a byte-compiled function defined in pcmpl-gnu.el.gz.

Signature

(pcmpl-gnu-make-rule-names)

Documentation

Return a list of possible make targets in a makefile in the current directory.

Source Code

;; Defined in /usr/src/emacs/lisp/pcmpl-gnu.el.gz
(defun pcmpl-gnu-make-rule-names ()
  "Return a list of possible make targets in a makefile in the current directory."
  (let* ((minus-f (member "-f" pcomplete-args))
	 (makefile (or (cadr minus-f)
		       (cond
                        ((file-exists-p "GNUmakefile") "GNUmakefile")
                        ((file-exists-p "makefile") "makefile")
                        (t "Makefile"))))
	 rules)
    (if (not (file-readable-p makefile))
	(unless minus-f (list "-f"))
      (setq rules (pcmpl-gnu-make-all-targets makefile rules))
      (pcomplete-uniquify-list rules))))