From owner-cvs-all Thu Mar 6 14:15:16 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96BC737B408 for ; Thu, 6 Mar 2003 14:15:12 -0800 (PST) Received: from mail.speakeasy.net (mail17.speakeasy.net [216.254.0.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id D100943FE3 for ; Thu, 6 Mar 2003 14:15:09 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 11798 invoked from network); 6 Mar 2003 22:15:16 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail17.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 6 Mar 2003 22:15:16 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id h26MC4hT052798; Thu, 6 Mar 2003 17:12:05 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030306215832.GB95318@sunbay.com> Date: Thu, 06 Mar 2003 17:15:11 -0500 (EST) From: John Baldwin To: Ruslan Ermilov Subject: Re: cvs commit: src/usr.bin/less Makefile lesspipe.sh Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, "David O'Brien" Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 >> > >> > 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 <>< 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-all" in the body of the message