From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 3 13:51:01 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 798A937B401 for ; Thu, 3 Apr 2003 13:51:01 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C90443FAF for ; Thu, 3 Apr 2003 13:51:00 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.8/8.12.8) with ESMTP id h33Lp09Q001119; Thu, 3 Apr 2003 13:51:00 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h33Loxk0061653; Thu, 3 Apr 2003 13:50:59 -0800 (PST) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h33Loxeb061646; Thu, 3 Apr 2003 13:50:59 -0800 (PST) (envelope-from marcel) Date: Thu, 3 Apr 2003 13:50:59 -0800 From: Marcel Moolenaar To: Pawel Jakub Dawidek Message-ID: <20030403215059.GA37698@athlon.pn.xcllnt.net> References: <20030403212300.GL54604@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030403212300.GL54604@garage.freebsd.pl> User-Agent: Mutt/1.5.3i cc: freebsd-hackers@freebsd.org Subject: Re: Bug in make(1)? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2003 21:51:01 -0000 On Thu, Apr 03, 2003 at 11:23:00PM +0200, Pawel Jakub Dawidek wrote: > > Could someone please explain such make(1) behaviour: Because you told make(1) to by virtue of including bsd.prog.mk OBJS is derived from SRCS by replacing the extension. If SRCS contains foo/bar.c, OBJS will contain foo/bar.o... > IMHO make(1) should put .o files in current directory _and_ look for them > there when producing an executable file. Right? Wrong. It's the C compiler that puts files in the current directory by default, unless otherwise told by command line options. The only thing make(1) does is look for files you tell it to look for and make them if they are out of date (if told to do so). If you tell make to look for files the compiler does not create you have a broken makefile. It looks bsd.prog.mk does not handle subdirectories in a way you want, which means you have to reorganize your sources in order to use bsd.prog.mk or enhance the BSD includes to deal with that (if appropriate). -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net