From c90f2b28d2224c1147d51a1d223a7b9082565cc6 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 16 Sep 2009 20:00:15 +0000 Subject: Allow make on a read-only source tree using make O=objdir git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11733 e03df62e-2008-0410-955e-edbf42e46eb7 --- make/run-cc.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'make/run-cc.pl') diff --git a/make/run-cc.pl b/make/run-cc.pl index 21c4fbd60..07f6ace98 100755 --- a/make/run-cc.pl +++ b/make/run-cc.pl @@ -125,14 +125,18 @@ if ($cc eq "ar") { { if ($n =~ /\.cpp$/) { + my $f = $n; + if (defined $ENV{SOURCEPATH}) { + $f =~ s#^$ENV{SOURCEPATH}/src/##; + } if ($action eq "BUILD") { - $name .= " " . $n; + $name .= " " . $f; } else { $action = "BUILD"; - $name = $n; + $name = $f; } } elsif ($action eq "BUILD") # .cpp has priority. -- cgit v1.2.3