]> git.tdb.fi Git - builder.git/blobdiff - source/header.h
Simplify InstalledFile::generate_target_path
[builder.git] / source / header.h
index a22c6ce772b7a59d5eac9a2615688b70c03005c7..445fc9c163b32e67caf2318fedf0afdcb34f8c15 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef HEADER_H_
 #define HEADER_H_
 
+#include "component.h"
 #include "sourcefile.h"
 
 /**
@@ -8,9 +9,11 @@ Represents a header file.  Mainly exists to give extra information to the user.
 */
 class Header: public SourceFile
 {
+protected:
+       Header(Builder &b, const std::string &f): SourceFile(b, f) { }
 public:
-       Header(Builder &b, const Component *c, const std::string &f): SourceFile(b,c,f) { }
-       const char *get_type() const { return "Header"; }
+       Header(Builder &b, const Component &c, const std::string &f): SourceFile(b, c, f) { install_location = "include/"+c.get_name(); }
+       virtual const char *get_type() const { return "Header"; }
 };
 
 /**
@@ -19,9 +22,8 @@ A header file that doesn't belong to any known package.
 class SystemHeader: public Header
 {
 public:
-       SystemHeader(Builder &b, const std::string &f): Header(b,0,f) { }
-       const char *get_type() const { return "SystemHeader"; }
-       void       find_depends()    { deps_ready=true; }
+       SystemHeader(Builder &b, const std::string &f): Header(b, f) { }
+       virtual const char *get_type() const { return "SystemHeader"; }
 };
 
 #endif