From owner-cvs-src Thu Mar 6 12: 9: 4 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 C6BBD37B401; Thu, 6 Mar 2003 12:09:00 -0800 (PST) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7FDA43F75; Thu, 6 Mar 2003 12:08:59 -0800 (PST) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (smmsp@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.7/8.12.7) with ESMTP id h26K8wdh041494; Thu, 6 Mar 2003 12:08:59 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.7/8.12.7/Submit) id h26K8wFx041493; Thu, 6 Mar 2003 12:08:58 -0800 (PST) Date: Thu, 6 Mar 2003 12:08:58 -0800 From: "David O'Brien" To: Ruslan Ermilov Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/less Makefile lesspipe.sh Message-ID: <20030306200858.GA41375@dragon.nuxi.com> Reply-To: obrien@FreeBSD.org References: <200303060435.h264Zmkk039395@repoman.freebsd.org> <20030306154915.GE55489@sunbay.com> <20030306181137.GB40027@dragon.nuxi.com> <20030306185824.GE78034@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030306185824.GE78034@sunbay.com> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 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 Thu, Mar 06, 2003 at 08:58:24PM +0200, Ruslan Ermilov wrote: > The "documented" name is an example only, it is not the default -- > one still needs to set the LESSOPEN environment variable. Yeah, so? I'd much rather use the example than be HIH. > The example script from the manpage can't even handle the `-' as > the first character in the name. *shrug* I've used exactly what I committed since Sep 9 1998. It's worked great for me. If you have improvements to the script itself, email me a patch. > How do you expect people to know that we provide lesspipe.sh and > they should set to LESSOPEN=/usr/bin/lesspipe.sh to explore it? I am doing this in steps. I need to poll people to see if it should be committed to the sample dot files, or in /etc/login.conf. > The answer is to document this (hint: this can easily be done by > compile-time adding the FreeBSD-specific section to the otherwise > stock vendor file), where you can document the fact that FreeBSD > provides /usr/bin/lesspipe (without .sh) suitable for LESSOPEN. Hint, I *like* the name and don't plan on changing. Plus based on the man page, I feel more people are likely to have "lesspipe.sh" than "lesspipe" on their non-FreeBSD systems. > 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message