chiark / gitweb /
Add build-time option to change the color of the "OK" status text
authorAlexander F Rødseth <alexander.rodseth@appeartv.com>
Thu, 1 Mar 2018 12:12:02 +0000 (13:12 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:59:11 +0000 (07:59 +0200)
meson.build
meson_options.txt

index 163e27b129e20f0554685164deef60b1e0d15d7e..ae380c5eb0cc19f217a45de85cb6fa9006f86fd9 100644 (file)
@@ -70,21 +70,8 @@ m4_defines = []
 
 #####################################################################
 
-if get_option('split-usr') == 'auto'
-        split_usr = run_command('test', '-L', '/bin').returncode() != 0
-else
-        split_usr = get_option('split-usr') == 'true'
-endif
-conf.set10('HAVE_SPLIT_USR', split_usr,
-           description : '/usr/bin and /bin directories are separate')
-
-if get_option('split-bin') == 'auto'
-        split_bin = run_command('test', '-L', '/usr/sbin').returncode() != 0
-else
-        split_bin = get_option('split-bin') == 'true'
-endif
-conf.set10('HAVE_SPLIT_BIN', split_bin,
-           description : 'bin and sbin directories are separate')
+split_usr = get_option('split-usr')
+conf.set10('HAVE_SPLIT_USR', split_usr)
 
 rootprefixdir = get_option('rootprefix')
 # Unusual rootprefixdir values are used by some distros
@@ -118,7 +105,7 @@ datadir = join_paths(prefixdir, get_option('datadir'))
 localstatedir = join_paths('/', get_option('localstatedir'))
 
 rootbindir = join_paths(rootprefixdir, 'bin')
-rootsbindir = join_paths(rootprefixdir, split_bin ? 'sbin' : 'bin')
+rootsbindir = join_paths(rootprefixdir, 'sbin')
 #if 0 /// elogind has a different default
 # rootlibexecdir = join_paths(rootprefixdir, 'lib/systemd')
 #else
@@ -242,6 +229,9 @@ conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH',                    join_paths(pkgsysc
 # conf.set_quoted('SYSTEM_SYSVRCND_PATH',                       sysvrcnd_path)
 # conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START',                 get_option('rc-local'))
 # conf.set_quoted('RC_LOCAL_SCRIPT_PATH_STOP',                  get_option('halt-local'))
+# 
+# conf.set('ANSI_OK_COLOR', 'ANSI_' + get_option('ok-color').to_upper())
+# 
 # conf.set_quoted('USER_CONFIG_UNIT_PATH',                      join_paths(pkgsysconfdir, 'user'))
 # conf.set_quoted('USER_DATA_UNIT_PATH',                        userunitdir)
 # conf.set_quoted('CERTIFICATE_ROOT',                           get_option('certificate-root'))
@@ -3064,8 +3054,6 @@ run_target(
 status = [
         '@0@ @1@'.format(meson.project_name(), meson.project_version()),
 
-        'split /usr:                        @0@'.format(split_usr),
-        'split bin-sbin:                    @0@'.format(split_bin),
 #if 0 /// UNSUPPORTED by elogind
 #         'prefix directory:                  @0@'.format(prefixdir),
 #         'rootprefix directory:              @0@'.format(rootprefixdir),
@@ -3230,6 +3218,7 @@ foreach tuple : [
         ['man pages',        want_man],
         ['html pages',       want_html],
         ['man page indices', want_man and have_lxml],
+        ['split /usr',       conf.get('HAVE_SPLIT_USR') == 1],
 #if 0 /// UNNEEDED by elogind
 #         ['SysV compat'],
 #endif // 0
index 6e3407414d4a34109fbd8a3b5ee681a56e899f0f..2b973251b45c9b4a71226bae0e079d23a46f8e6c 100644 (file)
 # You should have received a copy of the GNU Lesser General Public License
 # along with elogind; If not, see <http://www.gnu.org/licenses/>.
 
-option('split-usr', type : 'combo', choices : ['auto', 'true', 'false'],
-       description : '''/bin, /sbin aren't symlinks into /usr''')
-option('split-bin', type : 'combo', choices : ['auto', 'true', 'false'],
-       description : '''sbin is not a symlink to bin''')
+option('split-usr', type : 'boolean', value : false,
+       description : '''assume that /bin, /sbin aren't symlinks into /usr''')
 option('rootlibdir', type : 'string',
        description : '''[/usr]/lib/x86_64-linux-gnu or such''')
 option('rootprefix', type : 'string',
@@ -361,6 +359,14 @@ option('slow-tests', type : 'boolean', value : 'false',
 option('install-tests', type : 'boolean', value : 'false',
        description : 'install test executables')
 
+option('ok-color', type: 'combo',
+       choices : ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan',
+                  'white', 'highlight_black', 'highlight_red', 'highlight_green',
+                  'highlight_yellow', 'highlight_blue', 'highlight_magenta',
+                  'highlight_cyan', 'highlight_white'],
+       value : 'green',
+       description: 'color of the "OK" status message')
+
 option('oss-fuzz', type : 'boolean', value : 'false',
        description : 'build against oss-fuzz')
 option('llvm-fuzz', type : 'boolean', value : 'false',