PERFORCE change 102605 for review
Gabor Kovesdan
gabor at FreeBSD.org
Thu Jul 27 21:30:39 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=102605
Change 102605 by gabor at 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) ====
More information about the p4-projects
mailing list