summaryrefslogtreecommitdiff
path: root/make/run-cc.pl
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-16 20:00:15 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-16 20:00:15 +0000
commitc90f2b28d2224c1147d51a1d223a7b9082565cc6 (patch)
tree62098e63cc622d9889a9ed205a1c4487c8c20c84 /make/run-cc.pl
parent3626aeb9ce4798c73cf3a5621388406062c450f7 (diff)
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
Diffstat (limited to 'make/run-cc.pl')
-rwxr-xr-xmake/run-cc.pl8
1 files changed, 6 insertions, 2 deletions
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.