diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-08-06 15:49:26 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-08-06 15:49:26 +0100 |
commit | a6f62055835c5c3f9546818fbbcd43c73baef57f (patch) | |
tree | e0fc0a7a94dafbf1ad65776d58e6ac1cb4208f2a /configure | |
parent | e895879eac788f1d59a68d4d0ef7f3788e159842 (diff) | |
download | pack-a6f62055835c5c3f9546818fbbcd43c73baef57f.tar.gz pack-a6f62055835c5c3f9546818fbbcd43c73baef57f.tar.xz pack-a6f62055835c5c3f9546818fbbcd43c73baef57f.zip |
Implement compile_commands.json generation
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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;; |