sbindir = join_paths(prefixdir, get_option('sbindir'))
sysconfstaticdir = join_paths(prefixdir, 'lib')
docdir = '/usr/share/doc/util-linux'
+mandir = join_paths(prefixdir, get_option('mandir'))
runstatedir = '/run'
execprefixdir = '/usr'
usrbin_exec_dir = join_paths(execprefixdir, 'bin')
output : ['@BASENAME@.tab.c', '@BASENAME@.tab.h'],
arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@'])
+
+
meson_make_symlink = meson.current_source_dir() + '/tools/meson-make-symlink.sh'
config_h = configure_file(
add_project_arguments('-include', 'config.h', language : 'c')
+manadocs = []
+manlinks = []
+
subdir('include')
subdir('lib')
subdir('libblkid')
install : true)
if not is_disabler(exe)
exes += exe
- install_man('text-utils/hexdump.1')
+ manadocs += ['text-utils/hexdump.1.adoc']
endif
opt = not get_option('build-lsmem').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/lsmem.1')
+ manadocs += ['sys-utils/lsmem.1.adoc']
endif
opt = not get_option('build-chmem').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/chmem.8')
+ manadocs += ['sys-utils/chmem.8.adoc']
endif
exe = executable(
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('sys-utils/choom.1')
+manadocs += ['sys-utils/choom.1.adoc']
exe = executable(
'ipcmk',
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('sys-utils/ipcmk.1')
+manadocs += ['sys-utils/ipcmk.1.adoc']
exe = executable(
'ipcrm',
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('sys-utils/ipcrm.1')
+manadocs += ['sys-utils/ipcrm.1.adoc']
opt = not get_option('build-ipcs').disabled()
exe = executable(
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/ipcs.1')
+ manadocs += ['sys-utils/ipcs.1.adoc']
endif
opt = not get_option('build-rfkill').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/rfkill.8')
+ manadocs += ['sys-utils/rfkill.8.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('sys-utils/renice.1')
+ manadocs += ['sys-utils/renice.1.adoc']
endif
exe = executable(
install : true)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/setsid.1')
+ manadocs += ['sys-utils/setsid.1.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('sys-utils/readprofile.8')
+ manadocs += ['sys-utils/readprofile.8.adoc']
endif
opt = not get_option('build-tunelp').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/tunelp.8')
+ manadocs += ['sys-utils/tunelp.8.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('sys-utils/fstrim.8')
+ manadocs += ['sys-utils/fstrim.8.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('sys-utils/dmesg.1')
+ manadocs += ['sys-utils/dmesg.1.adoc']
endif
exe = executable(
install_dir : sbindir,
install : true)
exes += exe
-install_man('sys-utils/ctrlaltdel.8')
+manadocs += ['sys-utils/ctrlaltdel.8.adoc']
exe = executable(
'fsfreeze',
install_dir : sbindir,
install : true)
exes += exe
-install_man('sys-utils/fsfreeze.8')
+manadocs += ['sys-utils/fsfreeze.8.adoc']
exe = executable(
'blkdiscard',
install_dir : sbindir,
install : true)
exes += exe
-install_man('sys-utils/blkdiscard.8')
+manadocs += ['sys-utils/blkdiscard.8.adoc']
exe = executable(
'blkzone',
install_dir : sbindir,
install : true)
exes += exe
-install_man('sys-utils/blkzone.8')
+manadocs += ['sys-utils/blkzone.8.adoc']
exe = executable(
'ldattach',
install_dir : usrsbin_exec_dir,
install : true)
exes += exe
-install_man('sys-utils/ldattach.8')
+manadocs += ['sys-utils/ldattach.8.adoc']
exe = executable(
'rtcwake',
install_dir : usrsbin_exec_dir,
install : true)
exes += exe
+manadocs += ['sys-utils/rtcwake.8.adoc']
exe = executable(
'setarch',
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('sys-utils/setarch.8')
+manadocs += ['sys-utils/setarch.8.adoc']
setarch_links = ['uname26', 'linux32', 'linux64']
setarch_links_arch = {
build_by_default : opt)
if opt and not is_disabler(exe)
exe = exe
- install_man('sys-utils/eject.1')
+ manadocs += ['sys-utils/eject.1.adoc']
endif
opt = not get_option('build-losetup').disabled()
install : opt,
build_by_default : opt)
if opt and not is_disabler(exe)
- install_man('sys-utils/losetup.8')
+ manadocs += ['sys-utils/losetup.8.adoc']
exes += exe
endif
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/zramctl.8')
+ manadocs += ['sys-utils/zramctl.8.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('sys-utils/prlimit.1')
+ manadocs += ['sys-utils/prlimit.1.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('sys-utils/lsns.8')
+ manadocs += ['sys-utils/lsns.8.adoc']
endif
opt = not get_option('build-mount').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += [exe, exe2]
- install_man(mount_man)
+ manadocs += ['sys-utils/fstab.5.adoc',
+ 'sys-utils/mount.8.adoc',
+ 'sys-utils/umount.8.adoc']
endif
opt2 = opt and 'mount' in static_programs
install : true)
if not is_disabler(exe)
exes += exe
- install_man('sys-utils/swapon.8')
+ manadocs += ['sys-utils/swapon.8.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('sys-utils/swapoff.8')
+ manlinks += 'sys-utils/swapoff.8.adoc'
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('sys-utils/lscpu.1')
+ manadocs += ['sys-utils/lscpu.1.adoc']
endif
exe = executable(
install_dir : sbindir,
install : true)
exes += exe
-install_man('sys-utils/chcpu.8')
+manadocs += ['sys-utils/chcpu.8.adoc']
exe = executable(
'wdctl',
install : true)
if not is_disabler(exe)
exes += exe
- install_man('sys-utils/wdctl.8')
+ manadocs += ['sys-utils/wdctl.8.adoc']
endif
opt = not get_option('build-mountpoint').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/mountpoint.1')
+ manadocs += ['sys-utils/mountpoint.1.adoc']
endif
opt = not get_option('build-fallocate').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/fallocate.1')
+ manadocs += ['sys-utils/fallocate.1.adoc']
endif
opt = not get_option('build-pivot_root').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/pivot_root.8')
+ manadocs += ['sys-utils/pivot_root.8.adoc']
endif
opt = not get_option('build-switch_root').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/switch_root.8')
+ manadocs += ['sys-utils/switch_root.8.adoc']
endif
opt = not get_option('build-unshare').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/unshare.1')
+ manadocs += ['sys-utils/unshare.1.adoc']
endif
opt = opt and 'unshare' in static_programs
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/nsenter.1')
+ manadocs += ['sys-utils/nsenter.1.adoc']
endif
opt = opt and 'nsenter' in static_programs
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/setpriv.1')
+ manadocs += ['sys-utils/setpriv.1.adoc']
endif
exe = executable(
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('sys-utils/flock.1')
+manadocs += ['sys-utils/flock.1.adoc']
opt = not get_option('build-lsirq').disabled()
exe = executable(
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/lsirq.1')
+ manadocs += ['sys-utils/lsirq.1.adoc']
endif
opt = not get_option('build-irqtop').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/irqtop.1')
+ manadocs += ['sys-utils/irqtop.1.adoc']
endif
opt = not get_option('build-ipcs').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('sys-utils/lsipc.1')
+ manadocs += ['sys-utils/lsipc.1.adoc']
endif
opt = build_hwclock
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
+ manadocs += ['sys-utils/hwclock.8.adoc']
endif
exe = executable(
install_dir : sbindir,
install : true)
exes += exe
-install_man('disk-utils/mkfs.8')
+manadocs += ['disk-utils/mkfs.8.adoc']
opt = not get_option('build-bfs').disabled()
exe = executable(
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('disk-utils/mkfs.bfs.8')
+ manadocs += ['disk-utils/mkfs.bfs.8.adoc']
endif
exe = executable(
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('disk-utils/isosize.8')
+manadocs += ['disk-utils/isosize.8.adoc']
exe = executable(
'mkswap',
install : true)
if opt and not is_disabler(exe)
exes += exe
- install_man('disk-utils/mkswap.8')
+ manadocs += ['disk-utils/mkswap.8.adoc']
endif
exe = executable(
install : true)
if opt and not is_disabler(exe)
exes += exe
- install_man('disk-utils/swaplabel.8')
+ manadocs += ['disk-utils/swaplabel.8.adoc']
endif
opt = not get_option('build-fsck').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('disk-utils/fsck.8')
+ manadocs += ['disk-utils/fsck.8.adoc']
endif
opt = not get_option('build-minix').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += [exe, exe2, exe3]
- install_man('disk-utils/mkfs.minix.8',
- 'disk-utils/fsck.minix.8')
+ manadocs += ['disk-utils/mkfs.minix.8.adoc','disk-utils/fsck.minix.8.adoc']
endif
opt = not get_option('build-cramfs').disabled()
build_by_default : opt)
if not is_disabler(exe)
exes += [exe, exe2]
- install_man('disk-utils/mkfs.cramfs.8',
- 'disk-utils/fsck.cramfs.8')
+ manadocs += ['disk-utils/mkfs.cramfs.8.adoc','disk-utils/fsck.cramfs.8.adoc']
endif
opt = not get_option('build-raw').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('disk-utils/raw.8')
+ manadocs += ['disk-utils/raw.8.adoc']
endif
opt = not get_option('build-fdformat').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('disk-utils/fdformat.8')
+ manadocs += ['disk-utils/fdformat.8.adoc']
endif
exe = executable(
link_with : [lib_common],
install_dir : sbindir,
install : true)
-install_man('disk-utils/blockdev.8')
+manadocs += ['disk-utils/blockdev.8.adoc']
opt = not get_option('build-fdisks').disabled()
if opt and not have_dirfd and not have_ddfd
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('disk-utils/fdisk.8',
- 'disk-utils/sfdisk.8',
- 'disk-utils/cfdisk.8')
+ manadocs += ['disk-utils/fdisk.8.adoc',
+ 'disk-utils/sfdisk.8.adoc',
+ 'disk-utils/cfdisk.8.adoc']
endif
opt = not get_option('build-partx').disabled()
build_by_default : opt)
if opt
exes += [exe, exe2, exe3, exe4]
- install_man(addpart_delpart_man)
+ manadocs += ['disk-utils/addpart.8.adoc',
+ 'disk-utils/delpart.8.adoc',
+ 'disk-utils/resizepart.8.adoc',
+ 'disk-utils/partx.8.adoc']
endif
############################################################
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('term-utils/script.1')
+manadocs += ['term-utils/script.1.adoc']
exe = executable(
'test_script',
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('term-utils/scriptlive.1')
+manadocs += ['term-utils/scriptlive.1.adoc']
exe = executable(
'scriptreplay',
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('term-utils/scriptreplay.1')
+manadocs += ['term-utils/scriptreplay.1.adoc']
opt = not get_option('build-agetty').disabled()
exe = executable(
build_by_default : opt)
if opt
exes += exe
- install_man('term-utils/agetty.8')
+ manadocs += ['term-utils/agetty.8.adoc']
endif
opt = not get_option('build-setterm').disabled()
build_by_default : opt)
if opt
exes += exe
- install_man('term-utils/setterm.1')
+ manadocs += ['term-utils/setterm.1.adoc']
endif
opt = not get_option('build-mesg').disabled()
build_by_default : opt)
if opt
exes += exe
- install_man('term-utils/mesg.1')
+ manadocs += ['term-utils/mesg.1.adoc']
endif
opt = not get_option('build-wall').disabled()
build_by_default : opt)
if opt
exes += exe
- install_man('term-utils/wall.1')
+ manadocs += ['term-utils/wall.1.adoc']
endif
# chgrp tty $(DESTDIR)$(usrbin_execdir)/wall
build_by_default : opt)
if opt
exes += exe
- install_man('term-utils/write.1')
+ manadocs += ['term-utils/write.1.adoc']
endif
# chgrp tty $(DESTDIR)$(usrbin_execdir)/write
build_by_default : opt)
if not is_disabler(exe)
exes += exe
- install_man('login-utils/login.1')
+ manadocs += ['login-utils/login.1.adoc']
endif
opt = not get_option('build-sulogin').disabled()
build_by_default : opt)
if not is_disabler(exe)
exes += exe
- install_man('login-utils/sulogin.8')
+ manadocs += ['login-utils/sulogin.8.adoc']
endif
exe = executable(
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('misc-utils/cal.1')
+manadocs += ['misc-utils/cal.1.adoc']
opt = not get_option('build-logger').disabled()
exe = executable(
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('misc-utils/logger.1')
+ manadocs += ['misc-utils/logger.1.adoc']
endif
exe = executable(
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('misc-utils/look.1')
+manadocs += ['misc-utils/look.1.adoc']
exe = executable(
'mcookie',
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('misc-utils/mcookie.1')
+manadocs += ['misc-utils/mcookie.1.adoc']
exe = executable(
'namei',
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('misc-utils/namei.1')
+manadocs += ['misc-utils/namei.1.adoc']
exe = executable(
'whereis',
install_dir : usrbin_exec_dir,
install : true)
exes += exe
-install_man('misc-utils/whereis.1')
+manadocs += ['misc-utils/whereis.1.adoc']
exe = executable(
'lslocks',
install : true)
if not is_disabler(exe)
exes += exe
- install_man('misc-utils/lslocks.8')
+ manadocs += ['misc-utils/lslocks.8.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('misc-utils/lsblk.8')
+ manadocs += ['misc-utils/lsblk.8.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('misc-utils/uuidgen.1')
+ manadocs += ['misc-utils/uuidgen.1.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('misc-utils/uuidparse.1')
+ manadocs += ['misc-utils/uuidparse.1.adoc']
endif
opt = build_uuidd
build_by_default : opt)
if not is_disabler(exe)
exes += [exe, exe2]
+ manadocs += ['misc-utils/uuidd.8.adoc']
endif
opt = build_libblkid
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('misc-utils/blkid.8')
+ manadocs += ['misc-utils/blkid.8.adoc']
endif
opt = opt and 'blkid' in static_programs
install : true)
if not is_disabler(exe)
exes += exe
- install_man('misc-utils/findfs.8')
+ manadocs += ['misc-utils/findfs.8.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('misc-utils/wipefs.8')
+ manadocs += ['misc-utils/wipefs.8.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('misc-utils/findmnt.8')
+ manadocs += ['misc-utils/findmnt.8.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('misc-utils/kill.1')
+ manadocs += ['misc-utils/kill.1.adoc']
endif
opt = not get_option('build-rename').disabled()
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
- install_man('misc-utils/rename.1')
+ manadocs += ['misc-utils/rename.1.adoc']
endif
exe = executable(
install_dir : usrbin_exec_dir,
install : true)
exes += exe
+manadocs += ['misc-utils/getopt.1.adoc']
exe = executable(
'fincore',
install : true)
if not is_disabler(exe)
exes += exe
- install_man('misc-utils/fincore.1')
+ manadocs += ['misc-utils/fincore.1.adoc']
endif
exe = executable(
install : true)
if not is_disabler(exe)
exes += exe
- install_man('misc-utils/hardlink.1')
+ manadocs += ['misc-utils/hardlink.1.adoc']
endif
exe = executable(
if opt and not is_disabler(exe)
exes += [exe, exe2, exe3, exe4]
- install_man('schedutils/chrt.1',
- 'schedutils/ionice.1',
- 'schedutils/taskset.1',
- 'schedutils/uclampset.1')
+ manadocs += ['schedutils/chrt.1.adoc',
+ 'schedutils/ionice.1.adoc',
+ 'schedutils/taskset.1.adoc',
+ 'schedutils/uclampset.1.adoc']
endif
############################################################
'--parallel',
'--nonroot'],
depends : exes)
+
+
+manadocs += ['lib/terminal-colors.d.5.adoc']
+manadocs += ['libblkid/libblkid.3.adoc']
+
+if build_libuuid
+ manadocs += [
+ 'libuuid/man/uuid.3.adoc',
+ 'libuuid/man/uuid_clear.3.adoc',
+ 'libuuid/man/uuid_compare.3.adoc',
+ 'libuuid/man/uuid_copy.3.adoc',
+ 'libuuid/man/uuid_generate.3.adoc',
+ 'libuuid/man/uuid_is_null.3.adoc',
+ 'libuuid/man/uuid_parse.3.adoc',
+ 'libuuid/man/uuid_time.3.adoc',
+ 'libuuid/man/uuid_unparse.3.adoc']
+ manlinks += [
+ 'libuuid/man/uuid_generate_random.3',
+ 'libuuid/man/uuid_generate_time.3',
+ 'libuuid/man/uuid_generate_time_safe.3']
+endif
+
+asciidoctor = find_program('asciidoctor')
+if asciidoctor.found()
+ foreach adoc : manadocs
+ name = adoc.split('/')[-1]
+ page = name.split('.adoc')[0]
+ section = page.split('.')[-1]
+ mandirn = join_paths(mandir, 'man' + section)
+ input = adoc
+
+ custom_target(
+ page,
+ command : [ asciidoctor,
+ '-b', 'manpage',
+ '-a', 'VERSION=' + meson.project_version(),
+ '-a', 'ADJTIME_PATH=/etc/adjtime',
+ '--base-dir=' + meson.current_source_dir(),
+ '--destination-dir=' + meson.current_build_dir(),
+ '@INPUT@'],
+ input : input,
+ output : [page],
+ install: true,
+ install_dir : mandirn)
+ endforeach
+endif