From owner-freebsd-ports Sat Jan 11 14: 3:18 2003 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7269637B401 for ; Sat, 11 Jan 2003 14:03:16 -0800 (PST) Received: from analog.databits.net (analog.databits.net [198.78.65.155]) by mx1.FreeBSD.org (Postfix) with SMTP id 0F13043F3F for ; Sat, 11 Jan 2003 14:03:15 -0800 (PST) (envelope-from petef@analog.databits.net) Received: (qmail 39287 invoked by uid 1000); 11 Jan 2003 21:59:55 -0000 Date: Sat, 11 Jan 2003 16:59:55 -0500 From: Pete Fritchman To: David Thiel Cc: ports@freebsd.org Subject: Re: makefile style questions Message-ID: <20030111215955.GD81234@absolutbsd.org> References: <20030111215813.GA600@redundancy.redundancy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030111215813.GA600@redundancy.redundancy.org> User-Agent: Mutt/1.4i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org ++ 11/01/03 13:58 -0800 - David Thiel: | I've been doing a port of the Samhain IDS, and the distribution has | an "install-user" target that I'd like users to be able to run from | the port makefile - in other words, running make install-user in | /usr/ports/security/samhain runs make install-user in | /usr/ports/security/samhain/work/samhainx.x. Without make -C, | what's the proper way to do this? I'd add: install-user: @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} install-user) | Also, when running portlint, I'm always told that RUN_DEPENDS needs | to be earlier in the makefile - but I'm using it like so: | | .if defined(WITH_GPG) | CONFIGURE_ARGS+= --with-gpg=${PREFIX}/bin/gpg | RUN_DEPENDS= gnupg:${PORTSDIR}/security/gnupg | .endif | | Should I be doing that another way? Well, it should be split up: MAINTAINER = blah (other *_DEPENDS) .if defined(WITH_GPG) RUN_DEPENDS+= gnupg... .endif (other stuff until you get to configure-related things) CONFIGURE_ARGS+= --disable-something-global --whatever .if defined(WITH_GPG) CONFIGURE_ARGS+= --with-gpg .else CONFIGURE_ARGS+= --without-gpg .endif Lots of ports don't do it that way, but I think that's the Right Way(tm), makes the Makefile easier to follow if anything. --pete To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message