qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Cc: kwolf@redhat.com, Peter Maydell <peter.maydell@linaro.org>,
	aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org,
	blauwirbel@gmail.com
Subject: Re: [Qemu-devel] [PATCH V9 2/8] Buildsystem clean tests directory clearly
Date: Fri, 16 Nov 2012 12:16:48 +0100	[thread overview]
Message-ID: <50A620A0.2020102@redhat.com> (raw)
In-Reply-To: <50A61D02.70007@linux.vnet.ibm.com>

Il 16/11/2012 12:01, Wenchao Xia ha scritto:
>>
>>
>> ifneq ($(wildcard config-host.mak),)
>> include $(SRC_PATH)/tests/Makefile
>> endif
>>
>> to
>>
>> -include $(SRC_PATH)/tests/Makefile
>>
>> ?
>>
>   yes, but original author seems not include tests/Makefile in
> this condition on purpose, so using MAKEFILES to keep it unchanged.

git blame tells you that the ifneq was added by commit e454e2e
(Makefile: Exclude tests/Makefile in unconfigured tree, 2012-01-17).

Instead of the ifneq, I proposed to use a minus in front of the include 
directive.  It will avoid failures if tests/Makefile does not exist.  
However, it is not very good because it will cause /tests/Makefile to 
be opened (see the commit message of e454e2e).

Perhaps an even better way to avoid the problem would be this: just move
the removal of makefile fragments to the _end_ of "make distclean":

diff --git a/Makefile b/Makefile
index 81c660f..b994109 100644
--- a/Makefile
+++ b/Makefile
@@ -203,9 +203,7 @@ qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
 
 gen-out-type = $(subst .,-,$(suffix $@))
 
-ifneq ($(wildcard config-host.mak),)
 include $(SRC_PATH)/tests/Makefile
-endif
 
 qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
 
@@ -265,8 +263,7 @@ qemu-%.tar.bz2:
 	$(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
 
 distclean: clean
-	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
-	rm -f config-all-devices.mak
+	rm -f config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
 	rm -f roms/seabios/config.mak roms/vgabios/config.mak
 	rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps qemu-doc.dvi
 	rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys
@@ -279,6 +276,7 @@ distclean: clean
 	rm -rf $$d || exit 1 ; \
         done
 	test -f pixman/config.log && make -C pixman distclean
+	rm -f config-host.mak rm -f config-all-devices.mak
 
 KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
 ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \


With this change, no need for MAKEFILES anymore.

Paolo

  reply	other threads:[~2012-11-16 11:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 10:12 [Qemu-devel] [PATCH V9 0/8] libqblock qemu block layer library Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 1/8] Buildsystem fix distclean error in pixman Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 2/8] Buildsystem clean tests directory clearly Wenchao Xia
2012-11-16 10:23   ` Peter Maydell
2012-11-16 10:31     ` Wenchao Xia
2012-11-16 10:56       ` Paolo Bonzini
2012-11-16 11:01         ` Wenchao Xia
2012-11-16 11:16           ` Paolo Bonzini [this message]
2012-11-16 12:40             ` Wenchao Xia
2012-11-16 12:49               ` Paolo Bonzini
2012-11-18 13:09                 ` Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 3/8] Buildsystem move qapi generation to Makefile.objs Wenchao Xia
2012-11-16 10:54   ` Paolo Bonzini
2012-11-16 10:58     ` Wenchao Xia
2012-11-16 11:12       ` Paolo Bonzini
2012-11-18 12:56         ` Wenchao Xia
2012-11-18 14:55           ` Paolo Bonzini
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 4/8] block export function path_has_protocol Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 5/8] libqblock build system Wenchao Xia
2012-11-16 11:08   ` Paolo Bonzini
2012-11-18 13:06     ` Wenchao Xia
2012-11-18 14:58       ` Paolo Bonzini
2012-11-19  7:47         ` Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 6/8] libqblock type defines Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 7/8] libqblock API Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 8/8] libqblock test example Wenchao Xia

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=50A620A0.2020102@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=xiawenc@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).