#include <msp/fs/stat.h>
#include <msp/fs/utils.h>
-#include "file.h"
+#include "builder.h"
+#include "filetarget.h"
using namespace std;
using namespace Msp;
FileTarget::FileTarget(Builder &b, const Package *p, const FS::Path &a):
- // XXX Builder depends on target name being its path for locating file targets
- Target(b, p, /*FS::basename*/(a.str())),
+ Target(b, p, FS::basename(a.str())),
path(a),
size(0)
{
+ builder.add_target(this);
+
struct stat st;
if(!FS::stat(path, st))
{