1/// ************************************************************* 2/// 3/// Licensed to the Apache Software Foundation (ASF) under one 4/// or more contributor license agreements. See the NOTICE file 5/// distributed with this work for additional information 6/// regarding copyright ownership. The ASF licenses this file 7/// to you under the Apache License, Version 2.0 (the 8/// "License"); you may not use this file except in compliance 9/// with the License. You may obtain a copy of the License at 10/// 11/// http://www.apache.org/licenses/LICENSE-2.0 12/// 13/// Unless required by applicable law or agreed to in writing, 14/// software distributed under the License is distributed on an 15/// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16/// KIND, either express or implied. See the License for the 17/// specific language governing permissions and limitations 18/// under the License. 19/// 20/// ************************************************************* 21#include <types.h> 22 23namespace gb 24{ 25 using namespace types; 26 class PackagePart 27 { 28 private: 29 /// PackagePart s do not need to be explicitly constructed. 30 /// They are named after the path of their source file (without 31 /// file extension) from the root of their source repository. 32 PackagePart(String name, Path Source); 33 friend Package; 34 /// Returns a list of aboslute paths where files are copied to with the PackagePart class. 35 36 /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. 37 static const List<Path> get_destinations(); 38 }; 39 40 class Package : public Target, public IsCleanable 41 { 42 public: 43 /// Creates a new package that copies files from source_dir to the \$(OUTDIR). 44 Package(String name, Path source_dir); 45 /// Adds a file to the package. destination is the relative path in 46 /// the \$(OUTDIR) and source is the relative path in the source_dir. 47 add_file(Path destination, Path source); 48 } 49} 50/* vim: set filetype=cpp : */ 51