From owner-p4-projects@FreeBSD.ORG Thu Jul 27 21:30:39 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 3D1DB16A4FD; Thu, 27 Jul 2006 21:30:39 +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 1B9E616A4FB for ; Thu, 27 Jul 2006 21:30:39 +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 DA66143D4C for ; Thu, 27 Jul 2006 21:30:38 +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 k6RLUcjn030057 for ; Thu, 27 Jul 2006 21:30:38 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6RLUcLD030054 for perforce@freebsd.org; Thu, 27 Jul 2006 21:30:38 GMT (envelope-from gabor@FreeBSD.org) Date: Thu, 27 Jul 2006 21:30:38 GMT Message-Id: <200607272130.k6RLUcLD030054@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 102605 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, 27 Jul 2006 21:30:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=102605 Change 102605 by gabor@gabor_spitfire on 2006/07/27 21:29:44 Add a basic infrastructure support for building binaries for debugging purposes. This change introduces WITH_DEBUG. If set DEBUG_FLAGS (-g at default) are added to CFLAGS and binaries doesn't get stripped by INSTALL_PROGRAM. Besides, each port could/should add its specific things for WITH_DEBUG. DEBUG_FLAGS can be overrided, of course. Suggested by: netchild Reviewed by: netchild Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#63 edit .. //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#9 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#63 (text+ko) ==== @@ -289,6 +289,14 @@ # usage inside the ports framework, and the latter are reserved for user- # settable options. (Setting USE_* in /etc/make.conf is always wrong). # +# WITH_DEBUG - If set, debugging flags are added to CFLAGS and the +# binaries don't get stripped by INSTALL_PROGRAM. +# Besides, individual ports might add their specific +# to produce binaries for debugging purposes. +# You can override the debug flags that are passed to +# the compiler by setting DEBUG_FLAGS. It is set to +# "-g" at default. +# # USE_BZIP2 - If set, this port tarballs use bzip2, not gzip, for # compression. # USE_ZIP - If set, this port distfile uses zip, not tar w/[bg]zip @@ -1602,6 +1610,12 @@ .endif .endif +.if defined(WITH_DEBUG) && ${WITH_DEBUG} != "no" +.undef STRIP +DEBUG_FLAGS?= -g +CFLAGS+= ${DEBUG_FLAGS} +.endif + .if defined(NOPORTDOCS) PLIST_SUB+= PORTDOCS="@comment " .else ==== //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#9 (text+ko) ====