cvsuser 02/07/06 21:00:40
Modified: lib/Make Link_Obj.pm
Log:
Added variable for command name and LDFLAGS option. Probably not in a very good way,
feel free to change this. I'm starting to work on converting the current Make stuff to
this system, but won't actually implement it for quite some time.
Revision Changes Path
1.2 +13 -3 parrot/lib/Make/Link_Obj.pm
Index: Link_Obj.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Make/Link_Obj.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- Link_Obj.pm 6 Jul 2002 06:12:36 -0000 1.1
+++ Link_Obj.pm 7 Jul 2002 04:00:40 -0000 1.2
@@ -5,6 +5,17 @@
@ISA=qw(Make::Dependency);
@EXPORT_OK = qw(Link);
+my $flags = undef;
+my $command = "cc"; # XXX Platform-specific, don't know the other options.
+
+sub flags {
+ $flags = shift;
+}
+
+sub command {
+ $command shift;
+}
+
sub Link {
my $class = 'Make::Link_Obj';
my %args = @_;
@@ -34,10 +45,9 @@
sub build {
my ($self) = @_;
+ my $ldflags = defined $flags ? $flags : '';
-# { action => "cc -o $self->{output} $self->{input}",
-# };
- { action => "cc -o $self->{output} ".join ' ',@{$self->{input}},
+ { action => "$link_command $ldflags -o $self->{output} ".join '
',@{$self->{input}},
};
}