From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6dI6-0005NW-9X for qemu-devel@nongnu.org; Thu, 12 Apr 2018 10:33:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6dI1-0004XS-U2 for qemu-devel@nongnu.org; Thu, 12 Apr 2018 10:33:34 -0400 Received: from mail-qt0-x232.google.com ([2607:f8b0:400d:c0d::232]:41826) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6dI1-0004XF-OV for qemu-devel@nongnu.org; Thu, 12 Apr 2018 10:33:29 -0400 Received: by mail-qt0-x232.google.com with SMTP id d3so6383525qth.8 for ; Thu, 12 Apr 2018 07:33:29 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= References: <20180410193919.28026-1-alex.bennee@linaro.org> <20180410193919.28026-5-alex.bennee@linaro.org> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Message-ID: Date: Thu, 12 Apr 2018 11:33:25 -0300 MIME-Version: 1.0 In-Reply-To: <20180410193919.28026-5-alex.bennee@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v1 04/24] Makefile: Rename TARGET_DIRS to TARGET_LIST List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-devel@nongnu.org Cc: famz@redhat.com, cota@braap.org On 04/10/2018 04:38 PM, Alex Bennée wrote: > From: Fam Zheng > > To be more accurate on its purpose and make code that looks for a certain > target out of this variable more readable. > > Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé > --- > Makefile | 20 ++++++++++---------- > configure | 2 +- > scripts/create_config | 2 +- > tests/Makefile.include | 2 +- > 4 files changed, 13 insertions(+), 13 deletions(-) > > diff --git a/Makefile b/Makefile > index 727ef118f3..2c54cd8345 100644 > --- a/Makefile > +++ b/Makefile > @@ -62,8 +62,8 @@ seems to have been used for an in-tree build. You can fix this by running \ > endif > endif > > -CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y) > -CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y) > +CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_LIST)),y) > +CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_LIST)),y) > CONFIG_XEN := $(CONFIG_XEN_BACKEND) > CONFIG_ALL=y > -include config-all-devices.mak > @@ -362,8 +362,8 @@ DOCS= > endif > > SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR) > -SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) > -SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS)) > +SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_LIST)) > +SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_LIST)) > > ifeq ($(SUBDIR_DEVICES_MAK),) > config-all-devices.mak: > @@ -466,7 +466,7 @@ config-host.h-timestamp: config-host.mak > 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)) > +SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_LIST)) > SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES)) > > $(SOFTMMU_SUBDIR_RULES): $(block-obj-y) > @@ -510,7 +510,7 @@ ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) > 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)) > +ALL_SUBDIRS=$(TARGET_LIST) $(patsubst %,pc-bios/%, $(ROMS)) > > recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) > > @@ -763,7 +763,7 @@ distclean: clean > rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf > rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html > rm -f docs/qemu-block-drivers.7 > - for d in $(TARGET_DIRS); do \ > + for d in $(TARGET_LIST); do \ > rm -rf $$d || exit 1 ; \ > done > rm -Rf .sdk > @@ -864,7 +864,7 @@ endif > $(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 \ > + for d in $(TARGET_LIST); do \ > $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \ > done > > @@ -1062,9 +1062,9 @@ endif > @echo ' ctags/TAGS - Generate tags file for editors' > @echo ' cscope - Generate cscope index' > @echo '' > - @$(if $(TARGET_DIRS), \ > + @$(if $(TARGET_LIST), \ > echo 'Architecture specific targets:'; \ > - $(foreach t, $(TARGET_DIRS), \ > + $(foreach t, $(TARGET_LIST), \ > printf " %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \ > echo '') > @echo 'Cleaning targets:' > diff --git a/configure b/configure > index add87ff4d4..5a41c87cc3 100755 > --- a/configure > +++ b/configure > @@ -6094,7 +6094,7 @@ qemu_version=$(head $source_path/VERSION) > echo "VERSION=$qemu_version" >>$config_host_mak > echo "PKGVERSION=$pkgversion" >>$config_host_mak > echo "SRC_PATH=$source_path" >> $config_host_mak > -echo "TARGET_DIRS=$target_list" >> $config_host_mak > +echo "TARGET_LIST=$target_list" >> $config_host_mak > if [ "$docs" = "yes" ] ; then > echo "BUILD_DOCS=yes" >> $config_host_mak > fi > diff --git a/scripts/create_config b/scripts/create_config > index d727e5e36e..58948a67a4 100755 > --- a/scripts/create_config > +++ b/scripts/create_config > @@ -107,7 +107,7 @@ case $line in > target_name=${line#*=} > echo "#define TARGET_NAME \"$target_name\"" > ;; > - TARGET_DIRS=*) > + TARGET_LIST=*) > # do nothing > ;; > TARGET_*=y) # configuration > diff --git a/tests/Makefile.include b/tests/Makefile.include > index 3b9a5e31a2..3d2f0458ab 100644 > --- a/tests/Makefile.include > +++ b/tests/Makefile.include > @@ -854,7 +854,7 @@ endif > > # QTest rules > > -TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS))) > +TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_LIST))) > ifeq ($(CONFIG_POSIX),y) > QTEST_TARGETS = $(TARGETS) > check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y)) >