Date: Sat, 24 Oct 2015 09:21:48 -0700 (PDT) From: Don Lewis <truckman@FreeBSD.org> To: danfe@FreeBSD.org Cc: kris@pcbsd.org, svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, kmoore@FreeBSD.org, ports-committers@freebsd.org Subject: Re: svn commit: r400121 - head/net-im/teamwords Message-ID: <201510241621.t9OGLm4A003033@gw.catspoiler.org> In-Reply-To: <20151024154100.GA2659@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24 Oct, Alexey Dokuchaev wrote: > On Sat, Oct 24, 2015 at 11:10:29AM -0400, Kris Moore wrote: >> On 10/24/2015 10:29, Alexey Dokuchaev wrote: >> > On Sat, Oct 24, 2015 at 02:06:56PM +0000, Kris Moore wrote: >> >> [...] >> >> do-install: >> >> ${STRIP_CMD} ${WRKSRC}/teamwords >> >> ${INSTALL} ${WRKSRC}/teamwords ${STAGEDIR}${PREFIX}/bin >> > >> > Wait, what? You strip the binary first and then install it? Why not >> > use ${INSTALL_PROGRAM} which DTRT itself? >> >> It's what was suggested when I built the port with DEVELOPER=yes. Is the >> end-result the same or is this just for the sake of minimalism? > > I'm not sure where does this suggestion come from; it makes little sense > to me. INSTALL_PROGRAM correctly respects your stripping policy, i.e.: > > $ make -V INSTALL_PROGRAM > install -s -m 555 > $ make -V INSTALL_PROGRAM STRIP='' > install -m 555 > > As for stripping binaries explicitly in the Makefile: I'm actually against > it; it made sense in pre-staging times when we've been installing stuff > directly into user's filesystem, but now with staging we ideally should be > just dumping unstripped binaries to staging area, and stripping should be > done upon "make install" by the framework. Those ${STRIP_CMD}'s just make > Makefiles more imperative and hard to control. Think of what would I have > to do if I want to build debug package? -- patching individual ports on an > ad-hoc basis in many little places instead of setting some universal knob > like NO_STRIP in /etc/make.conf or something. Debug builds set ${STRIP_CMD} to /bin/true. From bsd.port.mk: # Reset value from bsd.own.mk. .if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG) .if !defined(INSTALL_STRIPPED) STRIP= #none MAKE_ENV+= DONTSTRIP=yes STRIP_CMD= ${TRUE} .endif DEBUG_FLAGS?= -g CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} .if defined(INSTALL_TARGET) INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g} .endif .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510241621.t9OGLm4A003033>