Date: Thu, 06 Mar 2003 17:15:11 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Ruslan Ermilov <ru@FreeBSD.org> Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, "David O'Brien" <obrien@FreeBSD.org> Subject: Re: cvs commit: src/usr.bin/less Makefile lesspipe.sh Message-ID: <XFMail.20030306171511.jhb@FreeBSD.org> In-Reply-To: <20030306215832.GB95318@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 06-Mar-2003 Ruslan Ermilov wrote: > On Thu, Mar 06, 2003 at 03:25:21PM -0500, John Baldwin wrote: >> >> 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. >> > >> > 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. Also >> > as written, bsd.prog.mk doesn't handle this well: >> > >> > .for script in ${SCRIPTS} >> > .if defined(SCRIPTSNAME) >> > SCRIPTSNAME_${script:T}?= ${SCRIPTSNAME} >> > .else >> > SCRIPTSNAME_${script:T}?= ${script:T:R} >> > .endif >> > >> > So what we have is SCRIPTS is a list, but SCRIPTSNAME name isn't. >> > So what happens with >> > ... >> > SCRIPTS=foo.sh bar.sh >> > SCRIPTSNAME=baz >> > .include <bsd.prog.mk> >> > >> > 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. >> >> The SCRIPTSNAME stuff seems to be intentional. I use some hokey magic >> like so to deal with compiled python scripts: >> >> # Special rules to handle installing Python scripts >> .if defined(PYSRCS) && !empty(PYSRCS) >> PYOBJS= ${PYSRCS:S/$/c/} >> SCRIPTS+= ${PYOBJS} >> CLEANFILES+= ${PYOBJS} >> .ifdef PYDIR >> SCRIPTSDIR= ${PYDIR} >> .endif >> SCRIPTSMODE= 444 >> .for script in ${PYOBJS} >> SCRIPTSNAME_${script:T}?= ${script} >> .endfor >> .endif >> >> Then I just have 'PYSRCS=foo.py bar.py' and the compiled versions get >> installed as foo.pyc and bar.pyc. >> > You'd better s/SCRIPTS/FILES/ then, and remove most > of your hokey. :-) I thought about adding a new type but that looked to be a lot more work than just messing with SCRIPTS. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ 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?XFMail.20030306171511.jhb>