Subject: Re: src build system query
To: None <tech-userlevel@netbsd.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-userlevel
Date: 02/25/2004 10:03:11
On Tue, 24 Feb 2004, Bruce J.A. Nourish wrote:
> I'm porting OpenBSD's diff3(1). It uses a C program in /usr/libexec
> to do the hard work, and a ksh wrapper in /usr/bin. How do I write
> a Makefile that does this?

You can probably adapt the technique used in
[netbsd]/src/usr.bin/locate/Makefile.

Why does the script use ksh instead of /bin/sh?  I don't see anything
obvious in [openbsd]/src/usr.bin/diff3/diff3.ksh that wouldn't work in a
modern /bin/sh.

Also, I hope you plan to fix all the unsafe uses of unqoted shell
variables in the script.

--apb (Alan Barrett)