From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 08 Jul 2011 14:32:33 +0200 Subject: [U-Boot] [RFC PATCH 3/4] Add new folder and build system for SPL In-Reply-To: <4E16EAE9.5070505@ti.com> References: <1309352967-5719-1-git-send-email-aneesh@ti.com> <1309883182-12854-1-git-send-email-daniel.schwierzeck@googlemail.com> <1309883182-12854-4-git-send-email-daniel.schwierzeck@googlemail.com> <20110708091721.79CCB126F38F@gemini.denx.de> <4E16EAE9.5070505@ti.com> Message-ID: <20110708123233.31C6B15794A4@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Aneesh V, In message <4E16EAE9.5070505@ti.com> you wrote: > > >> +# create 'spl/obj' within OBJTREE for spl > >> +OBJTREE := $(OBJTREE)/spl/obj This is the part I dislike: we redefine variables and lose track of their original values. > >> +# We want the final binaries in this directory > >> +obj := $(obj)../ > First of all, this was really intended to be: > > +obj := $(obj)../../ Now we have already two levels oif such redefinitions, one going down and the other going up. This is, well, confusing. I think, we should remember the original value of $(OBJTREE), so we can use it here where we need it. > > I don't really like these "../" parts. Can we please try to omit > > these? We can use $(TOPDIR) and/or $(OBJTREE) instead to express the > > path names, can't we? > > Please note that even if we use $(OBJTREE), to achieve the above, we > will need: > > +obj := $(OBJTREE)/../ > > Please note that $(OBJTREE) needs to be updated before including > config.mk while $(obj) needs to be updated after it. Well, we can of course: - use a different name instead of OBJTREE everywhere, and leave OBJTREE as reference to the origonal value for global use, or - introduce a new variable that stores the original setting of OBJTREE so we can refer to this later > I used BUILD_DIR/spl/obj as OBJTREE to avoid this problem. I understand what you are doing, and I agree with it. I just dislike the tiny implementation detaild of using relative chnages up and down in the directory structure. I would rather be able to use absolute directory names (which are way easier to verify for debugging, etc.). Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Mistakes are often the stepping stones to utter failure.