diff options
author | Mad Camel <madcamel@gmail.com> | 2024-02-18 16:49:33 +0000 |
---|---|---|
committer | Mad Camel <madcamel@gmail.com> | 2024-02-18 16:49:33 +0000 |
commit | 8edebcaf5ecdb7bcc731142921e16390436fc7a3 (patch) | |
tree | eba669dc30a217af0d8a958b324dcaf9772f6c54 /demo-project/configure | |
parent | 208f846464b96721d93436006365705fde3b6b2c (diff) | |
parent | f1a54c378b7b51b36103ad8111d66aef63e7f041 (diff) | |
download | attobuild-master.tar.gz attobuild-master.tar.bz2 attobuild-master.tar.xz attobuild-master.zip |
Import from specing's attoconf branch
See merge request legacy/attobuild!1
Diffstat (limited to 'demo-project/configure')
-rwxr-xr-x | demo-project/configure | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/demo-project/configure b/demo-project/configure new file mode 100755 index 0000000..61a2c2e --- /dev/null +++ b/demo-project/configure @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 + +# Copyright 2013 Ben Longbons <b.r.longbons@gmail.com> +# +# This file is part of attoconf. +# +# attoconf 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. +# +# attoconf is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with attoconf. If not, see <http://www.gnu.org/licenses/>. + +import os +import sys + +from attoconf.version import require_version +require_version(0, 6) + +from attoconf.classy import add_slots +from attoconf.lib.c import C +from attoconf.lib.install import Install +from attoconf.lib.config_hash import ConfigHash +from attoconf.lib.make import Make + +@add_slots +class Configuration(C, Install, ConfigHash, Make): + # usually you'll only have vars, features, and packages + # the rest should only be inherited + def __init__(self, srcdir): + super(Configuration, self).__init__(srcdir) + + def general(self): + super(Configuration, self).general() + + def paths(self): + super(Configuration, self).paths() + + def arches(self): + super(Configuration, self).arches() + + def vars(self): + super(Configuration, self).vars() + + def features(self): + super(Configuration, self).features() + + def packages(self): + super(Configuration, self).packages() + + if 0: + def tests(self): + super(Configuration, self).tests() + + def post(self): + super(Configuration, self).post() + + +def main(): + proj = Configuration(os.path.dirname(sys.argv[0])) + proj.set_package('attoconf-demo', 'Demo project for attoconf') + proj.jiggle() + build = proj.build('.') + build.configure(sys.argv[1:], os.environ) + + +if __name__ == '__main__': + main() |