X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finstall.cpp;h=2cdd1aa1a4a959c6f34f754a273a8b9ffbf5497b;hb=1968c546cfb30214e8dc5afc722bec14aa8373f5;hp=ca32348f324e02d289159d0030037ab0edb84b31;hpb=b5ad62c2c4c7eeadd881e3f157bde96e4dd2cc0e;p=builder.git diff --git a/source/install.cpp b/source/install.cpp index ca32348..2cdd1aa 100644 --- a/source/install.cpp +++ b/source/install.cpp @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of builder +Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #include #include "builder.h" #include "copy.h" @@ -11,7 +18,7 @@ using namespace std; using namespace Msp; -Install::Install(Builder &b, const Package &p, Target &tgt): +Install::Install(Builder &b, const SourcePackage &p, Target &tgt): Target(b, &p, generate_target_name(tgt)) { buildable=true; @@ -39,7 +46,9 @@ Action *Install::build() string Install::generate_target_name(const Target &tgt) { - Path::Path base=tgt.get_package()->get_prefix(); + const SourcePackage *spkg=dynamic_cast(tgt.get_package()); + + Path::Path base=spkg->get_prefix(); string tgtname=tgt.get_name().substr(tgt.get_name().rfind('/')+1); string mid;