fix: bear not available
This commit is contained in:
4
makefile
4
makefile
@@ -20,9 +20,13 @@ obj/%.o: src/%.c
|
|||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
$(CC) -c -MD -MP $(CFLAGS) -o $@ $<
|
$(CC) -c -MD -MP $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
ifneq ($(shell which bear),)
|
||||||
compile_commands.json: makefile
|
compile_commands.json: makefile
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
@touch compile_commands.json
|
@touch compile_commands.json
|
||||||
bear -- make compile
|
bear -- make compile
|
||||||
|
else
|
||||||
|
compile_commands.json:
|
||||||
|
endif
|
||||||
|
|
||||||
-include $(OBJ:.o=.d)
|
-include $(OBJ:.o=.d)
|
||||||
|
|||||||
Reference in New Issue
Block a user