nickdiego / compiledb

Tool for generating Clang's JSON Compilation Database files for make-based build systems.
GNU General Public License v3.0
1.38k stars 123 forks source link

How to run this tool when the Makefile isn't in the current folder #91

Closed fbs2016 closed 5 years ago

fbs2016 commented 5 years ago

I want to run the tool with the Makefile under other folders. I try to run it with option "-d" : compiledb -d subfolder/ make, but it report err as command "make" can't find the file Makefile.

What happens if I set the option "-d" with a folder? Thanks -d, --build-dir PATH Path to be used as initial build dir

saimen commented 5 years ago

Make's option to use a Makefile in a specific directiory is -C I didn't test this but you should be able to call compiledb make -C subfolder

fbs2016 commented 5 years ago

Saimen Thanks a lot.