Read about our upcoming Code of Conduct on this issue

Commit 8afe2dcd authored by alex@thinkpad's avatar alex@thinkpad
Browse files

backtrace: sync with qemu (e4376a1ea9b9)

--HG--
branch : backtrace
parent 3d94d844dfdf
......@@ -248,28 +248,24 @@ clean::
$(TOP_DIR)/tcc/libtccx.o: FORCE
+$(MAKE) -C $(TOP_DIR)/tcc
QEMU_DBI_DIR=$(TOP_DIR)/contrib/qemu/eos/dbi
QEMU_INSTALLED_DBI_DIR=$(TOP_DIR)/../qemu/qemu-2.5.0/hw/eos/dbi
# backtrace.[ch] are shared with QEMU - make symlinks
# will this work on Windows?
$(SRC_DIR)/backtrace.c:: $(SRC_DIR)/backtrace.h
# backtrace.[ch] are shared with QEMU
# the install script will copy them from src/
# but I'd still like to edit them from one place and have the changes both in QEMU and ML
# symlinks caused issues on Windows and apparently also on Mac (?!) so let's avoid them for now
$(SRC_DIR)/backtrace.c $(SRC_DIR)/backtrace.h:: $(SRC_DIR)/backtrace.%: $(QEMU_DBI_DIR)/backtrace.%
$(call build,LN,ln -sfr $^ $@)
# where QEMU is installed (for emulating ML)
QEMU_INSTALLED_DBI_DIR=$(TOP_DIR)/../qemu/qemu-2.5.0/hw/eos/dbi
# copy from QEMU (outside ML dir) if they were edited there
# optional dependency, only if QEMU is installed "near" ML dir (the install script does that)
# https://stackoverflow.com/questions/8175653/marking-a-makefile-dependency-as-optional-or-otherwise-unimportant
# https://stackoverflow.com/questions/34105205/how-can-i-make-a-pattern-rule-dependency-optional-in-a-makefile
.SECONDEXPANSION:
$(QEMU_DBI_DIR)/backtrace.c $(QEMU_DBI_DIR)/backtrace.h: $(QEMU_DBI_DIR)/backtrace.%: $$(wildcard $(QEMU_INSTALLED_DBI_DIR)/backtrace.%)
$(SRC_DIR)/backtrace.c $(SRC_DIR)/backtrace.h:: $(SRC_DIR)/backtrace.%: $$(wildcard $(QEMU_INSTALLED_DBI_DIR)/backtrace.%)
$(call build,CP,$(CP) $^ $@)
# remove the symlinks on make clean
clean::
$(call rm_files, $(SRC_DIR)/backtrace.c $(SRC_DIR)/backtrace.h)
# make sure we have the header when building backtrace.c for the first time
$(SRC_DIR)/backtrace.c:: $(SRC_DIR)/backtrace.h
# Extract the stdio files that we need
DIET_OBJ = \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment