Bug 1859851 - Use $? instead of $^ when invoking rebuild_check. r=firefox-build-system-reviewers,andi

$? will only pass the dependencies that have triggered the command to be
called, which will save some work in rebuild_check. However, since
rebuild_check does the difference between removed and modified files,
it still needs to keep checking files.

But, the real reason we need this check is that gkrust.d can have
dependencies with spaces in them, and Make special variables like $^ or
$? don't handle those nicely, and while those files with spaces in
them are most likely unchanged (in most cases, they are going to be
files from the Windows SDK), they end up always reported as the cause
for rebuilds when setting REBUILD_CHECK. $? is more likely not to
contain files with spaces.

Differential Revision: https://phabricator.services.mozilla.com/D191381
This commit is contained in:
Mike Hommey 2023-10-26 23:59:15 +00:00
Родитель 206eecffbe
Коммит 14746b3ff0
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -24,7 +24,7 @@ USE_AUTOTARGETS_MK = 1
include $(MOZILLA_DIR)/config/makefiles/makeutils.mk
ifdef REBUILD_CHECK
REPORT_BUILD = $(info $(shell $(PYTHON3) $(MOZILLA_DIR)/config/rebuild_check.py $@ $^))
REPORT_BUILD = $(info $(shell $(PYTHON3) $(MOZILLA_DIR)/config/rebuild_check.py $@ $?))
REPORT_BUILD_VERBOSE = $(REPORT_BUILD)
else
REPORT_BUILD = $(info $(relativesrcdir)/$(notdir $@))