chiark / gitweb /
meson.build: make docdir configurable (#8068)
authortblume <Thomas.Blume@suse.com>
Thu, 1 Feb 2018 21:46:15 +0000 (22:46 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:58:47 +0000 (07:58 +0200)
SUSE is using a different docdir, so the path should be configurable

meson.build

index 96fb8b134e6755c8fce895e7ff5db535cc604552..052a955e619651523f8202e8f4708c60cf333010 100644 (file)
@@ -412,7 +412,7 @@ foreach arg : ['unused-parameter',
         endif
 endforeach
 
-if cc.compiles('''
+if cc.compiles('
    #include <time.h>
    #include <inttypes.h>
    typedef uint64_t usec_t;
@@ -421,7 +421,7 @@ if cc.compiles('''
            struct timespec now;
            return 0;
    }
-''', name : '-Werror=shadow with local shadowing')
+', name : '-Werror=shadow with local shadowing')
         add_project_arguments('-Werror=shadow', language : 'c')
 endif
 
@@ -754,11 +754,8 @@ system_uid_max = get_option('system-uid-max')
 if system_uid_max == ''
         system_uid_max = run_command(
                 awk,
-                '/^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }',
-                '/etc/login.defs').stdout().strip()
-        if system_uid_max == ''
-                system_uid_max = '999'
-        endif
+                'BEGIN { uid=999 } /^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }',
+                '/etc/login.defs').stdout()
 endif
 system_uid_max = system_uid_max.to_int()
 conf.set('SYSTEM_UID_MAX', system_uid_max)
@@ -769,11 +766,8 @@ system_gid_max = get_option('system-gid-max')
 if system_gid_max == ''
         system_gid_max = run_command(
                 awk,
-                '/^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }',
-                '/etc/login.defs').stdout().strip()
-        if system_gid_max == ''
-                system_gid_max = '999'
-        endif
+                'BEGIN { gid=999 } /^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }',
+                '/etc/login.defs').stdout()
 endif
 system_gid_max = system_gid_max.to_int()
 conf.set('SYSTEM_GID_MAX', system_gid_max)