make-mode

Homepage: https://www.gnu.org/software/emacs

Author: Eric S. Raymond, Thomas Neumann

Summary

Makefile editing commands for Emacs

Commentary

A major mode for editing makefiles.  The mode knows about Makefile
syntax and defines M-n and M-p to move to next and previous productions.

The keys $, =, : and . are electric; they try to help you fill in a
macro reference, macro definition, ordinary target name, or special
target name, respectively.  Such names are completed using a list of
targets and macro names parsed out of the makefile.  This list is
automatically updated, if necessary, whenever you invoke one of
these commands.  You can force it to be updated with C-c C-p.

The command C-c C-f adds certain filenames in the current directory
as targets.  You can filter out filenames by setting the variable
makefile-ignored-files-in-pickup-regex.

The command C-c C-u grinds for a bit, then pops up a report buffer
showing which target names are up-to-date with respect to their
prerequisites, which targets are out-of-date, and which have no
prerequisites.

The command C-c C-b pops up a browser window listing all target and
macro names.  You can mark or unmark items with C-c SPC, and insert
all marked items back in the Makefile with C-c TAB.

The command C-c TAB in the makefile buffer inserts a GNU make builtin.
You will be prompted for the builtin's args.

There are numerous other customization variables.


To Do:

* Add missing doc strings, improve terse doc strings.
* Eliminate electric stuff entirely.
* It might be nice to highlight targets differently depending on
  whether they are up-to-date or not.  Not sure how this would
  interact with font-lock.
* Would be nice to edit the commands in ksh-mode and have
  indentation and slashification done automatically.  Hard.
* Consider removing browser mode.  It seems useless.
* ":" should notice when a new target is made and add it to the
  list (or at least set makefile-need-target-pickup).
* Make browser into a major mode.
* Clean up macro insertion stuff.  It is a mess.
* Browser entry and exit is weird.  Normalize.
* Browser needs to be rewritten.  Right now it is kind of a crock.
  Should at least:
   * Act more like dired/buffer menu/whatever.
   * Highlight as mouse traverses.
   * B2 inserts.
* Update documentation above.
* Update texinfo manual.
* Update files.el.

Dependencies

Reverse dependencies