1#include <types.h> 2 3namespace gb 4{ 5 using namespace types; 6 class PackagePart 7 { 8 private: 9 /// PackagePart s do not need to be explicitly constructed. 10 /// They are named after the path of their source file (without 11 /// file extension) from the root of their source repository. 12 PackagePart(String name, Path Source); 13 friend Package; 14 /// Returns a list of aboslute paths where files are copied to with the PackagePart class. 15 16 /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. 17 static const List<Path> get_destinations(); 18 }; 19 20 class Package : public Target, public IsCleanable 21 { 22 public: 23 /// Creates a new package that copies files from source_dir to the \$(OUTDIR). 24 Package(String name, Path source_dir); 25 /// Adds a file to the package. destination is the relative path in 26 /// the \$(OUTDIR) and source is the relative path in the source_dir. 27 add_file(Path destination, Path source); 28 } 29} 30/* vim: set filetype=cpp : */ 31