From patchwork Mon Jul 17 20:02:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 72807 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 422DA3857340 for ; Mon, 17 Jul 2023 20:02:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 422DA3857340 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689624173; bh=+SbgzvdnDO3QZ5PKURbuoVz/ZG4jF/e7afW9oRUzWFg=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=rASGazZtsRCOd4aAfmMVBSElUkJDKapELYZvUa76PXHu83GVrtfeqtP62ay6V127V /yf2UcrV9NNgzJxjGM8YOe6yLUKYbQZiJBjMgRrM8ahLKwSEbiK5NL7yKrWxzLeMi3 iPWD1kEBzDzY+RX+3HpP5jeyUYaTaLIEJfhFE3ck= 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 5B6B13858D33 for ; Mon, 17 Jul 2023 20:02:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B6B13858D33 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 7D8C6611F4; Mon, 17 Jul 2023 20:02:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 114BAC433C9; Mon, 17 Jul 2023 20:02:24 +0000 (UTC) To: libc-alpha@sourceware.org Cc: Alejandro Colomar , Adhemerval Zanella Netto Subject: [PATCH v1b 1/3] Makeconfig: Use a space before a newline escape Date: Mon, 17 Jul 2023 22:02:18 +0200 Message-Id: <20230717200220.569481-2-alx@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230717200220.569481-1-alx@kernel.org> References: <20230717200220.569481-1-alx@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6217; i=alx@kernel.org; h=from:subject; bh=F5bEXmEW8w8aVVIMsGPF5WwXReChZyy3HPuli8Z0zts=; b=owEBbQKS/ZANAwAKAZ6MGvu+/9syAcsmYgBktZ4z06EeOYdSryryQ34xftIH1bXEX4jRAFV/C uAg/EaQWzSJAjMEAAEKAB0WIQTqOofwpOugMORd8kCejBr7vv/bMgUCZLWeMwAKCRCejBr7vv/b MiisEACHGtyinaQVM/mGAgRLP0IyRQGGdh65mgatarFZET9HKUGGAoqFzt2kMd/ODJJnjFK/qPq 7zbTiH6rs3iUzX0KlxdzBjkda0vWBnnrkmSytLc67QnOvTxk9lvoac2LobLNsCjXPCJnf26VHae 62HtVM6GPUQ0YVrJDRmnRP+mJYjyfE0CbOKwboasXt1G7EvvqGhrsiqBhAFcdjx6PWuZkG/eV3q HkB94shsYtUIYC34mQN27wVTJGsRfm68cb3nNhjqjrcF07szw2FglbfMdCNT3L9j8aps/gZx1Vs Ewz9epf15ys1J8JuTUo60llf51jQ/Giw/CUuDbQRct3G7uAxCR7m5vWOoOYrWJ57Vo27HSId4sA 8i7Q3LLSAZPI91VO/kCGGCfRTp6TkJO58Omnq8tLTw8qHFPEEjAhvMrWtoofIBK2N7GFTl1gBR3 epysQxy9+dFFl7dZarpQNqxq2kVwm7R2iYWpWZClwKzvglZbPOvaPXLwkfBnY7PIbKCwff7PKz8 rGr/ut/Qbfm0o+8/wat5ydsG0UG9vYixAsXnWLITNjPLHQtpb7hs0E8Q3qCqujEdr3SUgRmf/Vc Zz85vKsXPuFRMgbYxNCdRAx99knWSSbx5OoOAe8e6F/uNs325b9Nuquj9R+BbQ56F3x30YSGEoV 6PoD1452ujX1ZoQ== X-Developer-Key: i=alx@kernel.org; a=openpgp; fpr=A9348594CE31283A826FBDD8D57633D441E25BB5 X-Spam-Status: No, score=-10.4 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+patchwork=sourceware.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 --- Makeconfig | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Makeconfig b/Makeconfig index 77d7fd14df..cead59d915 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 @@ -1141,7 +1141,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, @@ -1198,9 +1198,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 @@ -1373,7 +1373,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))) @@ -1402,7 +1402,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