From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>, Ian Jackson <iwj@xenproject.org>,
Wei Liu <wl@xen.org>
Subject: [PATCH] tools/build: avoid $(file ...) directive in Makefile
Date: Sat, 12 Sep 2020 10:49:13 +0200 [thread overview]
Message-ID: <20200912084913.5318-1-jgross@suse.com> (raw)
Using $(file ...) breaks the build with make older than version 4.0.
Replace it with echo.
Fixes: 52dbd6f07cea7a ("tools: generate pkg-config files from make variables")
Signed-off-by: Juergen Gross <jgross@suse.com>
---
tools/Rules.mk | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/tools/Rules.mk b/tools/Rules.mk
index ccb197596e..8ba8230270 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -175,29 +175,29 @@ $(PKG_CONFIG_DIR):
mkdir -p $(PKG_CONFIG_DIR)
$(PKG_CONFIG_DIR)/%.pc: Makefile $(XEN_ROOT)/tools/Rules.mk $(PKG_CONFIG_DIR)
- $(file >$@,prefix=$(PKG_CONFIG_PREFIX))
- $(file >>$@,includedir=$(PKG_CONFIG_INCDIR))
- $(file >>$@,libdir=$(PKG_CONFIG_LIBDIR))
- $(foreach var,$(PKG_CONFIG_VARS),$(file >>$@,$(var)))
- $(file >>$@,)
- $(file >>$@,Name: $(PKG_CONFIG_NAME))
- $(file >>$@,Description: $(PKG_CONFIG_DESC))
- $(file >>$@,Version: $(PKG_CONFIG_VERSION))
- $(file >>$@,Cflags: -I$${includedir} $(CFLAGS_xeninclude))
- $(file >>$@,Libs: -L$${libdir} $(PKG_CONFIG_USELIBS) -l$(PKG_CONFIG_LIB))
- $(file >>$@,Libs.private: $(PKG_CONFIG_LIBSPRIV))
- $(file >>$@,Requires.private: $(PKG_CONFIG_REQPRIV))
+ @echo "prefix=$(PKG_CONFIG_PREFIX)" >$@
+ @echo "includedir=$(PKG_CONFIG_INCDIR)" >>$@
+ @echo "libdir=$(PKG_CONFIG_LIBDIR)" >>$@
+ @for v in $(PKG_CONFIG_VARS); do echo "$$v" >>$@; done
+ @echo "" >>$@
+ @echo "Name: $(PKG_CONFIG_NAME)" >>$@
+ @echo "Description: $(PKG_CONFIG_DESC)" >>$@
+ @echo "Version: $(PKG_CONFIG_VERSION)" >>$@
+ @echo "Cflags: -I\$${includedir} $(CFLAGS_xeninclude)" >>$@
+ @echo "Libs: -L\$${libdir} $(PKG_CONFIG_USELIBS) -l$(PKG_CONFIG_LIB)" >>$@
+ @echo "Libs.private: $(PKG_CONFIG_LIBSPRIV)" >>$@
+ @echo "Requires.private: $(PKG_CONFIG_REQPRIV)" >>$@
%.pc: Makefile $(XEN_ROOT)/tools/Rules.mk
- $(file >$@,prefix=$(PKG_CONFIG_PREFIX))
- $(file >>$@,includedir=$(PKG_CONFIG_INCDIR))
- $(file >>$@,libdir=$(PKG_CONFIG_LIBDIR))
- $(foreach var,$(PKG_CONFIG_VARS),$(file >>$@,$(var)))
- $(file >>$@,)
- $(file >>$@,Name: $(PKG_CONFIG_NAME))
- $(file >>$@,Description: $(PKG_CONFIG_DESC))
- $(file >>$@,Version: $(PKG_CONFIG_VERSION))
- $(file >>$@,Cflags: -I$${includedir})
- $(file >>$@,Libs: -L$${libdir} -l$(PKG_CONFIG_LIB))
- $(file >>$@,Libs.private: $(PKG_CONFIG_LIBSPRIV))
- $(file >>$@,Requires.private: $(PKG_CONFIG_REQPRIV))
+ @echo "prefix=$(PKG_CONFIG_PREFIX)" >$@
+ @echo "includedir=$(PKG_CONFIG_INCDIR)" >>$@
+ @echo "libdir=$(PKG_CONFIG_LIBDIR)" >>$@
+ @for v in $(PKG_CONFIG_VARS); do echo "$$v" >>$@; done
+ @echo "" >>$@
+ @echo "Name: $(PKG_CONFIG_NAME)" >>$@
+ @echo "Description: $(PKG_CONFIG_DESC)" >>$@
+ @echo "Version: $(PKG_CONFIG_VERSION)" >>$@
+ @echo "Cflags: -I\$${includedir}" >>$@
+ @echo "Libs: -L\$${libdir} -l$(PKG_CONFIG_LIB)" >>$@
+ @echo "Libs.private: $(PKG_CONFIG_LIBSPRIV)" >>$@
+ @echo "Requires.private: $(PKG_CONFIG_REQPRIV)" >>$@
--
2.26.2
next reply other threads:[~2020-09-12 8:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-12 8:49 Juergen Gross [this message]
2020-09-14 9:37 ` [PATCH] tools/build: avoid $(file ...) directive in Makefile Wei Liu
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=20200912084913.5318-1-jgross@suse.com \
--to=jgross@suse.com \
--cc=iwj@xenproject.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.