From owner-svn-ports-head@FreeBSD.ORG Wed Sep 18 21:16:25 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ECD72B73; Wed, 18 Sep 2013 21:16:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA4B326D2; Wed, 18 Sep 2013 21:16:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8ILGP4f060401; Wed, 18 Sep 2013 21:16:25 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8ILGP1c060397; Wed, 18 Sep 2013 21:16:25 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201309182116.r8ILGP1c060397@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 18 Sep 2013 21:16:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r327576 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 21:16:26 -0000 Author: bapt Date: Wed Sep 18 21:16:25 2013 New Revision: 327576 URL: http://svnweb.freebsd.org/changeset/ports/327576 Log: Add a new bsd.sanity.mk. This file is responsible to do some sanity checking on port, as well as doing some sanity checking on users configuration New macro for developer: WARNING (this will issue a warning to the normal users can be used to warn the user about deprecating feature that will be unsupported soon. New macro to put in your make.conf for Maintainers: DEVELOPER=yes this macro will activate warning on usage of deprecated features and errors on now unspported usage of macros. Reviewed by: bdrewery Added: head/Mk/bsd.sanity.mk (contents, props changed) Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Wed Sep 18 21:01:43 2013 (r327575) +++ head/Mk/bsd.port.mk Wed Sep 18 21:16:25 2013 (r327576) @@ -1290,11 +1290,7 @@ STRIP= #none # Start of pre-makefile section. .if !defined(AFTERPORTMK) && !defined(INOPTIONSMK) -.if defined(_PREMKINCLUDED) -check-makefile:: - @${ECHO_MSG} "${PKGNAME}: Makefile error: you cannot include bsd.port[.pre].mk twice" - @${FALSE} -.endif +.include "${PORTSDIR}/Mk/bsd.sanity.mk" _PREMKINCLUDED= yes @@ -6495,6 +6491,9 @@ install-license: @${DO_NADA} .endif +#.if defined(DEVELOPER_MODE) +#.include "${PORTSDIR}/Mk/bsd.developer.mk" +#.endif .endif # End of post-makefile section. Added: head/Mk/bsd.sanity.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/bsd.sanity.mk Wed Sep 18 21:16:25 2013 (r327576) @@ -0,0 +1,109 @@ +# $FreeBSD$ +# +# MAINTAINER: portmgr@FreeBSD.org +# + +.if defined(USE_GMAKE) +DEV_WARNING+= USE_GMAKE is deprecated consider using USES=gmake +.endif + +.if defined(WITHOUT_NLS) +WARNING+= WITHOUT_NLS is deprecated use NLS option instead +.endif + +.if defined(WITHOUT_X11) +WARNING+= WITHOUT_X11 is deprecated use X11 option instead +.endif + +.if !defined(LICENSE) +DEV_WARNING+= No license is defined consider adding one +.endif + +.if defined(USE_PERL5) && ${USE_PERL5} == yes +DEV_ERROR+= USE_PERL5=yes is unsupported please use USES=perl5 instead +.endif + +.if defined(PERL_CONFIGURE) +DEV_ERROR+= PERL_CONFIGURE is unsupported please use USES=perl5 along with USE_PERL5=configure +.endif + +.if defined(PERL_MODBUILD) +DEV_ERROR+= PERL_MODBUILD is unsupported please use USES=perl5 along with USE_PERL5=modbuild +.endif + +.if defined(USE_PERL5_BUILD) +DEV_ERROR+= USE_PERL5_BUILD is unsupported please use USES=perl5 along with USE_PERL5=build +.endif + +.if defined(USE_PERL5_RUN) +DEV_ERROR+= USE_PERL5_RUN is unsupported please use USES=perl5 along with USE_PERL5=run +.endif + +.if defined(USE_KDEBASE_VER) +DEV_ERROR+= USE_KDEBASE_VER is unsupported +.endif + +.if defined(USE_KDELIBS_VER) +DEV_ERROR+= USE_KDELIBS_VER is unsupported +.endif + +.if defined(USE_QT_VER) +DEV_ERROR+= USE_QT_VER is unsupported +.endif + +.if defined(USE_DISPLAY) +DEV_WARNING+= USE_DISPLAY is deprecated please use USES=display +.endif + +.if defined(USE_ICONV) +DEV_ERROR+= USE_ICONV is unsupported please use USES=iconv +.endif + +.if defined(USE_CMAKE) +DEV_ERROR+= USE_CMAKE is unsupported please use USES=cmake +.endif + +.if defined(USE_READLINE) +DEV_ERROR+= USE_READLINE is unsupported please use USES=readline +.endif + +.if defined(USE_FUSE) +DEV_ERROR+= USE_FUSE is unupported please use USES=fuse +.endif + +.if defined(USE_GETTEXT) +DEV_ERROR+= USE_GETTEXT is unsupported replaced by USES=gettext +.endif + +.if defined(WARNING) +show-warnings: + @${ECHO_MSG} "${WARNING}" + @sleep 5 + +check-makefile:: show-warnings +.endif + +.if defined(_PREMKINCLUDED) +DEV_ERROR+= you cannot include bsd.port[.pre].mk twice +.endif + +.if defined(DEVELOPER) +.if defined(DEV_WARNING) +show-dev-warnings: + @${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile warnings, please consider fixing /!\\" + @${ECHO_MSG} + @${ECHO_MSG} "${DEV_WARNING}" + @${ECHO_MSG} + @sleep 5 +check-makefile:: show-dev-warnings +.endif + +.if defined(DEV_ERROR) +show-dev-errors: + @${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile errors /!\\" + @${ECHO_MSG} + @${ECHO_MSG} "${DEV_ERROR}" + @${FALSE} +check-makefile:: show-dev-errors +.endif +.endif