~robert-ancell/bake/osx-stat

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * Copyright (C) 2011-2012 Robert Ancell <robert.ancell@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
 * license.
 */

public class ScriptModule : BuildModule
{
    public override bool can_generate_program_rules (Program program) throws Error
    {
        if (program.get_sources () != null)
            return false;

        return true;
    }

    public override void generate_program_rules (Program program) throws Error
    {
        if (program.install)
            program.recipe.add_install_rule (program.name, program.install_directory);
    }
}