[svn:parrot] r43675 - in trunk: . config/gen/makefiles lib/Parrot/Docs/Section tools/build tools/dev
coke at svn.parrot.org
coke at svn.parrot.org
Mon Feb 1 01:31:38 UTC 2010
Author: coke
Date: Mon Feb 1 01:31:37 2010
New Revision: 43675
URL: https://trac.parrot.org/parrot/changeset/43675
Log:
This script is actually used during the build.
Added:
trunk/tools/build/cc_flags.pl (contents, props changed)
- copied, changed from r43673, trunk/tools/dev/cc_flags.pl
Deleted:
trunk/tools/dev/cc_flags.pl
Modified:
trunk/MANIFEST
trunk/MANIFEST.SKIP
trunk/config/gen/makefiles/root.in
trunk/lib/Parrot/Docs/Section/Tools.pm
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST Mon Feb 1 01:22:31 2010 (r43674)
+++ trunk/MANIFEST Mon Feb 1 01:31:37 2010 (r43675)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sat Jan 30 10:15:12 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Mon Feb 1 01:27:58 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -2132,6 +2132,7 @@
t/tools/testdata [test]
tools/build/addopstags.pl []
tools/build/c2str.pl []
+tools/build/cc_flags.pl []
tools/build/dynpmc.pl []
tools/build/fixup_gen_file.pl []
tools/build/h2inc.pl []
@@ -2149,7 +2150,6 @@
tools/dev/as2c.pl []
tools/dev/bench_op.pir []
tools/dev/branch_status.pl []
-tools/dev/cc_flags.pl []
tools/dev/checkdepend.pl []
tools/dev/create_language.pl [devel]
tools/dev/debian_docs.sh []
Modified: trunk/MANIFEST.SKIP
==============================================================================
--- trunk/MANIFEST.SKIP Mon Feb 1 01:22:31 2010 (r43674)
+++ trunk/MANIFEST.SKIP Mon Feb 1 01:31:37 2010 (r43675)
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Jan 27 09:57:54 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Mon Feb 1 01:27:58 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -1041,6 +1041,11 @@
^t/tools/pmc2c\..*\.h/
^t/tools/pmc2c\..*\.pmc$
^t/tools/pmc2c\..*\.pmc/
+# generated from svn:ignore of 'tools/build/'
+^tools/build/dynoplibs\.pl$
+^tools/build/dynoplibs\.pl/
+^tools/build/dynpmc\.pl$
+^tools/build/dynpmc\.pl/
# Local variables:
# mode: text
# buffer-read-only: t
Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in Mon Feb 1 01:22:31 2010 (r43674)
+++ trunk/config/gen/makefiles/root.in Mon Feb 1 01:31:37 2010 (r43675)
@@ -576,14 +576,14 @@
# arguments (etc) injected in the middle.
# There is probably a better way to do this, but I can't work it out right now.
.c$(O) : # suffix rule (limited support)
- @$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
+ @$(PERL) tools/build/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
# XXX probably should detect assembler, but right now this is only used on Sparc
.s$(O) : # suffix rule (limited support)
- @$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
+ @$(PERL) tools/build/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
#UNLESS(win32).S$(O) : # suffix rule (limited support)
-#UNLESS(win32) @$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
+#UNLESS(win32) @$(PERL) tools/build/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
.pir.pbc : # suffix rule (limited support)
$(PARROT) -o $@ $<
@@ -805,7 +805,7 @@
flags_dummy :
@echo "Compiling with:"
- @$(PERL) tools/dev/cc_flags.pl ./CFLAGS echo $(CC) $(CFLAGS) -I$(@D) @cc_o_out@ xx$(O) -c xx.c
+ @$(PERL) tools/build/cc_flags.pl ./CFLAGS echo $(CC) $(CFLAGS) -I$(@D) @cc_o_out@ xx$(O) -c xx.c
runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT) $(GEN_PASM_INCLUDES)
$(PARROT) -o $@ runtime/parrot/library/parrotlib.pir
Modified: trunk/lib/Parrot/Docs/Section/Tools.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Section/Tools.pm Mon Feb 1 01:22:31 2010 (r43674)
+++ trunk/lib/Parrot/Docs/Section/Tools.pm Mon Feb 1 01:31:37 2010 (r43675)
@@ -45,7 +45,7 @@
'Configuration',
'',
$self->new_item( '', 'tools/dev/as2c.pl' ),
- $self->new_item( '', 'tools/dev/cc_flags.pl' ),
+ $self->new_item( '', 'tools/build/cc_flags.pl' ),
$self->new_item( '', 'tools/build/nativecall.pl' ),
$self->new_item( '', 'tools/build/vtable_h.pl' ),
$self->new_item( '', 'tools/build/vtable_extend.pl' ),
Copied and modified: trunk/tools/build/cc_flags.pl (from r43673, trunk/tools/dev/cc_flags.pl)
==============================================================================
--- trunk/tools/dev/cc_flags.pl Mon Feb 1 01:00:32 2010 (r43673, copy source)
+++ trunk/tools/build/cc_flags.pl Mon Feb 1 01:31:37 2010 (r43675)
@@ -6,11 +6,11 @@
=head1 NAME
-tools/dev/cc_flags.pl - Process compiler flags
+tools/build/cc_flags.pl - Process compiler flags
=head1 SYNOPSIS
- % perl tools/dev/cc_flags.pl transform compiler flags
+ % perl tools/build/cc_flags.pl transform compiler flags
=head1 DESCRIPTION
Deleted: trunk/tools/dev/cc_flags.pl
==============================================================================
--- trunk/tools/dev/cc_flags.pl Mon Feb 1 01:31:37 2010 (r43674)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,148 +0,0 @@
-#! perl
-################################################################################
-# Copyright (C) 2001-2003, Parrot Foundation.
-# $Id$
-################################################################################
-
-=head1 NAME
-
-tools/dev/cc_flags.pl - Process compiler flags
-
-=head1 SYNOPSIS
-
- % perl tools/dev/cc_flags.pl transform compiler flags
-
-=head1 DESCRIPTION
-
-This script is used in a F<Makefile> to process the flags to pass to the
-compiler for each C file.
-
-See F<config/gen/makefiles/CFLAGS.in> for the transformation file format.
-
-=head1 SEE ALSO
-
-F<config/gen/cflags/root.in>.
-
-=cut
-
-################################################################################
-
-use strict;
-use warnings;
-
-my $verbose;
-
-if ($ARGV[0] eq '-v') {
- $verbose = 1;
- shift;
-}
-
-my $cflags = shift;
-
-open my $F, '<', $cflags or die "open $cflags: $!\n";
-
-my @options;
-
-while (<$F>) {
- chomp;
- s/#.*//;
- next unless /\S/;
-
- my $regex;
- if (s/^\{(.*?)\}\s*//) {
- next unless $1;
- $regex = qr/$1/;
- }
- elsif (s/^(\S+)\s*//) {
- $regex = qr/^\Q$1\E$/;
- }
- else {
- die "syntax error in $cflags: line $., $_\n";
- }
-
- for ( ; ; ) {
- if (s/^([-+])\{(.*?)\}\s*//) {
- next unless $2;
- my ( $sign, $options ) = ( $1, $2 );
- foreach my $option ( split ' ', $options ) {
- push @options, [ $regex, $sign, $option ];
- }
- }
- elsif (s{s(.)(.*?)\1(.*?)\1([imsx]*)\s*}{}) {
- my $mod = "";
- $mod = "(?$4)" if $4;
-
- push @options, [ $regex, 's', "$mod$2", $3 ];
- }
- elsif (/\S/) {
- die "syntax error in $cflags: line $., $_\n";
- }
- else {
- last;
- }
- }
-}
-
-my ($cfile) = grep /\.c$/, @ARGV;
-
-my ( $inject_point, $where );
-
-foreach (@ARGV) {
- last if $_ eq '';
- ++$where;
-}
-if ($where) {
-
- # Found a "" - remove it
- splice @ARGV, $where, 1;
- $inject_point = $where;
-}
-else {
- $inject_point = 1;
-}
-
-if ($cfile) {
- foreach my $option (@options) {
- if ( $cfile =~ $option->[0] ) {
- if ( $option->[1] eq '+' ) {
- splice @ARGV, $inject_point, 0, $option->[2];
- }
- elsif ( $option->[1] eq '-' ) {
- @ARGV = grep { $_ ne $option->[2] } @ARGV;
- }
- else {
- foreach my $arg (@ARGV) {
- $arg =~ s/$option->[2]/$option->[3]/;
- }
- }
- }
- }
-
- # print "@ARGV\n";
-
- # Visual C++ already prints the source file name...
- if ( $ARGV[0] =~ /cl(?:\.exe)?/i ) {
-
- # ...but only the file name, so we print the path
- # to the directory first
- if ( $cfile =~ /(.*[\/\\])/ ) {
- print $1;
- }
- }
- else {
- print "$cfile\n";
- }
-}
-
-if ($verbose) {
- print join ' ', @ARGV;
-}
-
-exit system(@ARGV) / 256;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
More information about the parrot-commits
mailing list