We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have these following files.
➜ test-compiledb$ tree . ├── Makefile ├── main.c └── subdir ├── Makefile └── main.c ➜ test-compiledb$ cat Makefile default: make -w -C subdir gcc main.c -o main.o clean: rm -rf subdir/main.o main.o ➜ test-compiledb$ cat subdir/Makefile default: gcc main.c -o main.o
I found the different results between compiledb make and make | compiledb.
compiledb make
make | compiledb
➜ test-compiledb$ compiledb make ## Building [make]... make -w -C subdir make[1]: Entering directory `/Users/jiajiawang/Workspace/test-compiledb/subdir' gcc main.c -o main.o make[1]: Leaving directory `/Users/jiajiawang/Workspace/test-compiledb/subdir' gcc main.c -o main.o ➜ test-compiledb$ cat compile_commands.json [ { "directory": "/Users/jiajiawang/Workspace/test-compiledb", "arguments": [ "gcc", "main.c", "-o", "main.o" ], "file": "main.c" } ]
One entry correspond to main.c in subdir is missing. It's confusing that if you use make | compiledb, everything is ok.
main.c
subdir
➜ test-compiledb$ make | compiledb ➜ test-compiledb$ cat compile_commands.json [ { "directory": "/Users/jiajiawang/Workspace/test-compiledb/subdir", "arguments": [ "gcc", "main.c", "-o", "main.o" ], "file": "main.c" }, { "directory": "/Users/jiajiawang/Workspace/test-compiledb", "arguments": [ "gcc", "main.c", "-o", "main.o" ], "file": "main.c" } ]
Can someone tell me why?
The text was updated successfully, but these errors were encountered:
Add more detail message.
Verbose message for compiledb make:
➜ test-compiledb$ compiledb -v make ## Building [make]... make -w -C subdir make[1]: Entering directory `/Users/jiajiawang/Workspace/test-compiledb/subdir' gcc main.c -o main.o make[1]: Leaving directory `/Users/jiajiawang/Workspace/test-compiledb/subdir' gcc main.c -o main.o ## Processing build commands from <stdout> Line 1: Failed to parse build command [Details: (<class 'bashlex.tokenizer.MatchedPairError'>) unexpected EOF while looking for matching '`' (position 69)]. Ignoring: 'make: Entering directory `/Users/jiajiawang/Workspace/test-compiledb'' New command: make -w -C subdir New command: gcc main.c -o main.o Adding command 0: gcc main.c -o main.o Line 4: Failed to parse build command [Details: (<class 'bashlex.tokenizer.MatchedPairError'>) unexpected EOF while looking for matching '`' (position 68)]. Ignoring: 'make: Leaving directory `/Users/jiajiawang/Workspace/test-compiledb'' ## Failed to read previous compile_commands.json: Expecting value: line 1 column 1 (char 0) ## Writing compilation database with 1 entries to compile_commands.json ## Done.
Verbose message for make | compiledb:
➜ test-compiledb$ make | compiledb -v ## Processing build commands from <stdin> New command: make -w -C subdir New command: gcc main.c -o main.o Adding command 0: gcc main.c -o main.o New command: gcc main.c -o main.o Adding command 1: gcc main.c -o main.o ## Loaded compilation database with 2 entries from compile_commands.json ## Writing compilation database with 2 entries to compile_commands.json ## Done.
Hope this is helpful.
Sorry, something went wrong.
No branches or pull requests
I have these following files.
➜ test-compiledb$ tree . ├── Makefile ├── main.c └── subdir ├── Makefile └── main.c ➜ test-compiledb$ cat Makefile default: make -w -C subdir gcc main.c -o main.o clean: rm -rf subdir/main.o main.o ➜ test-compiledb$ cat subdir/Makefile default: gcc main.c -o main.o
I found the different results between
compiledb make
andmake | compiledb
.One entry correspond to
main.c
insubdir
is missing.It's confusing that if you use
make | compiledb
, everything is ok.Can someone tell me why?
The text was updated successfully, but these errors were encountered: