From a6f62055835c5c3f9546818fbbcd43c73baef57f Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Fri, 6 Aug 2021 15:49:26 +0100 Subject: Implement compile_commands.json generation --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index b656155..9ed3fb4 100755 --- a/configure +++ b/configure @@ -13,6 +13,7 @@ Options: -c when Enable compiler colours (always|auto|off) [default: auto] -d Enable debugging flags -e Enable -Werror + -f Generate compile_commands.json database (needs jq) -h Show this help -o Enable optimisation flags -v Print results of configuration @@ -26,7 +27,7 @@ exec 3>config.rc conf() { echo "$1" >&3; } colour=auto -while getopts B:C:L:P:W:c:dehovw opt; do +while getopts B:C:L:P:W:c:defhovw opt; do qopt=${OPTARG@Q} case $opt in B) conf "LDLIBS+=($qopt)";; @@ -37,6 +38,7 @@ while getopts B:C:L:P:W:c:dehovw opt; do c) colour="$OPTARG";; d) conf "debug=1" >&3;; e) conf "werror=1" >&3;; + f) conf "extra_targets+=(compile_commands.json)" ;; h) usage; help; exit;; o) conf "optimise=1" >&3;; v) conf "verbose=1" >&3;; -- cgit v1.2.3-54-g00ecf