# New Ticket Created by Steve Fink
# Please include the string: [perl #16286]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=16286 >
Enclosed is a patch for my best guess as to how to implement the
--debugging flag to Configure.pl. If you apply this patch, you'll need
to cvs add config/init/debug.pl.
Brent, could you look this over? Thanks.
-- attachment 1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/34289/28020/efb848/config-debug.patch
Index: MANIFEST
===================================================================
RCS file: /cvs/public/parrot/MANIFEST,v
retrieving revision 1.197
diff -p -u -r1.197 MANIFEST
--- MANIFEST 18 Aug 2002 04:57:30 -0000 1.197
+++ MANIFEST 18 Aug 2002 18:14:36 -0000
@@ -75,6 +75,7 @@ config/gen/platform/generic.h
config/gen/platform/win32.c
config/gen/platform/win32.h
config/init/data.pl
+config/init/debug.pl
config/init/hints.pl
config/init/hints/cygwin.pl
config/init/hints/darwin.pl
Index: config/gen/makefiles/classes.in
===================================================================
RCS file: /cvs/public/parrot/config/gen/makefiles/classes.in,v
retrieving revision 1.3
diff -p -u -r1.3 classes.in
--- config/gen/makefiles/classes.in 17 Jun 2002 04:59:58 -0000 1.3
+++ config/gen/makefiles/classes.in 18 Aug 2002 18:14:37 -0000
@@ -11,7 +11,7 @@ O_FILES = ${pmc_o}
#DO NOT ADD C COMPILER FLAGS HERE
#Add them in Configure.pl--look for the
#comment 'ADD C COMPILER FLAGS HERE'
-CFLAGS = ${ccflags} ${cc_warn} ${cc_debug} -I../include
+CFLAGS = ${ccflags} ${cc_warn} -I../include
C_LIBS = ${libs}
Index: config/gen/makefiles/root.in
===================================================================
RCS file: /cvs/public/parrot/config/gen/makefiles/root.in,v
retrieving revision 1.22
diff -p -u -r1.22 root.in
--- config/gen/makefiles/root.in 15 Aug 2002 05:00:54 -0000 1.22
+++ config/gen/makefiles/root.in 18 Aug 2002 18:14:38 -0000
@@ -113,8 +113,8 @@ OPS_FILES = ${ops} $(GEN_OPSFILES)
#
###############################################################################
-CFLAGS = ${ccflags} ${cc_warn} ${cc_debug} ${cc_inc} ${cc_hasjit} ${cg_flag}
-LDFLAGS = ${ldflags} ${ld_debug}
+CFLAGS = ${ccflags} ${cc_warn} ${cc_inc} ${cc_hasjit} ${cg_flag}
+LDFLAGS = ${ldflags}
C_LIBS = ${libs}
Index: config/init/data.pl
===================================================================
RCS file: /cvs/public/parrot/config/init/data.pl,v
retrieving revision 1.2
diff -p -u -r1.2 data.pl
--- config/init/data.pl 24 May 2002 22:16:57 -0000 1.2
+++ config/init/data.pl 18 Aug 2002 18:14:38 -0000
@@ -6,14 +6,18 @@ use Parrot::Configure::Step;
$description="Setting up Configure's data structures...";
-@args=();
+@args=('debugging');
sub runstep {
+ my ($debugging) = @_;
+
package Configure::Data;
use Config;
use Data::Dumper;
my(%c)=(
+ debugging => $debugging ? 1 : 0,
+
cc => $Config{cc},
ccflags => $Config{ccflags},
ld => $Config{ld},
@@ -74,4 +78,4 @@ sub runstep {
};
}
-1;
\ No newline at end of file
+1;
Index: config/init/debug.pl
===================================================================
RCS file: config/init/debug.pl
diff -N config/init/debug.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/init/debug.pl 18 Aug 2002 18:14:38 -0000
@@ -0,0 +1,26 @@
+package Configure::Step;
+
+use strict;
+use vars qw($description @args);
+use Parrot::Configure::Step;
+
+$description="Enabling debugging...";
+
+@args=();
+
+sub runstep {
+ if (! Configure::Data->get('debugging')) {
+ print "(none requested) ";
+ }
+ my($ccflags, $ldflags)=Configure::Data->get(qw(ccflags ldflags));
+ my($cc_debug, $ld_debug)=Configure::Data->get(qw(cc_debug ld_debug));
+ $ccflags .= " $cc_debug";
+ $ldflags .= " $ld_debug";
+
+ Configure::Data->set(
+ ccflags => $ccflags,
+ ldflags => $ldflags,
+ );
+}
+
+1;
Index: config/init/hints.pl
===================================================================
RCS file: /cvs/public/parrot/config/init/hints.pl,v
retrieving revision 1.1
diff -p -u -r1.1 hints.pl
--- config/init/hints.pl 24 May 2002 06:24:15 -0000 1.1
+++ config/init/hints.pl 18 Aug 2002 18:14:38 -0000
@@ -15,8 +15,8 @@ sub runstep {
die $@ if $@;
}
else {
- print "no hints";
+ print "(no hints) ";
}
}
-1;
\ No newline at end of file
+1;