From owner-svn-src-all@freebsd.org Mon Jun 3 18:42:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0634615BA338; Mon, 3 Jun 2019 18:42:55 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88C1D8FBBC; Mon, 3 Jun 2019 18:42:54 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x53IgoqS044143; Mon, 3 Jun 2019 11:42:50 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x53IgoVw044142; Mon, 3 Jun 2019 11:42:50 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201906031842.x53IgoVw044142@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348521 - in head: . etc sys/conf sys/modules usr.bin/login usr.sbin/services_mkdb In-Reply-To: To: Maxim Sobolev Date: Mon, 3 Jun 2019 11:42:50 -0700 (PDT) CC: Enji Cooper , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 88C1D8FBBC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.972,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jun 2019 18:42:55 -0000 > On Mon, Jun 3, 2019 at 7:28 AM Enji Cooper wrote: > > > Hi Maxim, > > > > > > > Modified: head/Makefile.inc1 > > > > > ============================================================================== > > > --- head/Makefile.inc1 Sun Jun 2 22:27:26 2019 (r348520) > > > +++ head/Makefile.inc1 Sun Jun 2 23:38:19 2019 (r348521) > > > @@ -887,8 +887,8 @@ MTREEFLAGS+= -W > > > INSTALLFLAGS+= -h sha256 > > > .endif > > > .if defined(DB_FROM_SRC) || defined(NO_ROOT) > > > -IMAKE_INSTALL= INSTALL="install ${INSTALLFLAGS}" > > > -IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}" > > > +IMAKE_INSTALL= INSTALL="${INSTALL} ${INSTALLFLAGS}" > > > +IMAKE_MTREE= MTREE_CMD="${MTREE_CMD} ${MTREEFLAGS}" I see the bugger with this change now, it is a loop, MTREE_CMD=${MTREE_CMD}... and I do not think MTREE_CMD is defined at this point, see below. > > > .endif > > > > Please back out this part of the change as it is unnecessary and adds > > a dependency on sys.mk?s definitions. $PATH should contain, i.e., be > > populated, with these tools when running make installworld. This is part of > > the logic behind how $ITOOLS, etc, works. That would be in direct conflict with how preceding tools worked, INSTALL?=install has been there for a very very long time and any direct invoke of install in our Makefile/.mk files is just wrong, and for the very reasoning that Max is trying to do. I made the mistake of following someone else earlier that thought it was INSTALL that was undefined, and as we known now that was not the case, it was MTREE_CMD that was undefined, and that is less clear, as iirc when that was originally done mtree was contained soly in src/etc/Makefile by design. It appears as if that hos how crept up directly into head/Makefile.inc1, and the definition for MTREE_CMD?= did not get moved to a more appropriate place. > > Thank you very much for your work and the rest of the change though! > > > > Thanks Enji, for a clarification, will do. I still cannot understand why > can't we have those tools being re-defined with top-level make environment? You should and must be able to do this. Especially for INSTALL, I fully support that part of this change staying. > What I am striving at is being able to do say, make INSTALL="abcd" > installworld. Yes, I understand I can call "abcd" "install" (or make a > symlink to it) and put it into PATH, but there are at least one issue here, > namely what if I need to pass some distinct argument to abcd based on usage > scenario. E.g. make INSTALL="abcd foo" distributiuon. In your case I should > be resorting to setting up some global environment variable and hope it > won't get erased somewhere in the call chain, but that's bit "how you > doing" IMHO. My approach makes certain things so much easier by cutting > those un-neded steps. > > At any rate thank for a feedback and some background info, I will do more > work on this. I was thinking more in terms of having some sort of > bsd.bootools.mk where this can be defined in a centralized manner. > > -Max -- Rod Grimes rgrimes@freebsd.org