lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <53A2D0FC.7040309@plexistor.com> Date: Thu, 19 Jun 2014 15:01:00 +0300 From: Boaz Harrosh <boaz@...xistor.com> To: Michal Marek <mmarek@...e.cz> CC: linux-kernel <linux-kernel@...r.kernel.org>, Alexei Starovoitov <alexei.starovoitov@...il.com>, Sam Ravnborg <sam@...nborg.org> Subject: Re: kbuild: support of new KBUILD_FULL_PATH On 06/19/2014 01:41 PM, Michal Marek wrote: <> >> Is there a document I need to edit for this new parameter? > > That would be Documentation/kbuild/kbuild.txt > Will send a VER2 thanks > >> Signed-off-by: Boaz Harrosh <boaz@...xistor.com> >> --- >> Makefile | 8 +++++++- >> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/Makefile b/Makefile >> index 97b2861..778732a 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -149,11 +149,17 @@ else >> _all: modules >> endif >> >> +# put KBUILD_FULL_PATH=1 if relative path to sources breaks your system >> +ifneq ($(KBUILD_FULL_PATH), 1) >> + KBUILD_FULL_PATH="" >> +endif >> + >> ifeq ($(KBUILD_SRC),) >> # building in the source tree >> srctree := . >> else >> - ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR))) >> + # if KBUILD_FULL_PATH is not empty then condition will fail >> + ifeq ($(KBUILD_FULL_PATH)$(KBUILD_SRC)/,$(dir $(CURDIR))) > > This is an ugly way to express the logic. > I kind of agree. My Makefile foo is not very strong any other way I know would duplicate code. What would you suggest? [ Best I can think of is: srctree := $(KBUILD_SRC) # if KBUILD_FULL_PATH=1 then do not use relative path ifneq ($(KBUILD_FULL_PATH), 1) ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR))) # building in a subdirectory of the source tree srctree := .. endif endif Is this better? ] > >> # building in a subdirectory of the source tree >> srctree := .. >> else > > How about generated sources like asm-offsets.s or the lexer and parser > in scripts/kconfig, does kdevelop figure out where the files live? If > not, you might need to add > > -objtree := . > +ifeq ($(KBUILD_FULL_PATH),1) > + objtree := $(CURDIR) > +else > + objtree := . > +endif > > to use the full path also for the O= directory. > I would not care for those at all. The important is those files that you need to point and edit to fix stuff. The generated files I better not edit usually. The edit is in some other place, right? > Michal > I saw that this patch caused other breakage as well. Will you be fixing those? Do you want to own this or you still need a ver2 of this patch? Thanks Boaz -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists