aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-08-06 15:49:26 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-08-06 15:49:26 +0100
commita6f62055835c5c3f9546818fbbcd43c73baef57f (patch)
treee0fc0a7a94dafbf1ad65776d58e6ac1cb4208f2a /configure
parente895879eac788f1d59a68d4d0ef7f3788e159842 (diff)
downloadpack-a6f62055835c5c3f9546818fbbcd43c73baef57f.tar.gz
pack-a6f62055835c5c3f9546818fbbcd43c73baef57f.tar.xz
pack-a6f62055835c5c3f9546818fbbcd43c73baef57f.zip
Implement compile_commands.json generation
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 3 insertions, 1 deletions
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;;