Drop fix rpath patch which is no longer needed.
Drop g-ir-scanner/g-ir-compiler override patch which is now upstream.
Rebase remaining patches.
Meson now requires single quotes for cross-compilation.conf, replace
double quotes with single quotes.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+++ /dev/null
-From 4db4fd79d9bb2b98cea1117f22b6c97942ab2ecd Mon Sep 17 00:00:00 2001
-From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
-Date: Sat, 14 Jul 2018 11:18:45 +0200
-Subject: [PATCH] Only fix RPATH if install_rpath is not empty
-
-Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
-[Fix: remove leftover from original/unconditional code]
-Signed-off-by: Peter Seiderer <ps.report@gmx.net>
----
- mesonbuild/minstall.py | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
-index 8ac6aab1..7ef04116 100644
---- a/mesonbuild/minstall.py
-+++ b/mesonbuild/minstall.py
-@@ -489,8 +489,14 @@ class Installer:
- printed_symlink_error = True
- if os.path.isfile(outname):
- try:
-- depfixer.fix_rpath(outname, install_rpath, final_path,
-- install_name_mappings, verbose=False)
-+ # Buildroot check-host-rpath script expects RPATH
-+ # But if install_rpath is empty, it will stripped.
-+ # So, preserve it in this case
-+ if install_rpath:
-+ depfixer.fix_rpath(outname, install_rpath, final_path,
-+ install_name_mappings, verbose=False)
-+ else:
-+ print("Skipping RPATH fixing")
- except SystemExit as e:
- if isinstance(e.code, int) and e.code == 0:
- pass
---
-2.20.1
-
--- /dev/null
+From ea85465e608178080c3b4d51af9765a8c7c0dae3 Mon Sep 17 00:00:00 2001
+From: Matt Weber <matthew.weber@rockwellcollins.com>
+Date: Sat, 26 Oct 2019 09:17:29 -0500
+Subject: [PATCH] Prefer ext static libs when --default-library=static
+
+This patch adds a case in the library pattern logic to prefer static
+libraries when the Meson Core option for "default_library" is set to
+solely static.
+
+The existing library search order makes sense for cases of shared and
+shared / static mixed. However if using a prebuilt cross-toolchain,
+they usually provide both a static and shared version of sysroot
+libraries. This presents a problem in a complete static build where
+there won't be shared libraries at runtime and during build time there
+are failures like "ld: attempted static link of dynamic object".
+
+Bug:
+https://github.com/mesonbuild/meson/issues/6108
+
+Fixes:
+http://autobuild.buildroot.net/results/db1740b4777f436324218c52bc7b08e5c21b667d/
+http://autobuild.buildroot.net/results/c17/c17bbb12d9deadd64a441b36e324cfbbe8aba5be/
+
+Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
+---
+ mesonbuild/compilers/mixins/clike.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
+index 47e97d261..729c98acc 100644
+--- a/mesonbuild/compilers/mixins/clike.py
++++ b/mesonbuild/compilers/mixins/clike.py
+@@ -940,6 +940,9 @@ class CLikeCompiler:
+ elif env.machines[self.for_machine].is_cygwin():
+ shlibext = ['dll', 'dll.a']
+ prefixes = ['cyg'] + prefixes
++ elif env.coredata.get_builtin_option('default_library') == 'static':
++ # Linux/BSDs
++ shlibext = ['a']
+ else:
+ # Linux/BSDs
+ shlibext = ['so']
+--
+2.25.1
+
+++ /dev/null
-From b390f29b9e0170d5bf410f4bef5a697655857633 Mon Sep 17 00:00:00 2001
-From: Matt Weber <matthew.weber@rockwellcollins.com>
-Date: Sat, 26 Oct 2019 09:17:29 -0500
-Subject: [PATCH] Prefer ext static libs when --default-library=static
-
-This patch adds a case in the library pattern logic to prefer static
-libraries when the Meson Core option for "default_library" is set to
-solely static.
-
-The existing library search order makes sense for cases of shared and
-shared / static mixed. However if using a prebuilt cross-toolchain,
-they usually provide both a static and shared version of sysroot
-libraries. This presents a problem in a complete static build where
-there won't be shared libraries at runtime and during build time there
-are failures like "ld: attempted static link of dynamic object".
-
-Bug:
-https://github.com/mesonbuild/meson/issues/6108
-
-Fixes:
-http://autobuild.buildroot.net/results/db1740b4777f436324218c52bc7b08e5c21b667d/
-http://autobuild.buildroot.net/results/c17/c17bbb12d9deadd64a441b36e324cfbbe8aba5be/
-
-Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
----
- mesonbuild/compilers/mixins/clike.py | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
-index 5d50b7d..8f5f1c6 100644
---- a/mesonbuild/compilers/mixins/clike.py
-+++ b/mesonbuild/compilers/mixins/clike.py
-@@ -857,6 +857,9 @@ class CLikeCompiler:
- elif env.machines[self.for_machine].is_cygwin():
- shlibext = ['dll', 'dll.a']
- prefixes = ['cyg'] + prefixes
-+ elif env.coredata.get_builtin_option('default_library') == 'static':
-+ # Linux/BSDs
-+ shlibext = ['a']
- else:
- # Linux/BSDs
- shlibext = ['so']
---
-2.17.1
-
--- /dev/null
+From 8622d37587169c1e4a4206a9462868ede057f0e8 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 15 Feb 2020 15:13:59 +0100
+Subject: [PATCH] mesonbuild/dependencies/base.py: add pkg_config_static
+
+Allow the user to always call pkg-config with --static thanks to a
+pkg_config_static property. This will allow to fix static build failures
+with libglib2:
+
+FAILED: gio/gio
+/home/naourr/work/instance-0/output-1/host/bin/arm-linux-gcc -o gio/gio 'gio/6ae6c9e@@gio@exe/gio-tool.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-cat.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-copy.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-info.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-list.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mime.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mkdir.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-monitor.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mount.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-move.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-open.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-rename.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-remove.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-save.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-set.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-trash.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-tree.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -static -Wl,--start-group gio/libgio-2.0.a glib/libglib-2.0.a gobject/libgobject-2.0.a gmodule/libgmodule-2.0.a -pthread /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libz.a /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmount.a /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libpcre.a -lm /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libffi.a -Wl,--end-group '-Wl,-rpath,$ORIGIN/:$ORIGIN/../glib:$ORIGIN/../gobject:$ORIGIN/../gmodule' -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gio -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/glib -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gobject -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gmodule
+/home/naourr/work/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmount.a(la-fs.o): in function `__mnt_fs_set_source_ptr':
+fs.c:(.text+0x5ec): undefined reference to `blkid_parse_tag_string'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/0d36952def63cb69628697fa6408aeb6ce10cb5b
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Romain: Fix if condition, pkg_config_static is a string not a boolean]
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ mesonbuild/dependencies/base.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
+index 23701da95..83e51626d 100644
+--- a/mesonbuild/dependencies/base.py
++++ b/mesonbuild/dependencies/base.py
+@@ -849,7 +849,8 @@ class PkgConfigDependency(ExternalDependency):
+ def _set_libs(self):
+ env = None
+ libcmd = [self.name, '--libs']
+- if self.static:
++ if self.static or \
++ (self.env.properties[self.for_machine].get('pkg_config_static', None) == 'true'):
+ libcmd.append('--static')
+ # Force pkg-config to output -L fields even if they are system
+ # paths so we can do manual searching with cc.find_library() later.
+--
+2.25.1
+
+++ /dev/null
-From 49b1c8df7e4ff3a441d831f926d87920952025bf Mon Sep 17 00:00:00 2001
-From: James Hilliard <james.hilliard1@gmail.com>
-Date: Sat, 2 May 2020 20:43:36 -0600
-Subject: [PATCH] Allow overriding g-ir-scanner and g-ir-compiler binaries.
-
-This is useful when one needs to force meson to use wrappers for cross
-compilation.
-
-Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
-[james.hilliard1@gmail.com: backport and largely adapt upstream commit
-1e073c4c1bd7de06bc74d84e3807c9b210e57a22, as the version in master has
-undergone haevy refactorisation]
----
- mesonbuild/modules/gnome.py | 34 +++++++++++++++++++++-------------
- 1 file changed, 21 insertions(+), 13 deletions(-)
-
-diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
-index a00005588..b6d7cc141 100644
---- a/mesonbuild/modules/gnome.py
-+++ b/mesonbuild/modules/gnome.py
-@@ -32,7 +32,7 @@ from ..mesonlib import (
- MachineChoice, MesonException, OrderedSet, Popen_safe, extract_as_list,
- join_args, unholder,
- )
--from ..dependencies import Dependency, PkgConfigDependency, InternalDependency
-+from ..dependencies import Dependency, PkgConfigDependency, InternalDependency, ExternalProgram
- from ..interpreterbase import noKwargs, permittedKwargs, FeatureNew, FeatureNewKwargs
-
- # gresource compilation is broken due to the way
-@@ -735,21 +735,29 @@ class GnomeModule(ExtensionModule):
- # these utilities via pkg-config, so it would be best to use the
- # results from pkg-config when possible.
- gi_util_dirs_check = [state.environment.get_build_dir(), state.environment.get_source_dir()]
-- giscanner = self.interpreter.find_program_impl('g-ir-scanner')
-- if giscanner.found():
-- giscanner_path = giscanner.get_command()[0]
-- if not any(x in giscanner_path for x in gi_util_dirs_check):
-- giscanner = self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
-+ giscanner_bin = state.environment.lookup_binary_entry(MachineChoice.HOST, 'g-ir-scanner')
-+ if giscanner_bin is not None:
-+ giscanner = ExternalProgram.from_entry('g-ir-scanner', giscanner_bin)
- else:
-- giscanner = self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
-+ giscanner = self.interpreter.find_program_impl('g-ir-scanner')
-+ if giscanner.found():
-+ giscanner_path = giscanner.get_command()[0]
-+ if not any(x in giscanner_path for x in gi_util_dirs_check):
-+ giscanner = self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
-+ else:
-+ giscanner = self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
-
-- gicompiler = self.interpreter.find_program_impl('g-ir-compiler')
-- if gicompiler.found():
-- gicompiler_path = gicompiler.get_command()[0]
-- if not any(x in gicompiler_path for x in gi_util_dirs_check):
-- gicompiler = self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
-+ gicompiler_bin = state.environment.lookup_binary_entry(MachineChoice.HOST, 'g-ir-compiler')
-+ if gicompiler_bin is not None:
-+ gicompiler = ExternalProgram.from_entry('g-ir-compiler', gicompiler_bin)
- else:
-- gicompiler = self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
-+ gicompiler = self.interpreter.find_program_impl('g-ir-compiler')
-+ if gicompiler.found():
-+ gicompiler_path = gicompiler.get_command()[0]
-+ if not any(x in gicompiler_path for x in gi_util_dirs_check):
-+ gicompiler = self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
-+ else:
-+ gicompiler = self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
-
- ns = kwargs.pop('namespace')
- nsversion = kwargs.pop('nsversion')
---
-2.25.1
-
+++ /dev/null
-From 71295eec724f89ef5f5822c17cf44480335225cd Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Sat, 15 Feb 2020 15:13:59 +0100
-Subject: [PATCH] mesonbuild/dependencies/base.py: add pkg_config_static
-
-Allow the user to always call pkg-config with --static thanks to a
-pkg_config_static property. This will allow to fix static build failures
-with libglib2:
-
-FAILED: gio/gio
-/home/naourr/work/instance-0/output-1/host/bin/arm-linux-gcc -o gio/gio 'gio/6ae6c9e@@gio@exe/gio-tool.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-cat.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-copy.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-info.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-list.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mime.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mkdir.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-monitor.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mount.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-move.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-open.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-rename.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-remove.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-save.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-set.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-trash.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-tree.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -static -Wl,--start-group gio/libgio-2.0.a glib/libglib-2.0.a gobject/libgobject-2.0.a gmodule/libgmodule-2.0.a -pthread /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libz.a /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmount.a /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libpcre.a -lm /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libffi.a -Wl,--end-group '-Wl,-rpath,$ORIGIN/:$ORIGIN/../glib:$ORIGIN/../gobject:$ORIGIN/../gmodule' -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gio -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/glib -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gobject -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gmodule
-/home/naourr/work/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmount.a(la-fs.o): in function `__mnt_fs_set_source_ptr':
-fs.c:(.text+0x5ec): undefined reference to `blkid_parse_tag_string'
-
-Fixes:
- - http://autobuild.buildroot.org/results/0d36952def63cb69628697fa6408aeb6ce10cb5b
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Romain: Fix if condition, pkg_config_static is a string not a boolean]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
----
- mesonbuild/dependencies/base.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
-index 5636602e..de4e87bc 100644
---- a/mesonbuild/dependencies/base.py
-+++ b/mesonbuild/dependencies/base.py
-@@ -858,7 +858,8 @@ class PkgConfigDependency(ExternalDependency):
- def _set_libs(self):
- env = None
- libcmd = [self.name, '--libs']
-- if self.static:
-+ if self.static or \
-+ (self.env.properties[self.for_machine].get('pkg_config_static', None) == 'true'):
- libcmd.append('--static')
- # Force pkg-config to output -L fields even if they are system
- # paths so we can do manual searching with cc.find_library() later.
---
-2.25.4
-
# Locally calculated after checking pgp signature
-# https://github.com/mesonbuild/meson/releases/download/0.54.2/meson-0.54.2.tar.gz.asc
-sha256 a7716eeae8f8dff002e4147642589ab6496ff839e4376a5aed761f83c1fa0455 meson-0.54.2.tar.gz
+# https://github.com/mesonbuild/meson/releases/download/0.55.0/meson-0.55.0.tar.gz.asc
+sha256 0a1ae2bfe2ae14ac47593537f93290fb79e9b775c55b4c53c282bc3ca3745b35 meson-0.55.0.tar.gz
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 COPYING
#
################################################################################
-MESON_VERSION = 0.54.2
+MESON_VERSION = 0.55.0
MESON_SITE = https://github.com/mesonbuild/meson/releases/download/$(MESON_VERSION)
MESON_LICENSE = Apache-2.0
MESON_LICENSE_FILES = COPYING
-e 's%@TARGET_ARCH@%$$(HOST_MESON_TARGET_CPU_FAMILY)%g' \
-e 's%@TARGET_CPU@%$$(HOST_MESON_TARGET_CPU)%g' \
-e 's%@TARGET_ENDIAN@%$$(HOST_MESON_TARGET_ENDIAN)%g' \
- -e 's%@TARGET_CFLAGS@%$$(call make-comma-list,$$($(2)_CFLAGS))%g' \
- -e 's%@TARGET_LDFLAGS@%$$(call make-comma-list,$$($(2)_LDFLAGS))%g' \
- -e 's%@TARGET_CXXFLAGS@%$$(call make-comma-list,$$($(2)_CXXFLAGS))%g' \
+ -e "s%@TARGET_CFLAGS@%$$(call make-sq-comma-list,$$($(2)_CFLAGS))%g" \
+ -e "s%@TARGET_LDFLAGS@%$$(call make-sq-comma-list,$$($(2)_LDFLAGS))%g" \
+ -e "s%@TARGET_CXXFLAGS@%$$(call make-sq-comma-list,$$($(2)_CXXFLAGS))%g" \
-e 's%@HOST_DIR@%$$(HOST_DIR)%g' \
-e 's%@STAGING_DIR@%$$(STAGING_DIR)%g' \
-e 's%@STATIC@%$$(if $$(BR2_STATIC_LIBS),true,false)%g' \
-e 's%@TARGET_ARCH@%$(HOST_MESON_TARGET_CPU_FAMILY)%g' \
-e 's%@TARGET_CPU@%$(HOST_MESON_TARGET_CPU)%g' \
-e 's%@TARGET_ENDIAN@%$(HOST_MESON_TARGET_ENDIAN)%g' \
- -e 's%@TARGET_CFLAGS@%$(call make-comma-list,$(TARGET_CFLAGS))@PKG_TARGET_CFLAGS@%g' \
- -e 's%@TARGET_LDFLAGS@%$(call make-comma-list,$(TARGET_LDFLAGS))@PKG_TARGET_CFLAGS@%g' \
- -e 's%@TARGET_CXXFLAGS@%$(call make-comma-list,$(TARGET_CXXFLAGS))@PKG_TARGET_CFLAGS@%g' \
+ -e "s%@TARGET_CFLAGS@%$(call make-sq-comma-list,$(TARGET_CFLAGS))@PKG_TARGET_CFLAGS@%g" \
+ -e "s%@TARGET_LDFLAGS@%$(call make-sq-comma-list,$(TARGET_LDFLAGS))@PKG_TARGET_CFLAGS@%g" \
+ -e "s%@TARGET_CXXFLAGS@%$(call make-sq-comma-list,$(TARGET_CXXFLAGS))@PKG_TARGET_CFLAGS@%g" \
-e 's%@HOST_DIR@%$(HOST_DIR)%g' \
-e 's%@STAGING_DIR@%$(STAGING_DIR)%g' \
-e 's%@STATIC@%$$(if $$(BR2_STATIC_LIBS),true,false)%g' \
# list of unquoted items: a b c d --> "a", "b", "c", "d"
make-comma-list = $(subst $(space),$(comma)$(space),$(patsubst %,"%",$(strip $(1))))
+# build a comma-separated list of single quoted items, from a space-separated
+# list of unquoted items: a b c d --> 'a', 'b', 'c', 'd'
+make-sq-comma-list = $(subst $(space),$(comma)$(space),$(patsubst %,'%',$(strip $(1))))
+
# Needed for the foreach loops to loop over the list of hooks, so that
# each hook call is properly separated by a newline.
define sep