From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVyrU-0002dl-Va for qemu-devel@nongnu.org; Tue, 24 Jan 2017 06:02:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVyrQ-0008PV-6Y for qemu-devel@nongnu.org; Tue, 24 Jan 2017 06:02:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60858) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cVyrP-0008PJ-UF for qemu-devel@nongnu.org; Tue, 24 Jan 2017 06:02:00 -0500 From: "Daniel P. Berrange" Date: Tue, 24 Jan 2017 11:01:44 +0000 Message-Id: <20170124110151.937-2-berrange@redhat.com> In-Reply-To: <20170124110151.937-1-berrange@redhat.com> References: <20170124110151.937-1-berrange@redhat.com> Subject: [Qemu-devel] [PATCH v3 1/8] make: move top level dir to end of include search path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Llu=C3=ADs=20Vilanova?= , Paolo Bonzini , "Daniel P. Berrange" Currently the search path is 1. source dir corresponding to input file (implicit by compiler) 2. top level build dir 3. top level source dir 4. top level source include/ dir 5. source dir corresponding to input file 6. build dir corresponding to output file This causes a semantic difference in behaviour for builds where srcdir == builddir vs srcdir != builddir, because item 5 moves from end to start, when srcdir == builddir. As a general rule we also want to move to have all shared headers in the include/ dir, so move that ahead of the top level dirs in the search order. Thus we now have: 1. source dir corresponding to input file 2. build dir corresponding to output file 3. top level build dir 4. top level source dir 5. top level source include/ dir and items 1+2 and 4+5 collapse into a single dir when srcdir==builddir so overall order remains the same. Signed-off-by: Daniel P. Berrange --- rules.mak | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/rules.mak b/rules.mak index d5c516c..e09aabe 100644 --- a/rules.mak +++ b/rules.mak @@ -26,8 +26,10 @@ QEMU_CXXFLAGS = -D__STDC_LIMIT_MACROS $(filter-out -Wstrict-prototypes -Wmissing # Flags for dependency generation QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d -# Same as -I$(SRC_PATH) -I., but for the nested source/object directories -QEMU_INCLUDES += -I$(