From owner-freebsd-questions@FreeBSD.ORG Mon Jul 4 20:13:35 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70F6D16A41C for ; Mon, 4 Jul 2005 20:13:35 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F32043D53 for ; Mon, 4 Jul 2005 20:13:35 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 66E895FAD; Mon, 4 Jul 2005 16:13:34 -0400 (EDT) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 95897-05; Mon, 4 Jul 2005 16:13:24 -0400 (EDT) Received: from [192.168.1.3] (pool-68-161-54-113.ny325.east.verizon.net [68.161.54.113]) by pi.codefab.com (Postfix) with ESMTP id 71B715D27; Mon, 4 Jul 2005 16:13:24 -0400 (EDT) Message-ID: <42C9986B.6040901@mac.com> Date: Mon, 04 Jul 2005 16:13:31 -0400 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Dexter References: <42C96953.9020406@mac.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at codefab.com Cc: freebsd-questions@freebsd.org Subject: Re: List all make targets? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jul 2005 20:13:35 -0000 Michael Dexter wrote: >> Michael Dexter wrote: >>> Is there a 'make' flag to list all make targets for any given >>> directory containing Makefile* ? >> >> grep ':' Makefile ...comes pretty close. > > Another reader suggested I cat the file... I take it the answer is "no." The answer is "it's probably not useful". Make uses implied rules for suffix transformations, so for example there is an implied target for foo.o which depends on foo.c, which looks something like: .c.o : ${CC} ${CFLAGS} -c ${.IMPSRC} These rules represent a few hundred lines worth of build rules which could be applied to any file as needed in order to build things without having these rules actually specified in the Makefile itself. > Specifically I am looking for a quick way to see the make targets as > 'make' would accept them while hunting for 'uninstall' and other > surprises. I see that it gets complicated as i.e. "_legacy" is a > legitimate target along with "buildworld." More to investigate! "make -n -d g1 | less"...? Take a look at the main target and at the "parents" target at the top. -- -Chuck