Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2014 14:59:50 +0000 (UTC)
From:      Christian Weisgerber <naddy@mips.inka.de>
To:        freebsd-ports@freebsd.org
Subject:   Re: comments for a pmake newb
Message-ID:  <slrnm64936.11da.naddy@lorvorc.mips.inka.de>
References:  <86a93zpzz6.fsf@gly.ftfl.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2014-11-10, Joseph Mingrone <jrm@ftfl.ca> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?slrnm64936.11da.naddy>