Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 2006 21:30:38 GMT
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 102605 for review
Message-ID:  <200607272130.k6RLUcLD030054@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) ====




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607272130.k6RLUcLD030054>