aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc/flymake.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/misc/flymake.texi')
-rw-r--r--doc/misc/flymake.texi38
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 @@
11This manual is for GNU Flymake (version @value{VERSION}, @value{UPDATED}), 11This manual is for GNU Flymake (version @value{VERSION}, @value{UPDATED}),
12which is a universal on-the-fly syntax checker for GNU Emacs. 12which is a universal on-the-fly syntax checker for GNU Emacs.
13 13
14Copyright @copyright{} 2004-2011 14Copyright @copyright{} 2004-2012
15Free Software Foundation, Inc. 15Free 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
451In this example we will add support for C files syntax checked by 451In 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
454We're not required to write any new functions, as Flymake already has 454We're not required to write any new functions, as Flymake already has
455functions for @code{make}. We just add a new entry to the 455functions 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}
468command line: 468command 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
485check-syntax: 485check-syntax:
486 gcc -o nul -S ${CHK_SOURCES} 486 gcc -o /dev/null -S ${CHK_SOURCES}
487@end verbatim 487@end verbatim
488 488
489The format of error messages reported by @code{gcc} is already 489@noindent
490The format of error messages reported by @command{gcc} is already
490supported by Flymake, so we don't have to add a new entry to 491supported 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
493Automake, you may want to replace @code{gcc} with the standard
494Automake variable @code{COMPILE}:
495
496@verbatim
497check-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
550Flymake contains implementations of all functionality required to 558Flymake contains implementations of all functionality required to
551support different syntax check modes described above (making 559support different syntax check modes described above (making temporary
552temporary copies, finding master files, etc.), as well as some 560copies, finding master files, etc.), as well as some tool-specific
553tool-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
626way to implement the desired behavior. 634way to implement the desired behavior.
627 635
628The default implementation, @code{flymake-get-project-include-dirs-imp}, 636The default implementation, @code{flymake-get-project-include-dirs-imp},
629uses a @code{make} call. This requires a correct base directory, that is, a 637uses a @command{make} call. This requires a correct base directory, that is, a
630directory containing a correct @code{Makefile}, to be determined. 638directory containing a correct @file{Makefile}, to be determined.
631 639
632As obtaining the project include directories might be a costly operation, its 640As obtaining the project include directories might be a costly operation, its
633return value is cached in the hash table. The cache is cleared in the beginning 641return 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
642Flymake can be configured to use different tools for performing syntax 650Flymake can be configured to use different tools for performing syntax
643checks. For example, it can use direct compiler call to syntax check a perl 651checks. For example, it can use direct compiler call to syntax check a perl
644script or a call to @code{make} for a more complicated case of a 652script 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
646scripts and html pages, can be checked by directly invoking a 654scripts and html pages, can be checked by directly invoking a
647corresponding tool. Files that are usually more complex and generally 655corresponding tool. Files that are usually more complex and generally
648used as part of larger projects, might require non-trivial options to 656used as part of larger projects, might require non-trivial options to
649be passed to the syntax check tool, like include directories for 657be passed to the syntax check tool, like include directories for
650C++. The latter files are syntax checked using some build tool, like 658C++. The latter files are syntax checked using some build tool, like
651@code{make} or @code{Ant}. 659Make or Ant.
652 660
653All @code{make} configuration data is usually stored in a file called 661All 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
655buildfile to reference the 'project configuration' file. 663buildfile to reference the 'project configuration' file.
656 664