aboutsummaryrefslogtreecommitdiffstats
path: root/.vars.rc.do
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 /.vars.rc.do
parente895879eac788f1d59a68d4d0ef7f3788e159842 (diff)
downloadpack-a6f62055835c5c3f9546818fbbcd43c73baef57f.tar.gz
pack-a6f62055835c5c3f9546818fbbcd43c73baef57f.tar.xz
pack-a6f62055835c5c3f9546818fbbcd43c73baef57f.zip
Implement compile_commands.json generation
Diffstat (limited to '.vars.rc.do')
-rwxr-xr-x.vars.rc.do6
1 files changed, 3 insertions, 3 deletions
diff --git a/.vars.rc.do b/.vars.rc.do
index 8a31fe7..7c4d417 100755
--- a/.vars.rc.do
+++ b/.vars.rc.do
@@ -4,7 +4,7 @@ set -e
# Ensure variables from the config aren't set before the config is read to
# avoid capturing transient state
unset {,T,H}{CC,CFLAGS,CPPFLAGS,LDFLAGS,LDLIBS} \
- colour debug optimise verbose warn werror
+ colour debug optimise verbose warn werror extra_targets
CFLAGS=(-std=c11)
TCFLAGS=(-fPIC)
@@ -15,7 +15,7 @@ warnings=(
-Wstrict-prototypes
)
-declare -a {,T,H}{CFLAGS,CPPFLAGS,LDFLAGS,LDLIBS}
+declare -a {,T,H}{CFLAGS,CPPFLAGS,LDFLAGS,LDLIBS} extra_targets
if [ -e config.rc ]; then
redo-ifchange config.rc
@@ -72,7 +72,7 @@ done
{
echo "# generated by $0"
- declare -p {T,H}{CC,CFLAGS,CPPFLAGS,LDFLAGS,LDLIBS}
+ declare -p {T,H}{CC,CFLAGS,CPPFLAGS,LDFLAGS,LDLIBS} extra_targets
} >"$3"
if [[ $verbose ]]; then