public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: libc-alpha@sourceware.org
Cc: Alejandro Colomar <alx@kernel.org>,
	Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Subject: [PATCH v1b 1/3] Makeconfig: Use a space before a newline escape
Date: Mon, 17 Jul 2023 22:02:18 +0200	[thread overview]
Message-ID: <20230717200220.569481-2-alx@kernel.org> (raw)
In-Reply-To: <20230717200220.569481-1-alx@kernel.org>

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 <alx@kernel.org>
---
 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
 \f
 -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
-- 
2.40.1


  reply	other threads:[~2023-07-17 20:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 20:02 [PATCH v1b 0/3] Makeconfig: reflow and other whitespace changes Alejandro Colomar
2023-07-17 20:02 ` Alejandro Colomar [this message]
2023-07-17 20:02 ` [PATCH v1b 2/3] Makeconfig: Use one line per token Alejandro Colomar
2023-07-17 20:02 ` [PATCH v1b 3/3] Makeconfig: Use spaces consistently before = Alejandro Colomar
2023-07-17 20:04 ` [PATCH v1b 0/3] Makeconfig: reflow and other whitespace changes Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230717200220.569481-2-alx@kernel.org \
    --to=alx@kernel.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).