From owner-freebsd-questions@freebsd.org Sun Sep 6 02:50:31 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B94CD9C59C4 for ; Sun, 6 Sep 2015 02:50:31 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A07E120C for ; Sun, 6 Sep 2015 02:50:31 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id t862oUca082806 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 5 Sep 2015 20:50:30 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id t862oTxL082803; Sat, 5 Sep 2015 20:50:29 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sat, 5 Sep 2015 20:50:29 -0600 (MDT) From: Warren Block To: kpneal@pobox.com cc: Carl Johnson , freebsd-questions@freebsd.org Subject: Re: GCC question In-Reply-To: <20150906011733.GC94488@neutralgood.org> Message-ID: References: <55EAEE19.2060807@hiwaay.net> <20150905140658.GA790@ozzmosis.com> <55EAF9BA.3080700@hiwaay.net> <87oahg97ff.fsf@elk.localnet> <20150906011733.GC94488@neutralgood.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Sat, 05 Sep 2015 20:50:30 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 02:50:31 -0000 On Sat, 5 Sep 2015, kpneal@pobox.com wrote: > On Sat, Sep 05, 2015 at 09:07:00AM -0700, Carl Johnson wrote: >> As long as this came up, does anybody know of a similar incantation to >> show the defined rules and symbols for make? I remember seeing >> something like that years ago, but I haven't been able to find it >> since. > > There's a bunch of -d suboptions to make in its man page. > > Try "-dg1 -dv" as options to make. If that isn't quite right it should > at least be a starting point. These are not perfect, but they are useful. If you use csh/tcsh, anyway: alias __makevars 'make -ndv |& perl -ne '\''print "$1\n" if /^(?:Command|Global|Internal):(\S+?)\s+/;'\'' | sort -u' complete make 'C/F/(FORMATS= FORMATS=html FORMATS=html-split FORMATS=pdf)/' \ 'p/1/`make -V .ALLTARGETS`/' \ 'n/-V/`__makevars`/' 'make' [space] [tab] completes from available targets. 'make -V' [space] [tab] completes from known variables. Both probably miss some. The variable completion could be faster. Improvements welcome. (The first is for me, to complete 'make FORMATS=' for docs.)