GNU bug report logs -
#70716
flymake-cc creates `-.o` files
Previous Next
Full log
View this message in rfc822 format
Mattias Engdegård <mattias.engdegard <at> gmail.com> writes:
> `flymake-cc-use-special-make-target`, the standard value for `flymake-cc-command`, generates a command like
>
> make check-syntax CHK_SOURCES="-x c -c -"
>
> which causes the compiler (at least Clang) to create the file `-.o` that is never cleaned up and whose name is mysterious and awkward to remove.
>
> What about the patch below?
(info "(flymake) Example---Configuring a tool called via make")
mentions a check-syntax target looking like:
check-syntax:
gcc -o /dev/null -S ${CHK_SOURCES} || true
So it seems like it would be better to add this -o /dev/null in your
Makefile.
That also allows you to run, e.g.,
make check-syntax CHK_SOURCES="file1.c file2.c"
from a shell or M-x compile.
So I think this is a bug in your Makefile, not flymake-cc.
But, also, probably the docstring of flymake-cc-use-special-make-target
should be updated to link to the manual. And probably the manual should
mention that CHK_SOURCES can be an explicit list of files too.
BTW, the CHK_SOURCES target mentioned by flymake is, AFAICT from web
searches, completely unique to flymake. I wonder if there's a more
standard alternative... but we probably can't change the default of
flymake-cc-command anyway.
This bug report was last modified 265 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.