X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftarget.cpp;h=f2a1a1372e482489a24a1ce5bbf9de38dae011b6;hb=463a3521e27870294455373f9c69279069611975;hp=0760f531d8a91af342d6e4cc13c3e20bc0eab2f8;hpb=20994a6f4802f2dbcf01888d0e1996edf554ade5;p=builder.git diff --git a/source/target.cpp b/source/target.cpp index 0760f53..f2a1a13 100644 --- a/source/target.cpp +++ b/source/target.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include #include #include "action.h" @@ -26,7 +19,9 @@ Target::Target(Builder &b, const Package *p, const string &n): deps_ready(false), preparing(false), prepared(false) -{ } +{ + builder.add_target(this); +} Target *Target::get_buildable_target() { @@ -52,7 +47,7 @@ Target *Target::get_buildable_target() void Target::add_depend(Target *dep) { if(dep==this) - throw InvalidParameterValue("A target can't depend on itself"); + throw invalid_argument("Target::add_depend"); depends.push_back(dep); }