From owner-freebsd-current Sat Apr 26 03:36:53 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id DAA16003 for current-outgoing; Sat, 26 Apr 1997 03:36:53 -0700 (PDT) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id DAA15995 for ; Sat, 26 Apr 1997 03:36:47 -0700 (PDT) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.8.5/8.8.5) with SMTP id LAA00655; Sat, 26 Apr 1997 11:35:01 +0100 (BST) Date: Sat, 26 Apr 1997 11:35:01 +0100 (BST) From: Doug Rabson To: David Nugent cc: freebsd-current@freebsd.org Subject: Re: Object directories and source files from other directories In-Reply-To: <199704260944.TAA25499@labs.usn.blaze.net.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sat, 26 Apr 1997, David Nugent wrote: > I have a an interesting problem which I'd like some advice on. > > I wish to introduce into ftpd the ability to compile it with an > internal '/bin/ls'[*]. In fact, FreeBSD's ls - linked into ftpd > with main() from ls renamed to something more appropriate. > Source files should come from ../../bin/ls relative to libexec/ftpd > from within the source tree. > > Now, the problem is this. I wish to use these files directly, but > simply putting them, including the path, into the SRCS= macro > will cause the objects to be taken from /usr/obj/usr/src/bin/ls, > but I wish to compile them separately and put them into ftpd's > object directory instead. It sounds like you need to use .PATH; something like: .PATH: ${.CURDIR}/../../bin/ls added to your Makefile should do the trick. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891