From: Anthony PERARD <anthony.perard@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: "Anthony PERARD" <anthony.perard@citrix.com>,
"Luca Fancellu" <luca.fancellu@arm.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>
Subject: [XEN PATCH v4 02/32] tools/firmware/hvmloader: rework Makefile
Date: Thu, 11 Aug 2022 17:48:15 +0100 [thread overview]
Message-ID: <20220811164845.38083-3-anthony.perard@citrix.com> (raw)
In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com>
Setup proper dependencies with libacpi so we don't need to run "make
hvmloader" in the "all" target. ("build.o" new prerequisite isn't
exactly proper but a side effect of building the $(DSDT_FILES) is to
generate the "ssdt_*.h" needed by "build.o".)
Make use if "-iquote" instead of a plain "-I".
For "roms.inc" target, use "$(SHELL)" instead of plain "sh". And use
full path to "mkhex" instead of a relative one. Lastly, add "-f" flag
to "mv" to avoid a prompt in case the target already exist and we
don't have write permission.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
---
Notes:
v4:
- fix reason for 'mv -f' in patch description.
- add a comment about build.o's new prerequisites.
tools/firmware/hvmloader/Makefile | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile
index b754220839..2bb5deb0c6 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -60,8 +60,7 @@ ROMS += $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM)
endif
.PHONY: all
-all: acpi
- $(MAKE) hvmloader
+all: hvmloader
.PHONY: acpi
acpi:
@@ -73,12 +72,18 @@ smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\""
ACPI_PATH = ../../libacpi
DSDT_FILES = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c
ACPI_OBJS = $(patsubst %.c,%.o,$(DSDT_FILES)) build.o static_tables.o
-$(ACPI_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"$(CURDIR)/util.h\"
+$(ACPI_OBJS): CFLAGS += -iquote . -DLIBACPI_STDUTILS=\"$(CURDIR)/util.h\"
CFLAGS += -I$(ACPI_PATH)
vpath build.c $(ACPI_PATH)
vpath static_tables.c $(ACPI_PATH)
OBJS += $(ACPI_OBJS)
+$(DSDT_FILES): acpi
+
+# Add DSDT_FILES as a prerequisite of "build.o" so that make will also
+# generates the "ssdt_*.h" headers needed by "build.o".
+build.o: $(DSDT_FILES)
+
hvmloader: $(OBJS) hvmloader.lds
$(LD) $(LDFLAGS_DIRECT) -N -T hvmloader.lds -o $@ $(OBJS)
@@ -87,21 +92,21 @@ roms.inc: $(ROMS)
ifneq ($(ROMBIOS_ROM),)
echo "#ifdef ROM_INCLUDE_ROMBIOS" >> $@.new
- sh ../../misc/mkhex rombios $(ROMBIOS_ROM) >> $@.new
+ $(SHELL) $(XEN_ROOT)/tools/misc/mkhex rombios $(ROMBIOS_ROM) >> $@.new
echo "#endif" >> $@.new
endif
ifneq ($(STDVGA_ROM),)
echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
- sh ../../misc/mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new
+ $(SHELL) $(XEN_ROOT)/tools/misc/mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new
echo "#endif" >> $@.new
endif
ifneq ($(CIRRUSVGA_ROM),)
echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
- sh ../../misc/mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
+ $(SHELL) $(XEN_ROOT)/tools/misc/mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
echo "#endif" >> $@.new
endif
- mv $@.new $@
+ mv -f $@.new $@
.PHONY: clean
clean:
--
Anthony PERARD
next prev parent reply other threads:[~2022-08-11 16:49 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 16:48 [XEN PATCH v4 00/32] Toolstack build system improvement, toward non-recursive makefiles Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 01/32] tools/debugger/gdbsx: Fix and cleanup makefiles Anthony PERARD
2022-08-19 12:57 ` Ping: " Anthony PERARD
2022-08-11 16:48 ` Anthony PERARD [this message]
2022-08-12 13:36 ` [XEN PATCH v4 02/32] tools/firmware/hvmloader: rework Makefile Jan Beulich
2022-08-12 14:28 ` Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 03/32] tools/fuzz/x86_instruction_emulator: rework makefile Anthony PERARD
2022-08-12 13:41 ` Jan Beulich
2022-08-11 16:48 ` [XEN PATCH v4 04/32] tools/hotplug: cleanup Makefiles Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 05/32] tools/libfsimage: Cleanup makefiles Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 06/32] tools/xenpaging: Rework makefile Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 07/32] tools/xentop: rework makefile Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 08/32] tools/xentrace: rework Makefile Anthony PERARD
2022-08-19 12:59 ` Ping: " Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 09/32] .gitignore: Cleanup ignores of tools/libs/*/{headers.chk,*.pc} Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 10/32] tools/libs/util: cleanup Makefile Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 11/32] tools/flask/utils: list build targets in $(TARGETS) Anthony PERARD
2022-08-15 11:31 ` Daniel P. Smith
2022-08-11 16:48 ` [XEN PATCH v4 12/32] libs/libs.mk: Rename $(LIB) to $(TARGETS) Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 13/32] libs/libs.mk: Remove the need for $(PKG_CONFIG_INST) Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 14/32] libs/libs.mk: Rework target headers.chk dependencies Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 15/32] tools: Introduce $(xenlibs-rpath,..) to replace $(SHDEPS_lib*) Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 16/32] tools: Introduce $(xenlibs-ldlibs, ) macro Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 17/32] tools: Introduce $(xenlibs-ldflags, " Anthony PERARD
2022-08-19 13:09 ` Ping: " Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 18/32] tools/helper: Cleanup Makefile Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 19/32] tools/console: Use $(xenlibs-ldlibs,) Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 20/32] tools: Add -Werror by default to all tools/ Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 21/32] tools: Remove -Werror everywhere else Anthony PERARD
2022-08-15 11:34 ` Daniel P. Smith
2022-08-19 13:25 ` Ping: " Anthony PERARD
2022-08-19 14:56 ` Jan Beulich
2022-08-19 15:18 ` Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 22/32] tools/hotplug: Generate "hotplugpath.sh" with configure Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 23/32] libs/light/gentypes.py: allow to generate headers in subdirectory Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 24/32] git-checkout.sh: handle running git-checkout from a different directory Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 25/32] libs: Avoid exposing -Wl,--version-script to other built library Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 26/32] libs: Fix auto-generation of version-script for unstable libs Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 27/32] tools/include: Rework Makefile Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 28/32] libs/light: Rework acpi table build targets Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 29/32] libs/light: Rework generation of include/_libxl_*.h Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 30/32] libs/light: Rework targets prerequisites Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 31/32] libs/light: Makefile cleanup Anthony PERARD
2022-08-11 16:48 ` [XEN PATCH v4 32/32] tools/golang/xenlight: Rework gengotypes.py and generation of *.gen.go Anthony PERARD
2022-10-13 8:43 ` Henry Wang
2022-08-12 7:53 ` [XEN PATCH v4 00/32] Toolstack build system improvement, toward non-recursive makefiles Christian Lindig
2022-08-15 7:01 ` Jan Beulich
2022-08-19 13:40 ` Anthony PERARD
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=20220811164845.38083-3-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=luca.fancellu@arm.com \
--cc=roger.pau@citrix.com \
--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.