mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Update install rules for udev.
Fix unwanted modification of $(top_builddir)/make.tmpl. Using dependency rules to install rules for udev. There is minor problem, with concurent usage of builddir and srcdir could lead to missuse of 10-dm.rules which could be found in VPATH from different builddir. However current solution uses intermediate target so the generated 10-dm.rules exists only for short period of time during make install execution.
This commit is contained in:
parent
23b059e7b7
commit
d5fdc8e8ab
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2009 Red Hat, Inc. All rights reserved.
|
# Copyright (C) 2009-2010 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This file is part of LVM2.
|
# This file is part of LVM2.
|
||||||
#
|
#
|
||||||
@ -25,24 +25,13 @@ include $(top_builddir)/make.tmpl
|
|||||||
|
|
||||||
vpath %.rules $(srcdir)
|
vpath %.rules $(srcdir)
|
||||||
|
|
||||||
%: %.in
|
%.rules: %.rules.in
|
||||||
$(SED) -e "s/(DM_DIR)/$(DM_DIR)/" $< >$@
|
$(SED) -e "s/(DM_DIR)/$(DM_DIR)/" $< >$@
|
||||||
|
|
||||||
install_lvm2: $(LVM_RULES)
|
%_install: %.rules
|
||||||
@echo "Installing $(LVM_RULES) in $(udevdir)"
|
$(INSTALL_DATA) -D $< $(udevdir)/$(<F)
|
||||||
@for f in $(LVM_RULES); \
|
|
||||||
do \
|
|
||||||
$(RM) $(udevdir)/$$f; \
|
|
||||||
$(INSTALL) -c -D $(OWNER) $(GROUP) -m 644 $(srcdir)/$$f $(udevdir)/$$f; \
|
|
||||||
done
|
|
||||||
|
|
||||||
install_device-mapper: $(DM_RULES)
|
install_device-mapper: $(DM_RULES:.rules=_install)
|
||||||
@echo "Installing $(DM_RULES) in $(udevdir)"
|
install_lvm2: $(LVM_RULES:.rules=_install)
|
||||||
@for f in $(DM_RULES); \
|
|
||||||
do \
|
|
||||||
$(RM) $(udevdir)/$$f; \
|
|
||||||
if test -f $$f; then file=$$f; else file=$(srcdir)/$$f; fi; \
|
|
||||||
$(INSTALL) -c -D $(OWNER) $(GROUP) -m 644 $$file $(udevdir)/$$f; \
|
|
||||||
done
|
|
||||||
|
|
||||||
install: install_lvm2 install_device-mapper
|
install: install_lvm2 install_device-mapper
|
||||||
|
Loading…
Reference in New Issue
Block a user