2001-09-21 16:37:43 +04:00
#
2004-03-30 23:35:44 +04:00
# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
2017-03-14 03:47:46 +03:00
# Copyright (C) 2004-2017 Red Hat, Inc. All rights reserved.
2001-09-21 16:37:43 +04:00
#
2007-09-21 14:16:45 +04:00
# This file is part of LVM2.
2001-09-21 16:37:43 +04:00
#
2004-03-30 23:35:44 +04:00
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
2001-09-21 16:37:43 +04:00
#
2004-03-30 23:35:44 +04:00
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
2016-01-21 13:49:46 +03:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2001-09-21 16:37:43 +04:00
srcdir = @srcdir@
top_srcdir = @top_srcdir@
2009-10-02 23:10:31 +04:00
top_builddir = @top_builddir@
2001-09-21 16:37:43 +04:00
2018-01-31 13:04:17 +03:00
i f e q ( $( V ) , 1 )
Q =
e l s e
Q = @
e n d i f
2008-01-09 17:17:58 +03:00
FSADMMAN = fsadm.8
2021-07-09 15:44:07 +03:00
VDOIMPORTMAN = vdoimport.8
2012-10-12 16:37:57 +04:00
BLKDEACTIVATEMAN = blkdeactivate.8
2010-06-17 16:14:43 +04:00
DMEVENTDMAN = dmeventd.8
2017-03-16 14:26:51 +03:00
DMFILEMAPDMAN = dmfilemapd.8
2015-08-28 15:03:18 +03:00
LVMPOLLDMAN = lvmpolld.8
2015-09-06 01:46:22 +03:00
LVMLOCKDMAN = lvmlockd.8 lvmlockctl.8
2015-08-28 15:03:18 +03:00
CMIRRORDMAN = cmirrord.8
2016-02-18 02:53:35 +03:00
LVMDBUSDMAN = lvmdbusd.8
2015-03-05 23:00:44 +03:00
2001-12-31 20:20:22 +03:00
MAN5 = lvm.conf.5
2021-04-19 12:24:16 +03:00
MAN7 = lvmsystemid.7 lvmreport.7 lvmraid.7
2018-09-13 19:02:53 +03:00
MAN8 = lvm.8 lvmdump.8 lvm-fullreport.8 lvm-lvpoll.8 \
2017-03-29 01:22:15 +03:00
lvcreate.8 lvchange.8 lvmconfig.8 lvconvert.8 lvdisplay.8 \
2017-03-14 03:47:46 +03:00
lvextend.8 lvreduce.8 lvremove.8 lvrename.8 lvresize.8 lvs.8 \
lvscan.8 pvchange.8 pvck.8 pvcreate.8 pvdisplay.8 pvmove.8 pvremove.8 \
pvresize.8 pvs.8 pvscan.8 vgcfgbackup.8 vgcfgrestore.8 vgchange.8 \
vgck.8 vgcreate.8 vgconvert.8 vgdisplay.8 vgexport.8 vgextend.8 \
vgimport.8 vgimportclone.8 vgmerge.8 vgmknodes.8 vgreduce.8 vgremove.8 \
vgrename.8 vgs.8 vgscan.8 vgsplit.8 \
device usage based on devices file
The LVM devices file lists devices that lvm can use. The default
file is /etc/lvm/devices/system.devices, and the lvmdevices(8)
command is used to add or remove device entries. If the file
does not exist, or if lvm.conf includes use_devicesfile=0, then
lvm will not use a devices file. When the devices file is in use,
the regex filter is not used, and the filter settings in lvm.conf
or on the command line are ignored.
LVM records devices in the devices file using hardware-specific
IDs, such as the WWID, and attempts to use subsystem-specific
IDs for virtual device types. These device IDs are also written
in the VG metadata. When no hardware or virtual ID is available,
lvm falls back using the unstable device name as the device ID.
When devnames are used, lvm performs extra scanning to find
devices if their devname changes, e.g. after reboot.
When proper device IDs are used, an lvm command will not look
at devices outside the devices file, but when devnames are used
as a fallback, lvm will scan devices outside the devices file
to locate PVs on renamed devices. A config setting
search_for_devnames can be used to control the scanning for
renamed devname entries.
Related to the devices file, the new command option
--devices <devnames> allows a list of devices to be specified for
the command to use, overriding the devices file. The listed
devices act as a sort of devices file in terms of limiting which
devices lvm will see and use. Devices that are not listed will
appear to be missing to the lvm command.
Multiple devices files can be kept in /etc/lvm/devices, which
allows lvm to be used with different sets of devices, e.g.
system devices do not need to be exposed to a specific application,
and the application can use lvm on its own set of devices that are
not exposed to the system. The option --devicesfile <filename> is
used to select the devices file to use with the command. Without
the option set, the default system devices file is used.
Setting --devicesfile "" causes lvm to not use a devices file.
An existing, empty devices file means lvm will see no devices.
The new command vgimportdevices adds PVs from a VG to the devices
file and updates the VG metadata to include the device IDs.
vgimportdevices -a will import all VGs into the system devices file.
LVM commands run by dmeventd not use a devices file by default,
and will look at all devices on the system. A devices file can
be created for dmeventd (/etc/lvm/devices/dmeventd.devices) If
this file exists, lvm commands run by dmeventd will use it.
Internal implementaion:
- device_ids_read - read the devices file
. add struct dev_use (du) to cmd->use_devices for each devices file entry
- dev_cache_scan - get /dev entries
. add struct device (dev) to dev_cache for each device on the system
- device_ids_match - match devices file entries to /dev entries
. match each du on cmd->use_devices to a dev in dev_cache, using device ID
. on match, set du->dev, dev->id, dev->flags MATCHED_USE_ID
- label_scan - read lvm headers and metadata from devices
. filters are applied, those that do not need data from the device
. filter-deviceid skips devs without MATCHED_USE_ID, i.e.
skips /dev entries that are not listed in the devices file
. read lvm label from dev
. filters are applied, those that use data from the device
. read lvm metadata from dev
. add info/vginfo structs for PVs/VGs (info is "lvmcache")
- device_ids_find_renamed_devs - handle devices with unstable devname ID
where devname changed
. this step only needed when devs do not have proper device IDs,
and their dev names change, e.g. after reboot sdb becomes sdc.
. detect incorrect match because PVID in the devices file entry
does not match the PVID found when the device was read above
. undo incorrect match between du and dev above
. search system devices for new location of PVID
. update devices file with new devnames for PVIDs on renamed devices
. label_scan the renamed devs
- continue with command processing
2020-06-23 21:25:41 +03:00
lvmsar.8 lvmsadc.8 lvmdiskscan.8 lvmdevices.8 vgimportdevices.8
2017-03-29 02:44:09 +03:00
MAN8SO = lvm-config.8 lvm-dumpconfig.8
2017-03-16 14:26:51 +03:00
MAN8DM = dmsetup.8 dmstats.8
2016-12-17 19:24:35 +03:00
MAN8CLUSTER =
MAN8SYSTEMD_GENERATORS = lvm2-activation-generator.8
2010-01-19 05:04:33 +03:00
2021-02-28 03:21:12 +03:00
i f e q ( , $( findstring $ ( MAKECMDGOALS ) , distclean all_man install_all_man ) )
2021-04-19 12:24:16 +03:00
MAN7 += lvmcache.7 lvmthin.7 lvmvdo.7
2021-07-09 15:44:07 +03:00
MAN8 += $( FSADMMAN) $( LVMPOLLDMAN) $( LVMLOCKDMAN) $( LVMDBUSDMAN) $( VDOIMPORTMAN)
2017-03-16 14:26:51 +03:00
MAN8DM += $( BLKDEACTIVATEMAN) $( DMEVENTDMAN) $( DMFILEMAPDMAN)
2018-06-15 01:46:08 +03:00
MAN8CLUSTER += $( CMIRRORDMAN)
2010-01-19 05:04:33 +03:00
e l s e
2015-08-28 15:03:18 +03:00
ifeq ( "@FSADM@" , "yes" )
MAN8 += $( FSADMMAN)
2021-07-09 15:44:07 +03:00
endif
ifeq ( "@VDOIMPORT@" , "yes" )
MAN8 += $( VDOIMPORTMAN)
2015-08-28 15:03:18 +03:00
endif
2014-04-04 04:14:25 +04:00
2016-02-18 02:53:35 +03:00
ifeq ( "@BUILD_LVMDBUSD@" , "yes" )
MAN8 += $( LVMDBUSDMAN)
endif
2015-08-28 15:03:18 +03:00
ifeq ( "@BUILD_LVMPOLLD@" , "yes" )
MAN8 += $( LVMPOLLDMAN)
endif
ifeq ( "@BUILD_LVMLOCKD@" , "yes" )
MAN8 += $( LVMLOCKDMAN)
endif
ifeq ( "@BLKDEACTIVATE@" , "yes" )
MAN8DM += $( BLKDEACTIVATEMAN)
endif
2017-08-01 19:17:06 +03:00
ifeq ( "@BUILD_DMEVENTD@" , "yes" )
2015-08-28 15:03:18 +03:00
MAN8DM += $( DMEVENTDMAN)
endif
2014-05-15 14:06:18 +04:00
2017-04-18 22:37:53 +03:00
ifeq ( "@BUILD_DMFILEMAPD@" , "yes" )
2017-03-16 14:26:51 +03:00
MAN8DM += $( DMFILEMAPDMAN)
endif
2015-08-28 15:03:18 +03:00
ifeq ( "@BUILD_CMIRRORD@" , "yes" )
MAN8CLUSTER += $( CMIRRORDMAN)
endif
2021-04-19 12:24:16 +03:00
ifeq ( "@CACHE@" , "internal" )
MAN7 += lvmcache.7
else
ifeq ( "@WRITECACHE@" , "internal" )
MAN7 += lvmcache.7
endif
endif
ifeq ( "@THIN@" , "internal" )
MAN7 += lvmthin.7
endif
ifeq ( "@VDO@" , "internal" )
MAN7 += lvmvdo.7
endif
2014-04-04 04:14:25 +04:00
e n d i f
2010-03-04 12:56:01 +03:00
MAN5DIR = $( mandir) /man5
2014-04-04 04:14:25 +04:00
MAN7DIR = $( mandir) /man7
2010-03-04 12:56:01 +03:00
MAN8DIR = $( mandir) /man8
2001-09-21 16:37:43 +04:00
2017-03-17 02:10:40 +03:00
MANGENERATOR = $( top_builddir) /tools/man-generator
2017-03-14 03:47:46 +03:00
TESTMAN = test.gen
2010-03-04 12:51:37 +03:00
i n c l u d e $( top_builddir ) / m a k e . t m p l
2001-09-21 16:37:43 +04:00
2017-03-29 01:22:15 +03:00
CLEAN_TARGETS += $( MAN5) $( MAN7) $( MAN8) $( MAN8SO) $( MAN8:%.8= %.8_gen) $( MAN8CLUSTER) \
2017-03-17 02:10:40 +03:00
$( MAN8SYSTEMD_GENERATORS) $( MAN8DM) $( TESTMAN)
2004-08-18 22:57:40 +04:00
2011-09-23 13:48:21 +04:00
all : man device -mapper
2008-10-08 16:50:13 +04:00
2017-03-14 03:47:46 +03:00
.PHONY : man install_man 5 install_man 7 install_man 8 pregenerated_man
2008-10-08 16:50:13 +04:00
2008-11-04 20:25:32 +03:00
device-mapper : $( MAN 8DM )
2008-11-01 05:19:19 +03:00
2017-03-29 01:22:15 +03:00
man : $( MAN 5) $( MAN 7) $( MAN 8) $( MAN 8SO ) $( MAN 8CLUSTER ) $( MAN 8SYSTEMD_GENERATORS )
2008-10-08 16:50:13 +04:00
2015-09-15 15:14:16 +03:00
all_man : man
2017-03-29 01:22:15 +03:00
$(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8DM) $(MAN8CLUSTER) $(MAN8SYSTEMD_GENERATORS) : Makefile
2008-10-08 16:50:13 +04:00
2021-04-23 14:49:52 +03:00
$(MANGENERATOR) :
@echo " [MAKE] $< "
$( Q) $( MAKE) -C $( top_builddir) tools
2017-03-14 03:47:46 +03:00
# Test whether or not the man page generator works
2017-03-17 02:10:40 +03:00
$(TESTMAN) : $( MANGENERATOR ) Makefile
2021-02-28 23:20:54 +03:00
@echo " [TSTMAN] $@ "
$( Q) - $( MANGENERATOR) --primary lvmconfig > $@
2017-03-14 03:47:46 +03:00
SEE_ALSO = $( srcdir) /see_also.end
2017-03-17 02:08:59 +03:00
.PRECIOUS : %.8_gen
2017-03-14 03:47:46 +03:00
%.8_gen : $( srcdir ) /%.8_des $( srcdir ) /%.8_end $( MANGENERATOR ) $( TESTMAN )
2017-10-27 17:44:11 +03:00
$( Q) set -e ; ( \
2017-03-14 03:47:46 +03:00
if [ ! -s $( TESTMAN) ] ; then \
2021-04-18 21:37:37 +03:00
cat $( srcdir) /$( @:%.8_gen= %.8_pregen) \
$( srcdir) /$( basename $@ ) .8_end $( SEE_ALSO) ; \
2017-03-14 03:47:46 +03:00
else \
MANCMD = $( basename $@ ) && \
2017-03-24 03:39:50 +03:00
$( MANGENERATOR) --primary $$ MANCMD $< && \
$( MANGENERATOR) --secondary $$ MANCMD && \
2021-04-18 21:37:37 +03:00
cat $( srcdir) /$( basename $@ ) .8_end $( SEE_ALSO) ; \
2017-03-14 03:47:46 +03:00
fi \
) > $@
2021-04-16 15:40:42 +03:00
#
# When EDITLINE_LIBS is defined, we are compiling with libedit
#
i f n e q ( "$(EDITLINE_LIBS)" , "" )
DEFAULT_LIBLINE = editline
e l s e
DEFAULT_LIBLINE = readline
e n d i f
2017-03-14 03:47:46 +03:00
d e f i n e S U B S T V A R S
2021-04-11 23:29:04 +03:00
$( SED ) - e "s+#VERSION#+$(LVM_VERSION)+" \
2017-03-28 18:51:22 +03:00
-e " s+#DEFAULT_SYS_DIR#+ $( DEFAULT_SYS_DIR) + " \
-e " s+#DEFAULT_ARCHIVE_DIR#+ $( DEFAULT_ARCHIVE_DIR) + " \
-e " s+#DEFAULT_BACKUP_DIR#+ $( DEFAULT_BACKUP_DIR) + " \
-e " s+#DEFAULT_PROFILE_DIR#+ $( DEFAULT_PROFILE_DIR) + " \
-e " s+#DEFAULT_CACHE_DIR#+ $( DEFAULT_CACHE_DIR) + " \
-e " s+#DEFAULT_LOCK_DIR#+ $( DEFAULT_LOCK_DIR) + " \
2021-04-13 16:26:05 +03:00
-e "s+#LVM_PATH#+@bindir@/lvm+" \
2017-08-01 12:17:04 +03:00
-e " s+#DEFAULT_RUN_DIR#+ $( DEFAULT_RUN_DIR) + " \
-e " s+#DEFAULT_PID_DIR#+ $( DEFAULT_PID_DIR) + " \
2017-03-28 18:51:22 +03:00
-e " s+#SYSTEMD_GENERATOR_DIR#+ $( SYSTEMD_GENERATOR_DIR) + " \
2021-04-16 15:40:42 +03:00
-e " s+#DEFAULT_LIBLINE#+ $( DEFAULT_LIBLINE) + " \
2017-03-28 18:51:22 +03:00
-e " s+#DEFAULT_MANGLING#+ $( DEFAULT_MANGLING) + " $< > $@
2017-03-14 03:47:46 +03:00
e n d e f
2021-04-14 15:39:17 +03:00
# Escape any '-' to '\-' (except ^.TH line)
# and fix unwanted changes:
# '\\-' back to '\-'
# words like 'device\-mapper' back to 'device-mapper',
# \[\->] \[<\-] back to \[->], \[<-]
# however for some words i.e. '*-pool' we want '*\-pool'
# also 'vg-lv,[systemd-]machine-id,lvm-full,lvm-lvpoll' should go with \-
2017-03-28 01:17:43 +03:00
#
2017-03-27 17:45:48 +03:00
d e f i n e E S C A P E H Y P H E N S
2021-04-14 15:39:17 +03:00
$( SED ) - i - e "/^.TH/ !s+-+\\\-+g" \
-e "s+\\\[\]-+\\\-+g" \
-e "s+\(^\|[^[:alnum:]\-]\)\([[:alpha:]]\{1,\}\)\\\-\((\|[([:alpha:]]\{2,\}\)+\1\2-\3+g" \
-e "s+\([[:alpha:]]\)-\(pool\)+\1\\\-\2+g" \
-e "s+[\][[]\(<\{0,1\}\)\\\-+\\\[\1-+g" \
-e "s+\(vg.\{1,\}[^\]\)-lv+\1\\\-lv+g" \
-e "s+systemd-machine+systemd\\\-machine+g" \
-e "s+machine-id+machine\\\-id+g" \
-e "s+lvm-full+lvm\\\-full+g" \
-e "s+lvm-lvpoll+lvm\\\-lvpoll+g" \
$@
2017-03-27 17:45:48 +03:00
e n d e f
2021-04-14 15:39:17 +03:00
.PHONY : checksed
checksed :
$( Q) echo "cmd -a -b retry -c ret --use-policy -d" > $@
$( Q) echo "cmd \fI-u\fB -d retry \fI--use-pol --use-poli 4.0 --use \"-L|--size\"" >> $@
$( Q) echo "cmd --use-pol" >> $@
$( Q) echo "cmd --[raid]use device-mapper thin-pool \fB-\fP sdb1:1000-1999 \fB-t\fP|\fB--test\fP -? -o-field3" >> $@
$( Q) echo "cmd -dd---- \[->] \[<-] -*- -o#field5 -o-field3 -d" >> $@
$( Q) echo "-d" >> $@
$( Q) echo ".TH 2.03.12(2)-git" >> $@
$( Q) echo "--verbose" >> $@
$( Q) echo ".BR -- [ raid ] most -- [ raid ] most" >> $@
$( Q) echo ".BR | --verbose|--verb --verbose --verbose --verbose --verbose" >> $@
$( Q) echo "skip - unint --aa-dd- --aa-dd-- ---aa-dd 4.0 \-a\-b" >> $@
$( Q) echo "cmd \-a \-b retry \-c ret \-\-use\-policy \-d" > $@ -e
$( Q) echo "cmd \fI\-u\fB \-d retry \fI\-\-use\-pol \-\-use\-poli 4.0 \-\-use \"\-L|\-\-size\"" >> $@ -e
$( Q) echo "cmd \-\-use\-pol" >> $@ -e
$( Q) echo "cmd \-\-[raid]use device-mapper thin\-pool \fB\-\fP sdb1:1000\-1999 \fB\-t\fP|\fB\-\-test\fP \-? \-o\-field3" >> $@ -e
$( Q) echo "cmd \-dd\-\-\-\- \[->] \[<-] \-*\- \-o#field5 \-o\-field3 \-d" >> $@ -e
$( Q) echo "\-d" >> $@ -e
$( Q) echo ".TH 2.03.12(2)-git" >> $@ -e
$( Q) echo "\-\-verbose" >> $@ -e
$( Q) echo ".BR \-\- [ raid ] most \-\- [ raid ] most" >> $@ -e
$( Q) echo ".BR | \-\-verbose|\-\-verb \-\-verbose \-\-verbose \-\-verbose \-\-verbose" >> $@ -e
$( Q) echo "skip \- unint \-\-aa\-dd\- \-\-aa\-dd\-\- \-\-\-aa\-dd 4.0 \-a\-b" >> $@ -e
$( Q) $( ESCAPEHYPHENS)
$( Q) echo "--- H Y P H E N A T E D ---"
$( Q) cat $@
$( Q) diff -u $@ -e $@
$( Q) $( RM) $@ $@ -e
2017-03-14 03:47:46 +03:00
%.5 : $( srcdir ) /%.5_main
2018-01-31 13:04:17 +03:00
@echo " [MAN] $@ "
$( Q) $( SUBSTVARS)
$( Q) $( ESCAPEHYPHENS)
2017-03-14 03:47:46 +03:00
%.7 : $( srcdir ) /%.7_main
2018-01-31 13:04:17 +03:00
@echo " [MAN] $@ "
$( Q) $( SUBSTVARS)
$( Q) $( ESCAPEHYPHENS)
2017-03-14 03:47:46 +03:00
%.8 : $( srcdir ) /%.8_main
2018-01-31 13:04:17 +03:00
@echo " [MAN] $@ "
$( Q) $( SUBSTVARS)
$( Q) $( ESCAPEHYPHENS)
2017-03-14 03:47:46 +03:00
%.8 : %.8_gen
2018-01-31 13:04:17 +03:00
@echo " [MAN] $@ "
$( Q) $( SUBSTVARS)
$( Q) $( ESCAPEHYPHENS)
2017-02-11 01:20:19 +03:00
2017-03-30 01:41:24 +03:00
$(MAN8SO) : lvmconfig .8
2018-01-31 13:04:17 +03:00
@echo " [MAN] $@ "
$( Q) echo " .so $< " > $@
2017-03-29 01:22:15 +03:00
2010-04-10 01:42:48 +04:00
install_man5 : $( MAN 5)
2021-02-28 03:21:12 +03:00
@echo " [INSTALL] $^ "
2018-01-31 13:04:17 +03:00
$( Q) $( INSTALL) -d $( MAN5DIR)
2021-02-28 03:21:12 +03:00
$( Q) $( INSTALL_DATA) $^ $( MAN5DIR) /
2010-04-10 01:42:48 +04:00
2014-05-13 14:18:13 +04:00
install_man7 : $( MAN 7)
2021-02-28 03:21:12 +03:00
@echo " [INSTALL] $^ "
2018-01-31 13:04:17 +03:00
$( Q) $( INSTALL) -d $( MAN7DIR)
2021-02-28 03:21:12 +03:00
$( Q) $( INSTALL_DATA) $^ $( MAN7DIR) /
2014-04-04 04:14:25 +04:00
2017-03-29 02:44:09 +03:00
install_man8 : $( MAN 8) $( MAN 8SO )
2021-02-28 03:21:12 +03:00
@echo " [INSTALL] $^ "
2018-01-31 13:04:17 +03:00
$( Q) $( INSTALL) -d $( MAN8DIR)
2021-02-28 03:21:12 +03:00
$( Q) $( INSTALL_DATA) $^ $( MAN8DIR) /
2010-04-10 01:42:48 +04:00
2014-04-04 04:14:25 +04:00
install_lvm2 : install_man 5 install_man 7 install_man 8
2010-04-10 01:42:48 +04:00
install_cluster : $( MAN 8CLUSTER )
2014-05-21 12:50:56 +04:00
i f d e f M A N 8 C L U S T E R
2021-02-28 03:21:12 +03:00
@echo " [INSTALL] $^ "
2018-01-31 13:04:17 +03:00
$( Q) $( INSTALL) -d $( MAN8DIR)
2021-02-28 03:21:12 +03:00
$( Q) $( INSTALL_DATA) $^ $( MAN8DIR) /
2014-05-21 12:50:56 +04:00
e n d i f
2010-04-10 01:42:48 +04:00
install_device-mapper : $( MAN 8DM )
2021-02-28 03:21:12 +03:00
@echo " [INSTALL] $^ "
2018-01-31 13:04:17 +03:00
$( Q) $( INSTALL) -d $( MAN8DIR)
2021-02-28 03:21:12 +03:00
$( Q) $( INSTALL_DATA) $^ $( MAN8DIR) /
2009-05-11 14:28:45 +04:00
2017-03-30 01:35:46 +03:00
install_systemd_generators : $( MAN 8SYSTEMD_GENERATORS )
2021-02-28 03:21:12 +03:00
@echo " [INSTALL] $^ "
2018-01-31 13:04:17 +03:00
$( Q) $( INSTALL) -d $( MAN8DIR)
2021-02-28 03:21:12 +03:00
$( Q) $( INSTALL_DATA) $^ $( MAN8DIR) /
2014-03-13 16:01:06 +04:00
2014-11-24 02:32:26 +03:00
install : install_lvm 2 install_device -mapper install_cluster
2015-08-28 15:03:18 +03:00
2015-09-15 15:14:16 +03:00
install_all_man : install install_systemd_generators
2017-03-14 03:47:46 +03:00
# Copy generated man pages back to source tree as fallback for machines where generator doesn't work
2021-04-18 21:37:37 +03:00
pregenerated_man : $( MANGENERATOR ) $( TESTMAN )
2021-02-28 23:20:54 +03:00
@echo " [GENERATE] $^ "
2021-04-18 21:37:37 +03:00
$( Q) set -e ; test -s $( TESTMAN) && for i in $( srcdir) /*.8_des; do \
2017-03-14 03:47:46 +03:00
CMD = ` basename $$ i .8_des` ; \
2021-04-18 21:37:37 +03:00
( $( MANGENERATOR) --primary $$ CMD $$ i && \
$( MANGENERATOR) --secondary $$ CMD ) \
> $( srcdir) /$$ CMD.8_pregen ; \
2017-03-14 03:47:46 +03:00
done
generate : pregenerated_man