Function: makefile-query-targets

makefile-query-targets is a byte-compiled function defined in make-mode.el.gz.

Signature

(makefile-query-targets FILENAME TARGET-TABLE PREREQ-LIST)

Documentation

Fill the up-to-date overview buffer.

Checks each target in TARGET-TABLE using makefile-query-one-target-method-function and generates the overview, one line per target name.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/make-mode.el.gz
(defun makefile-query-targets (filename target-table prereq-list)
  "Fill the up-to-date overview buffer.
Checks each target in TARGET-TABLE using
`makefile-query-one-target-method-function'
and generates the overview, one line per target name."
  (insert
   (mapconcat
    (lambda (item)
      (let* ((target-name (car item))
             (no-prereqs (not (member target-name prereq-list)))
             (needs-rebuild (or no-prereqs
                                (funcall
                                 makefile-query-one-target-method-function
                                 target-name
                                 filename))))
        (format "\t%s%s"
                target-name
                (cond (no-prereqs "  .. has no prerequisites")
                      (needs-rebuild "  .. NEEDS REBUILD")
                      (t "  .. is up to date")))))
    target-table "\n"))
  (goto-char (point-min))
  (delete-file filename))		; remove the tmpfile