diff options
author | Alejandro Colomar <alx@kernel.org> | 2023-07-11 22:53:24 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-08-29 16:06:52 +0200 |
commit | 05d4bef98138dbfe70bd7fc63dcddc73015cd2e0 (patch) | |
tree | 9dd585aaad04a41ff7d4a8c97511253047e54ff0 | |
parent | dfe8c445883a50a55564b02b6957257bfc510db4 (diff) |
Makeconfig: Use a space before a newline escape
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>
-rw-r--r-- | Makeconfig | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Makeconfig b/Makeconfig index c48fcc59e8..4a1feb9731 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 @@ -881,7 +881,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. @@ -984,7 +984,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 @@ -1136,7 +1136,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, @@ -1193,9 +1193,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 @@ -1368,7 +1368,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))) @@ -1397,7 +1397,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 |