File: make-mode.el.html

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 TAB in the makefile buffer inserts a GNU make builtin. You will be prompted for the builtin's arguments.

There are numerous other customization variables.

Defined variables (66)

makefile-automake-mode-abbrev-tableAbbrev table for ‘makefile-automake-mode’.
makefile-automake-mode-hookHook run after entering ‘makefile-automake-mode’.
makefile-automake-mode-mapKeymap for ‘makefile-automake-mode’.
makefile-automake-mode-syntax-tableSyntax table for ‘makefile-automake-mode’.
makefile-automake-statementsList of keywords understood by automake.
makefile-backslash-alignIf non-nil, ‘makefile-backslash-region’ will align backslashes.
makefile-backslash-columnColumn in which ‘makefile-backslash-region’ inserts backslashes.
makefile-brave-makeHow to invoke make, for ‘makefile-query-targets’.
makefile-browser-auto-advance-after-selection-pIf non-nil, cursor will move after item is selected in Makefile browser.
makefile-browser-buffer-nameName of the macro- and target browser buffer.
makefile-browser-clientA buffer in Makefile mode that is currently using the browser.
makefile-browser-cursor-columnColumn the cursor goes to when it moves up or down in the Makefile browser.
makefile-browser-leftmost-columnNumber of blanks to the left of the browser selection mark.
makefile-browser-mapThe keymap that is used in the macro- and target browser.
makefile-browser-selected-markString used to mark selected entries in the Makefile browser.
makefile-browser-unselected-markString used to mark unselected entries in the Makefile browser.
makefile-bsdmake-dependency-regexRegex used to find dependency lines in a BSD makefile.
makefile-bsdmake-mode-abbrev-tableAbbrev table for ‘makefile-bsdmake-mode’.
makefile-bsdmake-mode-hookHook run after entering ‘makefile-bsdmake-mode’.
makefile-bsdmake-mode-mapKeymap for ‘makefile-bsdmake-mode’.
makefile-bsdmake-mode-syntax-tableSyntax table for ‘makefile-bsdmake-mode’.
makefile-bsdmake-rule-action-regexRegex used to highlight BSD rule action lines in font lock mode.
makefile-bsdmake-statementsList of keywords understood by BSD make.
makefile-cleanup-continuationsIf non-nil, automatically clean up continuation lines when saving.
makefile-dependency-regexRegex used to find dependency lines in a makefile.
makefile-dependency-skipCharacters to skip to find a line that might be a dependency.
makefile-electric-keysIf non-nil, Makefile mode should install electric keybindings.
makefile-gmake-mode-abbrev-tableAbbrev table for ‘makefile-gmake-mode’.
makefile-gmake-mode-hookHook run after entering ‘makefile-gmake-mode’.
makefile-gmake-mode-mapKeymap for ‘makefile-gmake-mode’.
makefile-gmake-mode-syntax-tableSyntax table for ‘makefile-gmake-mode’.
makefile-gmake-statementsList of keywords understood by gmake.
makefile-gnumake-functions-alistAlist of GNU Make functions and their arguments.
makefile-ignored-files-in-pickup-regexRegex for filenames that will NOT be included in the target list.
makefile-imake-mode-abbrev-tableAbbrev table for ‘makefile-imake-mode’.
makefile-imake-mode-hookHook run after entering ‘makefile-imake-mode’.
makefile-imake-mode-mapKeymap for ‘makefile-imake-mode’.
makefile-imenu-generic-expressionImenu generic expression for Makefile mode. See ‘imenu-generic-expression’.
makefile-macro-assignString to append to all macro names inserted by ‘makefile-insert-macro’.
makefile-macro-tableTable of all macro names known for this buffer.
makefile-macroassign-regexRegex used to find macro assignment lines in a makefile.
makefile-makepp-mode-abbrev-tableAbbrev table for ‘makefile-makepp-mode’.
makefile-makepp-mode-hookHook run after entering ‘makefile-makepp-mode’.
makefile-makepp-mode-mapKeymap for ‘makefile-makepp-mode’.
makefile-makepp-mode-syntax-tableSyntax table for ‘makefile-makepp-mode’.
makefile-makepp-rule-action-regexRegex used to highlight makepp rule action lines in font lock mode.
makefile-makepp-statementsList of keywords understood by gmake.
makefile-mode-abbrev-tableAbbrev table in use in Makefile buffers.
makefile-mode-hookNormal hook run by ‘makefile-mode’.
makefile-mode-mapThe keymap that is used in Makefile mode.
makefile-mode-menuMenu for Makefile mode.
makefile-mode-syntax-tableSyntax table used in ‘makefile-mode’.
makefile-pickup-everything-picks-up-filenames-pIf non-nil, ‘makefile-pickup-everything’ picks up filenames as targets.
makefile-query-one-target-methodFunction to call to determine whether a make target is up to date.
makefile-query-one-target-method-functionFunction to call to determine whether a make target is up to date.
makefile-rule-action-regexRegex used to highlight rule action lines in font lock mode.
makefile-runtime-macros-listList of macros that are resolved by make at runtime.
makefile-spaceFace to use for highlighting leading spaces in Font-Lock mode.
makefile-special-targets-listList of special targets.
makefile-statementsList of keywords understood by standard make.
makefile-tab-after-target-colonIf non-nil, insert a TAB after a target colon.
makefile-target-colonString to append to all target names inserted by ‘makefile-insert-target’.
makefile-target-tableTable of all target names known for this buffer.
makefile-up-to-date-buffer-nameName of the Up-to-date overview buffer.
makefile-use-curly-braces-for-macros-pControls the style of generated macro references.
makefile-var-use-regexRegex used to find $(macro) uses in a makefile.

Defined functions (57)

makefile-add-log-defun()
makefile-append-backslash(COLUMN)
makefile-automake-mode()
makefile-backslash-region(FROM TO DELETE-FLAG)
makefile-browse(TARGETS MACROS)
makefile-browser-fill(TARGETS MACROS)
makefile-browser-format-macro-line(MACRO SELECTED)
makefile-browser-format-target-line(TARGET SELECTED)
makefile-browser-get-state-for-line(N)
makefile-browser-insert-continuation()
makefile-browser-insert-selection()
makefile-browser-next-line()
makefile-browser-on-macro-line-p()
makefile-browser-previous-line()
makefile-browser-quit()
makefile-browser-set-state-for-line(N TO-STATE)
makefile-browser-this-line-macro-name()
makefile-browser-this-line-target-name()
makefile-browser-toggle()
makefile-browser-toggle-state-for-line(N)
makefile-bsdmake-mode()
makefile-create-up-to-date-overview()
makefile-do-macro-insertion(MACRO-NAME)
makefile-electric-colon(ARG)
makefile-electric-dot(ARG)
makefile-electric-equal(ARG)
makefile-fill-paragraph(JUSTIFY)
makefile-format-macro-ref(MACRO-NAME)
makefile-forward-after-target-colon()
makefile-generate-temporary-filename()
makefile-gmake-mode()
makefile-imake-mode()
makefile-insert-gmake-function()
makefile-insert-macro(MACRO-NAME)
makefile-insert-macro-ref(MACRO-NAME)
makefile-insert-special-target()
makefile-insert-target(TARGET-NAME)
makefile-insert-target-ref(TARGET-NAME)
makefile-make-font-lock-keywords(VAR KEYWORDS SPACE &optional NEGATION &rest FL-KEYWORDS)
makefile-makepp-mode()
makefile-match-action(BOUND)
makefile-match-dependency(BOUND)
makefile-match-function-end(END)
makefile-mode()
makefile-mode-menu(ARG1)
makefile-next-dependency()
makefile-pickup-everything(ARG)
makefile-pickup-filenames-as-targets()
makefile-pickup-macros()
makefile-pickup-targets()
makefile-previous-dependency()
makefile-prompt-for-gmake-funargs(FUNCTION-NAME PROMPT-LIST)
makefile-query-by-make-minus-q(TARGET &optional FILENAME)
makefile-query-targets(FILENAME TARGET-TABLE PREREQ-LIST)
makefile-remember-macro(MACRO-NAME)
makefile-remember-target(TARGET-NAME &optional HAS-PREREQS)
makefile-save-temporary()

Defined faces (4)

makefile-makepp-perlFace to use for additionally highlighting Perl code in Font-Lock mode.
makefile-shellFace to use for additionally highlighting Shell commands in Font-Lock mode.
makefile-spaceFace to use for highlighting leading spaces in Font-Lock mode.
makefile-targetsFace to use for additionally highlighting rule targets in Font-Lock mode.