From owner-p4-projects@FreeBSD.ORG Thu Jul 20 10:56:14 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6A4B416A4ED; Thu, 20 Jul 2006 10:56:14 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E8A616A4DE for ; Thu, 20 Jul 2006 10:56:13 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3505B43D46 for ; Thu, 20 Jul 2006 10:56:13 +0000 (GMT) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6KAuDik083848 for ; Thu, 20 Jul 2006 10:56:13 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6KAuCjl083845 for perforce@freebsd.org; Thu, 20 Jul 2006 10:56:12 GMT (envelope-from gabor@FreeBSD.org) Date: Thu, 20 Jul 2006 10:56:12 GMT Message-Id: <200607201056.k6KAuCjl083845@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 101983 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2006 10:56:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=101983 Change 101983 by gabor@gabor_spitfire on 2006/07/20 10:55:56 Move the DESTDIR and PREFIX sanity checks to a better place to make it work on pointyhat. Submitted by: erwin Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#50 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#50 (text+ko) ==== @@ -1392,38 +1392,6 @@ .endif .endif -# These do some path checks if DESTDIR is set correctly. -# You can force skipping these test by defining IGNORE_PATH_CHECKS -.if !defined(IGNORE_PATH_CHECKS) -.if (${PREFIX:C,(^.).*,\1,} != "/") -.BEGIN: - @${ECHO_MSG} "PREFIX must be defined as an absolute path so that when 'make'" - @${ECHO_MSG} "is invoked in the work area PREFIX points to the right place." - @${FALSE} -.endif -.if defined(DESTDIR) -.if (${DESTDIR:C,(^.).*,\1,} != "/") -.if ${DESTDIR} == "/" -.BEGIN: - @${ECHO_MSG} "You can't set DESTDIR to /. Please re-run make with" - @${ECHO_MSG} "DESTDIR unset." - @${FALSE} -.else -.BEGIN: - @${ECHO_MSG} "DESTDIR must be defined as an absolute path so that when 'make'" - @${ECHO_MSG} "is invoked in the work area DESTDIR points to the right place." - @${FALSE} -.endif -.endif -.if (${DESTDIR:C,^.*(/)$$,\1,} == "/") -.BEGIN: - @${ECHO_MSG} "DESTDIR can't have a trailing slash. Please remove the trailing" - @${ECHO_MSG} "slash and re-run 'make'" - @${FALSE} -.endif -.endif -.endif - PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg .if ${OSVERSION} >= 500036 @@ -1547,6 +1515,38 @@ .include "${PORTSDIR}/Mk/bsd.sdl.mk" .endif +# These do some path checks if DESTDIR is set correctly. +# You can force skipping these test by defining IGNORE_PATH_CHECKS +.if !defined(IGNORE_PATH_CHECKS) +.if (${PREFIX:C,(^.).*,\1,} != "/") +.BEGIN: + @${ECHO_MSG} "PREFIX must be defined as an absolute path so that when 'make'" + @${ECHO_MSG} "is invoked in the work area PREFIX points to the right place." + @${FALSE} +.endif +.if defined(DESTDIR) +.if (${DESTDIR:C,(^.).*,\1,} != "/") +.if ${DESTDIR} == "/" +.BEGIN: + @${ECHO_MSG} "You can't set DESTDIR to /. Please re-run make with" + @${ECHO_MSG} "DESTDIR unset." + @${FALSE} +.else +.BEGIN: + @${ECHO_MSG} "DESTDIR must be defined as an absolute path so that when 'make'" + @${ECHO_MSG} "is invoked in the work area DESTDIR points to the right place." + @${FALSE} +.endif +.endif +.if (${DESTDIR:C,^.*(/)$$,\1,} == "/") +.BEGIN: + @${ECHO_MSG} "DESTDIR can't have a trailing slash. Please remove the trailing" + @${ECHO_MSG} "slash and re-run 'make'" + @${FALSE} +.endif +.endif +.endif + .if ${OSVERSION} >= 502123 X_WINDOW_SYSTEM ?= xorg .elif (${OSVERSION} >= 450005 && !defined(XFREE86_VERSION)) || \