source: waflib/Tools/gnu_dirs.py @ 926f0f6

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 926f0f6 was 0fa325b, checked in by Paul Brossier <piem@piem.org>, 11 years ago

waf: unpack

  • Property mode set to 100644
File size: 2.7 KB
Line 
1#! /usr/bin/env python
2# encoding: utf-8
3# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
5import os
6from waflib import Utils,Options,Context
7_options=[x.split(', ')for x in'''
8bindir, user executables, ${EXEC_PREFIX}/bin
9sbindir, system admin executables, ${EXEC_PREFIX}/sbin
10libexecdir, program executables, ${EXEC_PREFIX}/libexec
11sysconfdir, read-only single-machine data, ${PREFIX}/etc
12sharedstatedir, modifiable architecture-independent data, ${PREFIX}/com
13localstatedir, modifiable single-machine data, ${PREFIX}/var
14libdir, object code libraries, ${EXEC_PREFIX}/lib
15includedir, C header files, ${PREFIX}/include
16oldincludedir, C header files for non-gcc, /usr/include
17datarootdir, read-only arch.-independent data root, ${PREFIX}/share
18datadir, read-only architecture-independent data, ${DATAROOTDIR}
19infodir, info documentation, ${DATAROOTDIR}/info
20localedir, locale-dependent data, ${DATAROOTDIR}/locale
21mandir, man documentation, ${DATAROOTDIR}/man
22docdir, documentation root, ${DATAROOTDIR}/doc/${PACKAGE}
23htmldir, html documentation, ${DOCDIR}
24dvidir, dvi documentation, ${DOCDIR}
25pdfdir, pdf documentation, ${DOCDIR}
26psdir, ps documentation, ${DOCDIR}
27'''.split('\n')if x]
28def configure(conf):
29        def get_param(varname,default):
30                return getattr(Options.options,varname,'')or default
31        env=conf.env
32        env.LIBDIR=env.BINDIR=[]
33        env.EXEC_PREFIX=get_param('EXEC_PREFIX',env.PREFIX)
34        env.PACKAGE=getattr(Context.g_module,'APPNAME',None)or env.PACKAGE
35        complete=False
36        iter=0
37        while not complete and iter<len(_options)+1:
38                iter+=1
39                complete=True
40                for name,help,default in _options:
41                        name=name.upper()
42                        if not env[name]:
43                                try:
44                                        env[name]=Utils.subst_vars(get_param(name,default).replace('/',os.sep),env)
45                                except TypeError:
46                                        complete=False
47        if not complete:
48                lst=[name for name,_,_ in _options if not env[name.upper()]]
49                raise conf.errors.WafError('Variable substitution failure %r'%lst)
50def options(opt):
51        inst_dir=opt.add_option_group('Installation directories','By default, "waf install" will put the files in\
52 "/usr/local/bin", "/usr/local/lib" etc. An installation prefix other\
53 than "/usr/local" can be given using "--prefix", for example "--prefix=$HOME"')
54        for k in('--prefix','--destdir'):
55                option=opt.parser.get_option(k)
56                if option:
57                        opt.parser.remove_option(k)
58                        inst_dir.add_option(option)
59        inst_dir.add_option('--exec-prefix',help='installation prefix [Default: ${PREFIX}]',default='',dest='EXEC_PREFIX')
60        dirs_options=opt.add_option_group('Pre-defined installation directories','')
61        for name,help,default in _options:
62                option_name='--'+name
63                str_default=default
64                str_help='%s [Default: %s]'%(help,str_default)
65                dirs_options.add_option(option_name,help=str_help,default='',dest=name.upper())
Note: See TracBrowser for help on using the repository browser.