pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: pkgsrc
On Sun, Apr 07, 2013 at 12:14:22AM +0200, Thomas Klausner wrote:
> On Sun, Apr 07, 2013 at 12:00:54AM +0200, Alistair Crooks wrote:
> > Thanks for commiting all of these changes...
> >
> > On Sat, Apr 06, 2013 at 09:07:37PM +0000, Blue Rats wrote:
> > > [...]
> > > Log Message:
> > > "Each sed command should appear in an assignment of its own."
> >
> > OK, I give in. Why should each sed command appear in an assignment of
> > its own? Certainly not for performance reasons. If there are multiple
> > sed commands, why do we create multiple copies of substituted files,
> > until the ultimate one is achieved?
>
> I think the argument might go something like this, to pick one example
> at random:
>
> --- pkgsrc/devel/sgb/Makefile:1.5 Wed Oct 31 11:19:45 2012
> +++ pkgsrc/devel/sgb/Makefile Sat Apr 6 21:07:32 2013
> @@ -23,8 +23,8 @@
> SUBST_MESSAGE.paths= Fixing hardcoded paths.
> SUBST_STAGE.paths= pre-configure
> SUBST_FILES.paths= Makefile
> -SUBST_SED.paths= -e 's,@LOCALBASE@,${LOCALBASE},g' \
> - -e 's,@PREFIX@,$${DESTDIR}${PREFIX},g'
> +SUBST_SED.paths= -e 's,@LOCALBASE@,${LOCALBASE},g'
> +SUBST_SED.paths+= -e 's,@PREFIX@,$${DESTDIR}${PREFIX},g'
>
> post-install:
> ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/sgb
>
> If you grep for DESTDIR, you'll only get
> -e 's,@PREFIX@,$${DESTDIR}${PREFIX},g'
> before, and after
> SUBST_SED.paths+= -e 's,@PREFIX@,$${DESTDIR}${PREFIX},g'
> so you have more context in the line itself.
Thanks, that makes perfect sense.
Alistair
PS. Maybe it's just me being picky, but this has nothing to do with a
"sed command", but rather relates to splitting make(1) definitions
across lines (and I happen to dislike strongly defs with \
at the end of lines). So I'm all for this change...
Home |
Main Index |
Thread Index |
Old Index