From patchwork Sat Sep 12 08:49:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 11771703 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 12336112E for ; Sat, 12 Sep 2020 08:50:08 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D8537214F1 for ; Sat, 12 Sep 2020 08:50:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8537214F1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kH1Dv-0001RO-HW; Sat, 12 Sep 2020 08:49:31 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kH1Du-0001RJ-Ql for xen-devel@lists.xenproject.org; Sat, 12 Sep 2020 08:49:30 +0000 X-Inumbo-ID: 0143afed-ded0-4899-b556-db9000d3a358 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 0143afed-ded0-4899-b556-db9000d3a358; Sat, 12 Sep 2020 08:49:30 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 064B4B02C; Sat, 12 Sep 2020 08:49:45 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH] tools/build: avoid $(file ...) directive in Makefile Date: Sat, 12 Sep 2020 10:49:13 +0200 Message-Id: <20200912084913.5318-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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 --- 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)" >>$@