From owner-cvs-src Thu Mar 6 12:25:13 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDC4A37B401 for ; Thu, 6 Mar 2003 12:25:10 -0800 (PST) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF1C343FDD for ; Thu, 6 Mar 2003 12:25:07 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 32482 invoked from network); 6 Mar 2003 20:25:14 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 6 Mar 2003 20:25:14 -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 h26KMFhT052513; Thu, 6 Mar 2003 15:22:15 -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: <20030306200858.GA41375@dragon.nuxi.com> Date: Thu, 06 Mar 2003 15:25:21 -0500 (EST) From: John Baldwin To: "David O'Brien" Subject: Re: cvs commit: src/usr.bin/less Makefile lesspipe.sh Cc: cvs-all@FreeBSD.org, cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Ruslan Ermilov Sender: owner-cvs-src@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 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. -- 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-src" in the body of the message