From owner-freebsd-ports@freebsd.org Thu Sep 8 23:51:20 2016 Return-Path: Delivered-To: freebsd-ports@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 3B049BD2A4B for ; Thu, 8 Sep 2016 23:51:20 +0000 (UTC) (envelope-from amaniatis@apache.org) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1.freebsd.org (Postfix) with SMTP id 1EEC7EAF for ; Thu, 8 Sep 2016 23:51:19 +0000 (UTC) (envelope-from amaniatis@apache.org) Received: (qmail 28277 invoked by uid 99); 8 Sep 2016 23:51:18 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2016 23:51:18 +0000 Received: from ip-136.ish.com.au (ip-136.ish.com.au [203.29.62.136]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id D8F971A003E; Thu, 8 Sep 2016 23:51:17 +0000 (UTC) Subject: Re: ${INSTALL_DATA} problems To: Mark Linimon , Aristedes Maniatis References: <3f536359-c17a-d226-7ddc-7264b5af7c97@apache.org> <20160908231339.GC15471@lonesome.com> Cc: Mathieu Arnold , FreeBSD Mailing List From: Aristedes Maniatis Message-ID: Date: Fri, 9 Sep 2016 09:51:15 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Thunderbird/49.0 MIME-Version: 1.0 In-Reply-To: <20160908231339.GC15471@lonesome.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 23:51:20 -0000 On 9/09/2016 9:13am, Mark Linimon wrote: > On Fri, Sep 09, 2016 at 08:29:12AM +1000, Aristedes Maniatis wrote: >> Maybe the Makefile language will become clearer to me one day, but >> I've been using FreeBSD since 4.0 and it hasn't clicked yet. > > Don't worry, the FreeBSD ports framework does things with the Makefile > language that was never intended by make's designers :-) > > We do try to document things in the Porter's Handbook, but sometimes > the only thing to do is wade into bsd.port.mk and friends and read the > code. (Not recomended for the faint of heart, though.) I think the most useful thing that could be done is more examples. Even a list of ports which implement things in the recommended ways and do the full range of common things. /var/poudriere/ports/default # grep -R {CP} * | wc -l 1504 So me copying how mariadb101 does it (for example), gives me the wrong result. If I had a dozen "best practices" Makefiles I could copy them. The second most useful thing would be to enhance portlint. Right now it feels like 95% of what it does is enforce some arbitrary ordering of keywords. But if it instead gave you hints "I see you are using {INSTALL_DATA} with a wildcard or directory, instead you should use {COPYTREE_SHARE}" then much time would be saved. Cheers Ari -- --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A