From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756220AbcAYNWV (ORCPT ); Mon, 25 Jan 2016 08:22:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:52308 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754812AbcAYNWS (ORCPT ); Mon, 25 Jan 2016 08:22:18 -0500 Subject: Re: Dependency issue through subdir's To: Kieran Bingham References: <56A6080C.2070006@kbingham.co.uk> Cc: linux-kbuild@vger.kernel.org, Jan Kiszka , Lee Jones , Peter Griffin , Linux Kernel From: Michal Marek Message-ID: <56A62187.3070805@suse.com> Date: Mon, 25 Jan 2016 14:22:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56A6080C.2070006@kbingham.co.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016-01-25 12:33, Kieran Bingham wrote: > This is functional on a make -j1 build, however at -j2 and above (from a > clean build), kbuild attempts to generate my file before > include/generated/timeconst.h resulting in the following error: > > --- 8< --- > GEN scripts/gdb/linux/constants.py > In file included from sources/linux/include/linux/ktime.h:25:0, > from /linux/include/linux/rcupdate.h:47, > from /linux/include/linux/rbtree.h:34, > from /linux/include/linux/mm_types.h:9, > from /linux/arch/x86/include/asm/pgtable.h:448, > from /linux/scripts/gdb/linux/constants.py.in:16: > sources/linux/include/linux/jiffies.h:10:33: fatal error: > generated/timeconst.h: No such file or directory > --- >8 --- [...] > 2) Move the code that generates this file to /Kbuild. However I don't > like the idea of putting non-essential generator at the top level build You can keep the code in scripts/gdb/..., just move it out of $(always) and have the toplevel Kbuild file call something like $(MAKE) $(obj)=scripts/gdb/linux build_constants > 3) Add #ifndef __GENERATE_CONSTANTS_PY__ across any reference to > generated header files, such as in ktime.h, and define that with my > Preprocessor statement. If you do not need the generated headers, this might be the least evil. We already have the COMPILE_OFFSETS and __GENERATING_BOUNDS_H defines for a similar purpose. Michal