|
From: | анонимный |
Subject: | [bug #60036] Incorrect MAKEFLAGS after $(shell) function call |
Date: | Wed, 10 Feb 2021 14:33:23 -0500 (EST) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 |
URL: <https://savannah.gnu.org/bugs/?60036> Summary: Incorrect MAKEFLAGS after $(shell) function call Project: make Submitted by: None Submitted on: Ср 10 фев 2021 19:33:22 Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 4.3 Operating System: MS Windows Fixed Release: None Triage Status: None _______________________________________________________ Details: After recursive make call if top-level Makefile set -Otarget and sub-make has $(shell) function call then MAKEFLAGS exposes all internal values hidden from user (-j and --jobserver-auth for example). It leads to false warning message as if -j option specified in Makefile. It happens because $(shell) function handler invokes define_makeflags(1, 0): 1. define_makeflags() 2. prepare_mutex_handle_string() 3. sync_init() 4. setup_tmpfile() 5. output_start() 6. func_shell_base() Looks like MAKEFLAGS variable takes its full contents too early. I'm not familiar with make internals but does it really necessary to do output_start() in func_shell_base()? Example Makefile: start_time := $(shell echo %time%) MAKEFLAGS += --no-print-directory MAKEFLAGS += --output-sync=target .PHONY: all all: $(MAKE) build-$@ .PHONY: build-all build-all: @echo $@ Output of 'make -j8': make build-all make[1]: warning: -j8 forced in makefile: resetting jobserver mode. build-all _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?60036> _______________________________________________ Сообщение отправлено по Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |