From patchwork Tue Jul 11 20:56:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1806505 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=VGn3BDU2; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R0tXm2HGdz20Ph for ; Wed, 12 Jul 2023 06:59:36 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 465313858C20 for ; Tue, 11 Jul 2023 20:59:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 465313858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689109174; bh=88M/EAjgtjqAePeqIC3O3EyDDrInmLMo2PK57b9d38E=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=VGn3BDU2v96uuU03UjdfvS2h3IcIVWyxd0UWa4Zq1BmXQqCnBoSeDRuiLMl+J6dRS D+mfVEs19M1m4Ix2YK849bCS4Fxm1ImjTyiIC06n/DyKFIi6eSsjF7qGod8FQyPRrP kcb5cCX63ZtpgIHkVtkCeqsPuxhkPcFhJvY8ECiE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by sourceware.org (Postfix) with ESMTPS id A85B83858D1E for ; Tue, 11 Jul 2023 20:59:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A85B83858D1E Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 398CA615C5 for ; Tue, 11 Jul 2023 20:59:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9891C433C8; Tue, 11 Jul 2023 20:59:17 +0000 (UTC) To: libc-alpha@sourceware.org Cc: Alejandro Colomar Subject: [PATCH] Makeconfig: Use a space before a newline escape Date: Tue, 11 Jul 2023 22:56:53 +0200 Message-Id: <20230711205652.46362-1-alx@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6217; i=alx@kernel.org; h=from:subject; bh=DrqBLRk4jdXn9dsmgsaVON5RimIwIp+R0COoq9619LU=; b=owEBbQKS/ZANAwAKAZ6MGvu+/9syAcsmYgBkrcITD93qJ/XpVcoG/dH9GwXIbLQnVnfAFltAW LdjmMB3P/+JAjMEAAEKAB0WIQTqOofwpOugMORd8kCejBr7vv/bMgUCZK3CEwAKCRCejBr7vv/b MtjPD/9N3QtCfwmw7yvx/o8s9dweZC0TduvZCzmuLz0q1NxJnYfVSm/QrANs4lPRl2JanSMByVD 0bWDYMEad90Qm0cIrWjq5A/IeJlKU/8G1/JUf4ATU68xixtH/3dQCO719yMFTFg5BNIE3vodzJm Iwsn+umKyjZLs3bpqRAeQyq4+hL2+rnOJ1Iux4C/gHBg+f4s2fY5XBC4NUsOvKJI+PpUWGxLyOm QXNpfZ80mQaOdETO+QWZNs9b+G+n7hZWPHo4WtS59krkqnuLulZwmC6DlPD3ywUxP1S2zhh06p/ /auy3VaSn0qSKW0Og0CkI9fVJnL44rm5paH5eOw4mmY7mMTjf9asMgBFLXgFn0enecCt3Ka1PIf 0/EB01/gqdFdhm6I/WXTUoj5694XYD6VLMj1k4ATGU8gA/TLBmzcU3a8po/3Bl3XllIx7/FUHo9 GVTdiu+n3QqHivrVku5eHLqQ+P477LFQMh/A6IZvcbA9ktDA+EmaaeT9lz0onjh6Qni2jNxHzuL 3pelMDcYRGrkd5JutfsGzv+CaV0bZU+6fVCrMdbPoQYblrK65EgQhLMai7d7z9iIrdN+ICDcI1Y QzGRcizGEioaBGGlGHo2b0XHnMsorTTTvaPwADgcFdd8UDUbQ+ekjlyGUJ19AranDOyfmAqZFJv Asy4VDTASRyMUzQ== X-Developer-Key: i=alx@kernel.org; a=openpgp; fpr=A9348594CE31283A826FBDD8D57633D441E25BB5 X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" That space doesn't affect make(1)'s behavior, AFAIK. Be consistent in adding the space, to avoid confusing readers into believing that it has a different meaning. I had to do a lot of tests to convince myself that I didn't change the meaning, and am still not 100% convinced, so we better not confuse others. Here's an experiment to justify this patch: $ cat Makefile A := a B := b C := c D := $(addprefix $(A), start.o S$(B))\ $(C) foo E := $(addprefix $(A), start.o S$(B)) \ $(C) foo F := A\ B $(info $(D)) $(info $(E)) $(info $(F)) $ make astart.o aSb c foo astart.o aSb c foo A B make: *** No targets. Stop. Signed-off-by: Alejandro Colomar --- Hi! I'm preparing a global patch to use a line per token (is token the right term?) in variable assignments in Makeconfig. Before that patch, I need to do this one first, to first clarify some dubious stuff, without hiding in the other huge diff. Cheers, Alex Makeconfig | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Makeconfig b/Makeconfig index 369a596e79..51ea2bbde9 100644 --- a/Makeconfig +++ b/Makeconfig @@ -93,12 +93,12 @@ $(common-objpfx)config.make: $(common-objpfx)config.status \ # Find all the sysdeps configure fragments, to make sure we re-run # configure when any of them changes. $(common-objpfx)config.status: $(..)version.h $(..)configure \ - $(foreach dir,$(sysdirs),\ + $(foreach dir,$(sysdirs), \ $(wildcard $(dir)/Implies) \ - $(patsubst %.ac,%,\ + $(patsubst %.ac,%, \ $(firstword $(wildcard \ $(addprefix $(dir)/,configure configure.ac))))) \ - $(patsubst %.ac,%,\ + $(patsubst %.ac,%, \ $(wildcard $(..)sysdeps/*/preconfigure $(..)sysdeps/*/preconfigure.ac)) @cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \ echo The GNU C library has not been configured. >&2; \ @@ -438,7 +438,7 @@ ifndef +link-pie $(+preinit) $(+prectorS) +link-pie-before-libc = -o $@ $(+link-pie-before-inputs) \ $(filter-out $(addprefix $(csu-objpfx),start.o \ - S$(start-installed-name))\ + S$(start-installed-name)) \ $(+preinit) $(link-extra-libs) \ $(common-objpfx)libc% $(+postinit),$^) \ $(link-extra-libs) @@ -469,7 +469,7 @@ ifndef +link-static $(+preinit) $(+prectorT) +link-static-before-libc = -o $@ $(+link-static-before-inputs) \ $(filter-out $(addprefix $(csu-objpfx),start.o \ - $(start-installed-name))\ + $(start-installed-name)) \ $(+preinit) $(link-extra-libs-static) \ $(common-objpfx)libc% $(+postinit),$^) \ $(link-extra-libs-static) @@ -505,7 +505,7 @@ else # not build-pie-default $(+preinit) $(+prector) +link-before-libc = -o $@ $(+link-before-inputs) \ $(filter-out $(addprefix $(csu-objpfx),start.o \ - $(start-installed-name))\ + $(start-installed-name)) \ $(+preinit) $(link-extra-libs) \ $(common-objpfx)libc% $(+postinit),$^) \ $(link-extra-libs) @@ -757,8 +757,8 @@ rtld-prefix = $(elf-objpfx)$(rtld-installed-name) \ ifeq (yes,$(build-shared)) comma = , sysdep-library-path = \ -$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\ - $(filter -Wl$(comma)-rpath-link=%,\ +$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %, \ + $(filter -Wl$(comma)-rpath-link=%, \ $(sysdep-LDFLAGS))))) # $(run-via-rtld-prefix) is a command that, when prepended to the name # of a program built with the newly built library, produces a command @@ -886,7 +886,7 @@ endif installed-modules = nonlib nscd ldconfig locale_programs \ iconvprogs libnss_files libnss_compat libnss_db libnss_hesiod \ libutil libpcprofile libnsl -+extra-time-flags = $(if $(filter $(installed-modules),\ ++extra-time-flags = $(if $(filter $(installed-modules), \ $(in-module)),-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64) # We might want to compile with some stack-protection flag. @@ -989,7 +989,7 @@ endif # include/ subdirectory, whose header files will be used to compile # but will not be installed, and will take precedence over the # installed files. This mirrors the top-level include/ subdirectory. -+sysdep-includes := $(foreach dir,$(+sysdep_dirs),\ ++sysdep-includes := $(foreach dir,$(+sysdep_dirs), \ $(addprefix -I,$(wildcard $(dir)/include) $(dir))) # These are flags given to the C compiler to tell it to look for @@ -1148,7 +1148,7 @@ move-if-change = $(SHELL) $(..)scripts/move-if-change -include $(common-objpfx)sysd-sorted subdirs = $(sorted-subdirs) -subdir-srcdirs = $(foreach dir,$(subdirs),\ +subdir-srcdirs = $(foreach dir,$(subdirs), \ $(firstword $($(dir)-srcdir) $(..)$(dir))) # This is a pair of implicit rules to preprocess a file with # comments, @@ -1205,9 +1205,9 @@ $(common-objpfx)soversions.mk: $(common-objpfx)soversions.i $(..)Makeconfig test x"$$which" = xDEFAULT || continue; \ case $$number in \ [0-9]*) echo "$$lib.so-version=.$$number"; \ - echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";;\ + echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";; \ *) echo "$$lib.so-version=$$number"; \ - echo "all-sonames+=$$lib=\$$($$lib.so-version)";;\ + echo "all-sonames+=$$lib=\$$($$lib.so-version)";; \ esac; \ done; \ echo soversions.mk-done = t;) < $< > $@T; exit 0 @@ -1380,7 +1380,7 @@ ifndef avoid-generated # existing directory not in all-subdirs, then sysd-sorted needs to # be regenerated, so it depends on existing $(sorted-subdirs:=/Depend) files. all-Depend-files := $(wildcard $(sort \ - $(foreach dir,$(all-subdirs),\ + $(foreach dir,$(all-subdirs), \ $(firstword $($(dir)-srcdir) \ $(..)$(dir))/Depend) \ $(sorted-subdirs:=/Depend))) @@ -1409,7 +1409,7 @@ include $(sysdep-makeconfigs) endif # Compute just the target patterns. Makeconfig has set sysd-rules-patterns. -sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\ +sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns), \ $(firstword $(subst :, ,$p)))) # $(libpthread-routines-var) and $(librt-routines-var) are the make