From owner-freebsd-ports@FreeBSD.ORG Tue Nov 11 15:30:09 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E6F36EB for ; Tue, 11 Nov 2014 15:30:09 +0000 (UTC) Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx.arcor.de", Issuer "Thawte SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 14845BD3 for ; Tue, 11 Nov 2014 15:30:08 +0000 (UTC) Received: from mail-in-17-z2.arcor-online.net (mail-in-17-z2.arcor-online.net [151.189.8.34]) by mx.arcor.de (Postfix) with ESMTP id 630BCE4132 for ; Tue, 11 Nov 2014 15:59:51 +0100 (CET) Received: from mail-in-08.arcor-online.net (mail-in-08.arcor-online.net [151.189.21.48]) by mail-in-17-z2.arcor-online.net (Postfix) with ESMTP id 552A5366D80 for ; Tue, 11 Nov 2014 15:59:51 +0100 (CET) X-Greylist: Passed host: 88.67.114.153 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-08.arcor-online.net 206433AE819 Received: from lorvorc.mips.inka.de (dslb-088-067-114-153.088.067.pools.vodafone-ip.de [88.67.114.153]) by mail-in-08.arcor-online.net (Postfix) with ESMTPS id 206433AE819 for ; Tue, 11 Nov 2014 15:59:51 +0100 (CET) Received: from lorvorc.mips.inka.de (localhost [127.0.0.1]) by lorvorc.mips.inka.de (8.14.9/8.14.7) with ESMTP id sABExotW034539 for ; Tue, 11 Nov 2014 15:59:50 +0100 (CET) (envelope-from news@lorvorc.mips.inka.de) Received: (from news@localhost) by lorvorc.mips.inka.de (8.14.9/8.14.9/Submit) id sABExocf034538 for freebsd-ports@freebsd.org; Tue, 11 Nov 2014 15:59:50 +0100 (CET) (envelope-from news) To: freebsd-ports@freebsd.org From: Christian Weisgerber Newsgroups: list.freebsd.ports Subject: Re: comments for a pmake newb Date: Tue, 11 Nov 2014 14:59:50 +0000 (UTC) Lines: 38 Message-ID: References: <86a93zpzz6.fsf@gly.ftfl.ca> X-Trace: lorvorc.mips.inka.de 1415717990 34219 ::1 (11 Nov 2014 14:59:50 GMT) X-Complaints-To: usenet@mips.inka.de User-Agent: slrn/1.0.1 (FreeBSD) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 15:30:09 -0000 On 2014-11-10, Joseph Mingrone wrote: > I'm porting a program that uses a simple GNU make file, but I'm thinking > about replacing the make file to remove the devel/gmake dependency. I > don't foresee many upstream changes that will make this an issue. Is > this a bad/good idea? Probably not worth it. If upstream intended to provide a portable Makefile but inadvertently included gmake-isms, you can create a patch to fix this and submit it back upstream. > Are there any example ports that do this? My > searching didn't turn any up. Potential candidates are ports that come with Makefile* in their files/ directory. > CFLAGS = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=200809L -D_THREAD_SAFE -D_XOPEN_SOURCE=700 -pedantic -std=c11 -Wall > INC = -I/usr/local/include > LDFLAGS = -L/usr/local/lib > LDLIBS = -lX11 > > .ifmake debug > CFLAGS += -DDEBUG -g -O0 > .else > CFLAGS += -DNDEBUG -O3 > .endif Do you intend to override CFLAGS again from the ports Makefile? A port should respect the system CFLAGS that are passed in. It obviously can add -DBLA, but it must not clobber optimization setting with its own -Ox. Similarly, it shouldn't hardcode /usr/local but use ${LOCALBASE}. -- Christian "naddy" Weisgerber naddy@mips.inka.de