From cc72ac63278d13baafbfeccdf63092b5f5e93dc8 Mon Sep 17 00:00:00 2001 From: David Given Date: Sat, 20 Sep 2025 12:00:33 +0200 Subject: [PATCH] Ignore some more variables. --- build/ab.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build/ab.mk b/build/ab.mk index bdff4101..940d3864 100644 --- a/build/ab.mk +++ b/build/ab.mk @@ -84,11 +84,14 @@ build-file-timestamps = $(shell ls -l $(build-files) | md5sum) # Wipe the build file (forcing a regeneration) if the make environment is different. # (Conveniently, this includes the pkg-config hash calculated above.) -ignored-variables = MAKE_RESTARTS .VARIABLES MAKECMDGOALS MAKEFLAGS MFLAGS PAGER _ +ignored-variables = MAKE_RESTARTS .VARIABLES MAKECMDGOALS MAKEFLAGS MFLAGS PAGER _ \ + DESKTOP_STARTUP_ID XAUTHORITY ICEAUTHORITY SSH_AUTH_SOCK SESSION_MANAGER \ + INVOCATION_ID SYSTEMD_EXEC_PID MANAGER_PID SSH_AGENT_PID JOURNAL_STREAM \ + GPG_TTY WINDOWID MANAGERPID MAKE_TERMOUT MAKE_TERMERR $(shell mkdir -p $(OBJ)) $(file >$(OBJ)/newvars.txt,$(foreach v,$(filter-out $(ignored-variables),$(.VARIABLES)),$(v)=$($(v))$(newline))) $(shell touch $(OBJ)/vars.txt) -#$(shell diff -u $(OBJ)/vars.txt $(OBJ)/newvars.txt > /dev/stderr) +$(shell diff -u $(OBJ)/vars.txt $(OBJ)/newvars.txt > /dev/stderr) $(shell cmp -s $(OBJ)/newvars.txt $(OBJ)/vars.txt || (rm -f $(OBJ)/build.ninja && echo "Environment changed --- regenerating" > /dev/stderr)) $(shell mv $(OBJ)/newvars.txt $(OBJ)/vars.txt) @@ -104,6 +107,9 @@ clean:: @echo CLEAN $(hide) rm -rf $(OBJ) +compile_commands.json: $(OBJ)/build.ninja + +$(hide) $(NINJA) -f $(OBJ)/build.ninja -t compdb > $@ + export PYTHONHASHSEED = 1 $(OBJ)/build.ninja $(OBJ)/build.targets &: @echo "AB"