diff options
Diffstat (limited to 'doc/misc/flymake.texi')
| -rw-r--r-- | doc/misc/flymake.texi | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 74cf3d630da..28fb7864f06 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | This manual is for GNU Flymake (version @value{VERSION}, @value{UPDATED}), | 11 | This manual is for GNU Flymake (version @value{VERSION}, @value{UPDATED}), |
| 12 | which is a universal on-the-fly syntax checker for GNU Emacs. | 12 | which is a universal on-the-fly syntax checker for GNU Emacs. |
| 13 | 13 | ||
| 14 | Copyright @copyright{} 2004-2011 | 14 | Copyright @copyright{} 2004-2012 |
| 15 | Free Software Foundation, Inc. | 15 | Free Software Foundation, Inc. |
| 16 | 16 | ||
| 17 | @quotation | 17 | @quotation |
| @@ -449,10 +449,10 @@ Finally, we add an entry to @code{flymake-err-line-patterns}: | |||
| 449 | @cindex Adding support for C (gcc+make) | 449 | @cindex Adding support for C (gcc+make) |
| 450 | 450 | ||
| 451 | In this example we will add support for C files syntax checked by | 451 | In this example we will add support for C files syntax checked by |
| 452 | @code{gcc} called via @code{make}. | 452 | @command{gcc} called via @command{make}. |
| 453 | 453 | ||
| 454 | We're not required to write any new functions, as Flymake already has | 454 | We're not required to write any new functions, as Flymake already has |
| 455 | functions for @code{make}. We just add a new entry to the | 455 | functions for @command{make}. We just add a new entry to the |
| 456 | @code{flymake-allowed-file-name-masks}: | 456 | @code{flymake-allowed-file-name-masks}: |
| 457 | 457 | ||
| 458 | @lisp | 458 | @lisp |
| @@ -464,7 +464,7 @@ functions for @code{make}. We just add a new entry to the | |||
| 464 | flymake-allowed-file-name-masks)) | 464 | flymake-allowed-file-name-masks)) |
| 465 | @end lisp | 465 | @end lisp |
| 466 | 466 | ||
| 467 | @code{flymake-simple-make-init} builds the following @code{make} | 467 | @code{flymake-simple-make-init} builds the following @command{make} |
| 468 | command line: | 468 | command line: |
| 469 | 469 | ||
| 470 | @lisp | 470 | @lisp |
| @@ -483,12 +483,20 @@ our case this target might look like this: | |||
| 483 | 483 | ||
| 484 | @verbatim | 484 | @verbatim |
| 485 | check-syntax: | 485 | check-syntax: |
| 486 | gcc -o nul -S ${CHK_SOURCES} | 486 | gcc -o /dev/null -S ${CHK_SOURCES} |
| 487 | @end verbatim | 487 | @end verbatim |
| 488 | 488 | ||
| 489 | The format of error messages reported by @code{gcc} is already | 489 | @noindent |
| 490 | The format of error messages reported by @command{gcc} is already | ||
| 490 | supported by Flymake, so we don't have to add a new entry to | 491 | supported by Flymake, so we don't have to add a new entry to |
| 491 | @code{flymake-err-line-patterns}. | 492 | @code{flymake-err-line-patterns}. Note that if you are using |
| 493 | Automake, you may want to replace @code{gcc} with the standard | ||
| 494 | Automake variable @code{COMPILE}: | ||
| 495 | |||
| 496 | @verbatim | ||
| 497 | check-syntax: | ||
| 498 | $(COMPILE) -o /dev/null -S ${CHK_SOURCES} | ||
| 499 | @end verbatim | ||
| 492 | 500 | ||
| 493 | @node Flymake Implementation | 501 | @node Flymake Implementation |
| 494 | @chapter Flymake Implementation | 502 | @chapter Flymake Implementation |
| @@ -548,9 +556,9 @@ These modes are handled inside init/cleanup/getfname functions, see | |||
| 548 | @ref{Adding support for a new syntax check tool}. | 556 | @ref{Adding support for a new syntax check tool}. |
| 549 | 557 | ||
| 550 | Flymake contains implementations of all functionality required to | 558 | Flymake contains implementations of all functionality required to |
| 551 | support different syntax check modes described above (making | 559 | support different syntax check modes described above (making temporary |
| 552 | temporary copies, finding master files, etc.), as well as some | 560 | copies, finding master files, etc.), as well as some tool-specific |
| 553 | tool-specific (routines for @code{make}, @code{Ant}, etc.) code. | 561 | (routines for Make, Ant, etc.) code. |
| 554 | 562 | ||
| 555 | 563 | ||
| 556 | @node Making a temporary copy | 564 | @node Making a temporary copy |
| @@ -626,8 +634,8 @@ Therefore, a customizable variable | |||
| 626 | way to implement the desired behavior. | 634 | way to implement the desired behavior. |
| 627 | 635 | ||
| 628 | The default implementation, @code{flymake-get-project-include-dirs-imp}, | 636 | The default implementation, @code{flymake-get-project-include-dirs-imp}, |
| 629 | uses a @code{make} call. This requires a correct base directory, that is, a | 637 | uses a @command{make} call. This requires a correct base directory, that is, a |
| 630 | directory containing a correct @code{Makefile}, to be determined. | 638 | directory containing a correct @file{Makefile}, to be determined. |
| 631 | 639 | ||
| 632 | As obtaining the project include directories might be a costly operation, its | 640 | As obtaining the project include directories might be a costly operation, its |
| 633 | return value is cached in the hash table. The cache is cleared in the beginning | 641 | return value is cached in the hash table. The cache is cleared in the beginning |
| @@ -641,16 +649,16 @@ of every syntax check attempt. | |||
| 641 | 649 | ||
| 642 | Flymake can be configured to use different tools for performing syntax | 650 | Flymake can be configured to use different tools for performing syntax |
| 643 | checks. For example, it can use direct compiler call to syntax check a perl | 651 | checks. For example, it can use direct compiler call to syntax check a perl |
| 644 | script or a call to @code{make} for a more complicated case of a | 652 | script or a call to @command{make} for a more complicated case of a |
| 645 | @code{C/C++} source. The general idea is that simple files, like perl | 653 | @code{C/C++} source. The general idea is that simple files, like perl |
| 646 | scripts and html pages, can be checked by directly invoking a | 654 | scripts and html pages, can be checked by directly invoking a |
| 647 | corresponding tool. Files that are usually more complex and generally | 655 | corresponding tool. Files that are usually more complex and generally |
| 648 | used as part of larger projects, might require non-trivial options to | 656 | used as part of larger projects, might require non-trivial options to |
| 649 | be passed to the syntax check tool, like include directories for | 657 | be passed to the syntax check tool, like include directories for |
| 650 | C++. The latter files are syntax checked using some build tool, like | 658 | C++. The latter files are syntax checked using some build tool, like |
| 651 | @code{make} or @code{Ant}. | 659 | Make or Ant. |
| 652 | 660 | ||
| 653 | All @code{make} configuration data is usually stored in a file called | 661 | All Make configuration data is usually stored in a file called |
| 654 | @code{Makefile}. To allow for future extensions, flymake uses a notion of | 662 | @code{Makefile}. To allow for future extensions, flymake uses a notion of |
| 655 | buildfile to reference the 'project configuration' file. | 663 | buildfile to reference the 'project configuration' file. |
| 656 | 664 | ||