]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Merge remote-tracking branch 'remotes/armbru/tags/pull-build-2019-07-02-v2' into...
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 4 Jul 2019 14:58:46 +0000 (15:58 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 4 Jul 2019 14:58:46 +0000 (15:58 +0100)
Build system patches for 2019-07-02

# gpg: Signature made Wed 03 Jul 2019 12:44:28 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-build-2019-07-02-v2:
  Makefile: Reuse all's recursion machinery for clean and install
  Makefile: Rename targets for make recursion
  Makefile: Drop bogus cleaning of $(ALL_SUBDIRS)/qemu-options.def
  Makefile: Remove code to smooth transition to config.status

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
1  2 
Makefile
configure
tests/Makefile.include

diff --combined Makefile
index d657df904166d7300ccf6137004e426f2edeab06,3e5bfb5da1264d5ffd8654acd8f258148615261e..45cc2f4f4deb92660fd62e1e09ef2395db062944
+++ b/Makefile
@@@ -73,14 -73,7 +73,7 @@@ CONFIG_ALL=
  
  config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
        @echo $@ is out-of-date, running configure
-       @# TODO: The next lines include code which supports a smooth
-       @# transition from old configurations without config.status.
-       @# This code can be removed after QEMU 1.7.
-       @if test -x config.status; then \
-           ./config.status; \
-         else \
-           sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh; \
-       fi
+       @./config.status
  else
  config-host.mak:
  ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
@@@ -461,25 -454,29 +454,29 @@@ config-host.h-timestamp: config-host.ma
  qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
        $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
  
- SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
- SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES))
+ TARGET_DIRS_RULES := $(foreach t, all clean install, $(addsuffix /$(t), $(TARGET_DIRS)))
  
- $(SOFTMMU_SUBDIR_RULES): $(authz-obj-y)
- $(SOFTMMU_SUBDIR_RULES): $(block-obj-y)
- $(SOFTMMU_SUBDIR_RULES): $(chardev-obj-y)
- $(SOFTMMU_SUBDIR_RULES): $(crypto-obj-y)
- $(SOFTMMU_SUBDIR_RULES): $(io-obj-y)
- $(SOFTMMU_SUBDIR_RULES): config-all-devices.mak
- $(SOFTMMU_SUBDIR_RULES): $(edk2-decompressed)
+ SOFTMMU_ALL_RULES=$(filter %-softmmu/all, $(TARGET_DIRS_RULES))
+ $(SOFTMMU_ALL_RULES): $(authz-obj-y)
+ $(SOFTMMU_ALL_RULES): $(block-obj-y)
+ $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
+ $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
+ $(SOFTMMU_ALL_RULES): $(io-obj-y)
+ $(SOFTMMU_ALL_RULES): config-all-devices.mak
+ $(SOFTMMU_ALL_RULES): $(edk2-decompressed)
  
- subdir-%:
-       $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
+ .PHONY: $(TARGET_DIRS_RULES)
+ # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
+ # $(dir $@) yields the sub-directory, and $(notdir $@) yields the sub-goal
+ $(TARGET_DIRS_RULES):
+       $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),)
  
  DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
  DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
  DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
  
- subdir-dtc: .git-submodule-status dtc/libfdt dtc/tests
+ .PHONY: dtc/all
+ dtc/all: .git-submodule-status dtc/libfdt dtc/tests
        $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
  
  dtc/%: .git-submodule-status
@@@ -497,23 -494,33 +494,33 @@@ CAP_CFLAGS += -DCAPSTONE_HAS_ARM6
  CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
  CAP_CFLAGS += -DCAPSTONE_HAS_X86
  
- subdir-capstone: .git-submodule-status
+ .PHONY: capstone/all
+ capstone/all: .git-submodule-status
        $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
  
- subdir-slirp: .git-submodule-status
+ .PHONY: slirp/all
+ slirp/all: .git-submodule-status
        $(call quiet-command,$(MAKE) -C $(SRC_PATH)/slirp BUILD_DIR="$(BUILD_DIR)/slirp" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(LDFLAGS)")
  
- $(SUBDIR_RULES): libqemuutil.a $(common-obj-y) \
+ # Compatibility gunk to keep make working across the rename of targets
+ # for recursion, to be removed some time after 4.1.
+ subdir-dtc: dtc/all
+ subdir-capstone: capstone/all
+ subdir-slirp: slirp/all
+ $(filter %/all, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \
        $(qom-obj-y) $(crypto-user-obj-$(CONFIG_USER_ONLY))
  
- ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
+ ROM_DIRS = $(addprefix pc-bios/, $(ROMS))
+ ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS)))
  # Only keep -O and -g cflags
- romsubdir-%:
-       $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/" CFLAGS="$(filter -O% -g%,$(CFLAGS))",)
- ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
+ .PHONY: $(ROM_DIRS_RULES)
+ $(ROM_DIRS_RULES):
+       $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" CFLAGS="$(filter -O% -g%,$(CFLAGS))" $(notdir $@),)
  
- recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
+ recurse-all: $(addsuffix /all, $(TARGET_DIRS) $(ROM_DIRS))
+ recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS))
+ recurse-install: $(addsuffix /install, $(TARGET_DIRS))
  
  $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc config-host.h
        $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"RC","version.o")
@@@ -662,7 -669,7 +669,7 @@@ clean-coverage
                "CLEAN", "coverage files")
  endif
  
- clean:
+ clean: recurse-clean
  # avoid old build problems by removing potentially incorrect old files
        rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
        rm -f qemu-options.def
        rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
        rm -f qapi-gen-timestamp
        rm -rf qga/qapi-generated
-       for d in $(ALL_SUBDIRS); do \
-       if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
-       rm -f $$d/qemu-options.def; \
-         done
        rm -f config-all-devices.mak
  
  VERSION ?= $(shell cat VERSION)
@@@ -750,7 -753,7 +753,7 @@@ bepo    c
  ifdef INSTALL_BLOBS
  BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \
  vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \
 -vgabios-ramfb.bin vgabios-bochs-display.bin \
 +vgabios-ramfb.bin vgabios-bochs-display.bin vgabios-ati.bin \
  ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \
  pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \
  pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
@@@ -834,7 -837,8 +837,8 @@@ endi
  ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
  
  install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir \
-       $(if $(INSTALL_BLOBS),$(edk2-decompressed))
+       $(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
+       recurse-install
  ifneq ($(TOOLS),)
        $(call install-prog,$(subst qemu-ga,qemu-ga$(EXESUF),$(TOOLS)),$(DESTDIR)$(bindir))
  endif
@@@ -900,9 -904,6 +904,6 @@@ endi
                $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
        done
        $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all"
-       for d in $(TARGET_DIRS); do \
-       $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
-         done
  
  .PHONY: ctags
  ctags:
@@@ -1139,7 -1140,7 +1140,7 @@@ endi
        @$(if $(TARGET_DIRS), \
                echo 'Architecture specific targets:'; \
                $(foreach t, $(TARGET_DIRS), \
-               printf "  %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \
+               printf "  %-30s - Build for %s\\n" $(t)/all $(t);) \
                echo '')
        @echo  'Cleaning targets:'
        @echo  '  clean           - Remove most generated files but keep the config'
diff --combined configure
index d565ea4bb971866cb9879923338a82bff4f567f8,6586420f30ab1b2895292686de277ddb047cb1fa..4983c8b5330058d7aedec53815a0c1bc35da6126
+++ b/configure
@@@ -6502,14 -6502,6 +6502,14 @@@ if test "$supported_os" = "no"; the
      echo "us upstream at qemu-devel@nongnu.org."
  fi
  
 +# Note that if the Python conditional here evaluates True we will exit
 +# with status 1 which is a shell 'false' value.
 +if ! $python -c 'import sys; sys.exit(sys.version_info < (3,0))'; then
 +  echo
 +  echo "warning: Python 2 support is deprecated" >&2
 +  echo "warning: Python 3 will be required for building future versions of QEMU" >&2
 +fi
 +
  config_host_mak="config-host.mak"
  
  echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
@@@ -6617,7 -6609,7 +6617,7 @@@ if test "$slirp" != "no"; the
    echo "SLIRP_LIBS=$slirp_libs" >> $config_host_mak
  fi
  if [ "$slirp" = "git" -o "$slirp" = "internal" ]; then
-     echo "config-host.h: subdir-slirp" >> $config_host_mak
+     echo "config-host.h: slirp/all" >> $config_host_mak
  fi
  if test "$vde" = "yes" ; then
    echo "CONFIG_VDE=y" >> $config_host_mak
@@@ -7889,10 -7881,10 +7889,10 @@@ if test -n "$enabled_cross_compilers"; 
  fi
  
  if [ "$fdt" = "git" ]; then
-   echo "config-host.h: subdir-dtc" >> $config_host_mak
+   echo "config-host.h: dtc/all" >> $config_host_mak
  fi
  if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then
-   echo "config-host.h: subdir-capstone" >> $config_host_mak
+   echo "config-host.h: capstone/all" >> $config_host_mak
  fi
  if test -n "$LIBCAPSTONE"; then
    echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak
diff --combined tests/Makefile.include
index d02132fb94aa26702d39e5aa3f72102e850bef3c,b54fea1bb426547a35b96e4a2543224b3bfb6bf5..a983dd32da61af0ecb4b797bb3e2c77484b79a62
@@@ -1,3 -1,4 +1,4 @@@
+ # -*- Mode: makefile -*-
  
  .PHONY: check-help
  check-help:
@@@ -260,7 -261,6 +261,7 @@@ check-qtest-arm-y += tests/m25p80-test$
  check-qtest-arm-y += tests/test-arm-mptimer$(EXESUF)
  check-qtest-arm-y += tests/boot-serial-test$(EXESUF)
  check-qtest-arm-y += tests/hexloader-test$(EXESUF)
 +check-qtest-arm-$(CONFIG_PFLASH_CFI02) += tests/pflash-cfi02-test$(EXESUF)
  
  check-qtest-aarch64-y = tests/numa-test$(EXESUF)
  check-qtest-aarch64-y += tests/boot-serial-test$(EXESUF)
@@@ -768,7 -768,6 +769,7 @@@ tests/device-introspect-test$(EXESUF): 
  tests/rtc-test$(EXESUF): tests/rtc-test.o
  tests/m48t59-test$(EXESUF): tests/m48t59-test.o
  tests/hexloader-test$(EXESUF): tests/hexloader-test.o
 +tests/pflash-cfi02$(EXESUF): tests/pflash-cfi02-test.o
  tests/endianness-test$(EXESUF): tests/endianness-test.o
  tests/prom-env-test$(EXESUF): tests/prom-env-test.o $(libqos-obj-y)
  tests/rtas-test$(EXESUF): tests/rtas-test.o $(libqos-spapr-obj-y)
@@@ -892,7 -891,7 +893,7 @@@ define do_test_ta
  endef
  
  .PHONY: $(patsubst %, check-qtest-%, $(QTEST_TARGETS))
- $(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: subdir-%-softmmu $(check-qtest-y)
+ $(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: %-softmmu/all $(check-qtest-y)
        $(call do_test_human,$(check-qtest-$*-y) $(check-qtest-generic-y), \
          QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
          QTEST_QEMU_IMG=qemu-img$(EXESUF))
@@@ -905,7 -904,7 +906,7 @@@ check-speed: $(check-speed-y
  
  # gtester tests with TAP output
  
- $(patsubst %, check-report-qtest-%.tap, $(QTEST_TARGETS)): check-report-qtest-%.tap: subdir-%-softmmu $(check-qtest-y)
+ $(patsubst %, check-report-qtest-%.tap, $(QTEST_TARGETS)): check-report-qtest-%.tap: %-softmmu/all $(check-qtest-y)
        $(call do_test_tap, $(check-qtest-$*-y) $(check-qtest-generic-y), \
          QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
          QTEST_QEMU_IMG=qemu-img$(EXESUF))