2004-04-14 21:39:55 +04:00
#
2010-04-10 01:42:48 +04:00
# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
2004-04-14 21:39:55 +04:00
#
2007-09-21 14:16:45 +04:00
# This file is part of LVM2.
2004-04-14 21:39:55 +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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
srcdir = @srcdir@
top_srcdir = @top_srcdir@
2009-10-02 23:10:31 +04:00
top_builddir = @top_builddir@
2004-04-14 21:39:55 +04:00
2010-05-20 15:45:56 +04:00
CONFSRC = example.conf
2004-04-14 21:39:55 +04:00
CONFDEST = lvm.conf
2015-02-24 01:19:08 +03:00
CONFLOCAL = lvmlocal.conf
2004-04-14 21:39:55 +04:00
2014-05-21 14:32:12 +04:00
PROFILE_TEMPLATES = command_profile_template.profile metadata_profile_template.profile
2014-06-13 11:45:26 +04:00
PROFILES = $( PROFILE_TEMPLATES) $( srcdir) /thin-generic.profile $( srcdir) /thin-performance.profile
2013-06-28 16:08:04 +04:00
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
2004-04-14 21:39:55 +04:00
2015-02-24 01:19:08 +03:00
.PHONY : install_conf install_localconf install_profiles
2015-04-16 00:15:30 +03:00
generate :
2015-04-22 17:35:50 +03:00
LD_LIBRARY_PATH = $( top_builddir) /libdm:$( LD_LIBRARY_PATH) $( top_builddir) /tools/lvm dumpconfig --type default --unconfigured --withfullcomments --ignorelocal > example.conf.gen
2015-04-16 00:15:30 +03:00
cat example.conf.base example.conf.gen > example.conf.in
2015-04-22 18:05:02 +03:00
$( RM) example.conf.gen
2015-04-22 17:35:50 +03:00
LD_LIBRARY_PATH = $( top_builddir) /libdm:$( LD_LIBRARY_PATH) $( top_builddir) /tools/lvm dumpconfig --type default --unconfigured --withfullcomments local > lvmlocal.conf.gen
2015-04-16 00:15:30 +03:00
cat lvmlocal.conf.base lvmlocal.conf.gen > lvmlocal.conf.in
2015-04-22 18:05:02 +03:00
$( RM) lvmlocal.conf.gen
2015-04-16 00:15:30 +03:00
2013-06-28 16:08:04 +04:00
install_conf : $( CONFSRC )
2004-04-14 21:39:55 +04:00
@if [ ! -e $( confdir) /$( CONFDEST) ] ; then \
2010-04-10 01:42:48 +04:00
echo " $( INSTALL_WDATA) -D $< $( confdir) / $( CONFDEST) " ; \
$( INSTALL_WDATA) -D $< $( confdir) /$( CONFDEST) ; \
2004-04-14 21:39:55 +04:00
fi
2015-02-24 01:19:08 +03:00
install_localconf : $( CONFLOCAL )
@if [ ! -e $( confdir) /$( CONFLOCAL) ] ; then \
echo " $( INSTALL_WDATA) -D $< $( confdir) / $( CONFLOCAL) " ; \
$( INSTALL_WDATA) -D $< $( confdir) /$( CONFLOCAL) ; \
fi
2013-06-28 16:08:04 +04:00
install_profiles : $( PROFILES )
2013-07-03 15:07:39 +04:00
$( INSTALL_DIR) $( DESTDIR) $( DEFAULT_PROFILE_DIR)
$( INSTALL_DATA) $( PROFILES) $( DESTDIR) $( DEFAULT_PROFILE_DIR) /
2013-06-28 16:08:04 +04:00
2015-02-24 01:19:08 +03:00
install_lvm2 : install_conf install_localconf install_profiles
2013-06-28 16:08:04 +04:00
2009-05-11 14:28:45 +04:00
install : install_lvm 2
2010-08-03 17:00:45 +04:00
2015-04-22 18:05:02 +03:00
DISTCLEAN_TARGETS += $( CONFSRC) $( CONFLOCAL) $( PROFILE_TEMPLATES) $( CONFSRC) .gen $( CONFLOCAL) .gen