Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2003 23:58:32 +0200
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        "David O'Brien" <obrien@FreeBSD.org>, cvs-all@FreeBSD.org, cvs-src@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/less Makefile lesspipe.sh
Message-ID:  <20030306215832.GB95318@sunbay.com>
In-Reply-To: <XFMail.20030306152521.jhb@FreeBSD.org>
References:  <20030306200858.GA41375@dragon.nuxi.com> <XFMail.20030306152521.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--UHN/qo2QbUvPLonB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Mar 06, 2003 at 03:25:21PM -0500, John Baldwin wrote:
>=20
> On 06-Mar-2003 David O'Brien wrote:
> >> In any case, it's not _stupid_, as the default behavior of
> >> SCRIPTSNAME of stripping extensions fits 99% of cases, and
> >> it was designed bearing this in mind.
> >=20
> > Huh??  SCRIPTSNAME is only used when you need to over ride the default
> > behavior.  Perhaps you are talking about "SCRIPTS".  What I think is
> > stupid is that if I do use SCRIPTSNAME I still have to use SCRIPTS.  Al=
so
> > as written, bsd.prog.mk doesn't handle this well:
> >=20
> >     .for script in ${SCRIPTS}
> >     .if defined(SCRIPTSNAME)
> >     SCRIPTSNAME_${script:T}?=3D ${SCRIPTSNAME}
> >     .else
> >     SCRIPTSNAME_${script:T}?=3D ${script:T:R}
> >     .endif
> >=20
> > So what we have is SCRIPTS is a list, but SCRIPTSNAME name isn't.
> > So what happens with
> >     ...
> >     SCRIPTS=3Dfoo.sh bar.sh
> >     SCRIPTSNAME=3Dbaz
> >     .include <bsd.prog.mk>
> >=20
> > both get installed as baz.  SCRIPTS and SCRIPTSNAME should be treated
> > separately.  I'd fix it, but anytime I touch bsd.*.mk you pop up and I
> > have a federal case on my hands -- thus I now try hard to never touch
> > them.
>=20
> The SCRIPTSNAME stuff seems to be intentional.  I use some hokey magic
> like so to deal with compiled python scripts:
>=20
> # Special rules to handle installing Python scripts
> .if defined(PYSRCS) && !empty(PYSRCS)
> PYOBJS=3D         ${PYSRCS:S/$/c/}
> SCRIPTS+=3D       ${PYOBJS}
> CLEANFILES+=3D    ${PYOBJS}
> .ifdef PYDIR
> SCRIPTSDIR=3D     ${PYDIR}
> .endif
> SCRIPTSMODE=3D    444
> .for script in ${PYOBJS}
> SCRIPTSNAME_${script:T}?=3D       ${script}
> .endfor
> .endif
>=20
> Then I just have 'PYSRCS=3Dfoo.py bar.py' and the compiled versions get
> installed as foo.pyc and bar.pyc.
>=20
You'd better s/SCRIPTS/FILES/ then, and remove most
of your hokey.  :-)

--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--UHN/qo2QbUvPLonB
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+Z8SIUkv4P6juNwoRAvSuAJ9i2y0dkoYtTv5REJj+9Xhy6StytACfWbrx
gDUCBCoXJtiFdii4sj8UOHw=
=gtJS
-----END PGP SIGNATURE-----

--UHN/qo2QbUvPLonB--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-src" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030306215832.GB95318>