Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8ae818e4
Commit
8ae818e4
authored
Mar 10, 2012
by
Chong Yidong
Browse files
* doc/misc/flymake.texi: Mention the Automake COMPILE variable.
Fixes: debbugs:8715
parent
bc44be50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
doc/misc/ChangeLog
doc/misc/ChangeLog
+3
-0
doc/misc/flymake.texi
doc/misc/flymake.texi
+21
-13
No files found.
doc/misc/ChangeLog
View file @
8ae818e4
2012-03-10 Chong Yidong <cyd@gnu.org>
* flymake.texi (Example -- Configuring a tool called via make):
Mention the Automake COMPILE variable (Bug#8715).
* info.texi (Getting Started): Add an index entry (Bug#10450).
2012-03-02 Michael Albinus <michael.albinus@gmx.de>
...
...
doc/misc/flymake.texi
View file @
8ae818e4
...
...
@@ -449,10 +449,10 @@ Finally, we add an entry to @code{flymake-err-line-patterns}:
@cindex Adding support for C
(
gcc
+
make
)
In this example we will add support for C files syntax checked by
@cod
e
{
gcc
}
called via @cod
e
{
make
}
.
@co
mman
d
{
gcc
}
called via @co
mman
d
{
make
}
.
We're not required to write any new functions, as Flymake already has
functions for @cod
e
{
make
}
. We just add a new entry to the
functions for @co
mman
d
{
make
}
. We just add a new entry to the
@code
{
flymake
-
allowed
-
file
-
name
-
masks
}
:
@lisp
...
...
@@ -464,7 +464,7 @@ functions for @code{make}. We just add a new entry to the
flymake-allowed-file-name-masks))
@end lisp
@code
{
flymake-simple-make-init
}
builds the following @cod
e
{
make
}
@code
{
flymake-simple-make-init
}
builds the following @co
mman
d
{
make
}
command line:
@lisp
...
...
@@ -486,9 +486,17 @@ check-syntax:
gcc -o /dev/null -S
${
CHK
_
SOURCES
}
@end verbatim
The format of error messages reported by @code
{
gcc
}
is already
@noindent
The format of error messages reported by @command
{
gcc
}
is already
supported by Flymake, so we don't have to add a new entry to
@code
{
flymake
-
err
-
line
-
patterns
}
.
@code
{
flymake
-
err
-
line
-
patterns
}
. Note that if you are using
Automake, you may want to replace @code
{
gcc
}
with the standard
Automake variable @code
{
COMPILE
}
:
@verbatim
check
-
syntax:
$
(COMPILE) -o /dev/null -S
${
CHK
_
SOURCES
}
@end verbatim
@node Flymake Implementation
@chapter Flymake Implementation
...
...
@@ -548,9 +556,9 @@ These modes are handled inside init/cleanup/getfname functions, see
@ref
{
Adding support for a new syntax check tool
}
.
Flymake contains implementations of all functionality required to
support different syntax check modes described above
(
making
temporary
copies, finding master files, etc.
)
, as well as some
tool
-
specific
(
routines for
@code
{
m
ake
}
,
@code
{
Ant
}
, etc.
)
code.
support different syntax check modes described above
(
making
temporary
copies, finding master files, etc.
)
, as well as some
tool
-
specific
(
routines for
M
ake, Ant, etc.
)
code.
@node Making a temporary copy
...
...
@@ -626,8 +634,8 @@ Therefore, a customizable variable
way to implement the desired behavior.
The default implementation, @code
{
flymake
-
get
-
project
-
include
-
dirs
-
imp
}
,
uses a @cod
e
{
make
}
call. This requires a correct base directory, that is, a
directory containing a correct @
cod
e
{
Makefile
}
, to be determined.
uses a @co
mman
d
{
make
}
call. This requires a correct base directory, that is, a
directory containing a correct @
fil
e
{
Makefile
}
, to be determined.
As obtaining the project include directories might be a costly operation, its
return value is cached in the hash table. The cache is cleared in the beginning
...
...
@@ -641,16 +649,16 @@ of every syntax check attempt.
Flymake can be configured to use different tools for performing syntax
checks. For example, it can use direct compiler call to syntax check a perl
script or a call to @cod
e
{
make
}
for a more complicated case of a
script or a call to @co
mman
d
{
make
}
for a more complicated case of a
@code
{
C
/
C
++
}
source. The general idea is that simple files, like perl
scripts and html pages, can be checked by directly invoking a
corresponding tool. Files that are usually more complex and generally
used as part of larger projects, might require non
-
trivial options to
be passed to the syntax check tool, like include directories for
C
++
. The latter files are syntax checked using some build tool, like
@code
{
m
ake
}
or
@code
{
Ant
}
.
M
ake or Ant.
All
@code
{
m
ake
}
configuration data is usually stored in a file called
All
M
ake configuration data is usually stored in a file called
@code
{
Makefile
}
. To allow for future extensions, flymake uses a notion of
buildfile to reference the 'project configuration' file.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment