summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2003-12-19 18:29:05 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:09 -0700
commit7591c18a8f3460d3e7cab85d02915c4b51638b5c (patch)
tree1718ab072b85bb52303d4ed42e1d95ebdb4c27ae
parenta56ef382869bb76ade6d26cd7e8adc983ca3f89e (diff)
[PATCH] don't overwrite old config on install
Here is a patch for the Makefile to look for a already installed config and not to overwrite it.
-rw-r--r--Makefile25
1 files changed, 19 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index c2ed659531..3e220b47d0 100644
--- a/Makefile
+++ b/Makefile
@@ -274,18 +274,31 @@ uninstall-dbus-policy:
-
endif
-install: install-dbus-policy all $(GEN_CONFIGS)
- $(INSTALL) -d $(DESTDIR)$(udevdir)
+install-config: $(GEN_CONFIGS)
$(INSTALL) -d $(DESTDIR)$(configdir)
+ @if [ ! -r $(DESTDIR)$(configdir)udev.conf ]; then \
+ echo $(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir); \
+ $(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir); \
+ fi
+ @if [ ! -r $(DESTDIR)$(configdir)udev.rules ]; then \
+ echo $(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir); \
+ $(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir); \
+ fi
+ @if [ ! -r $(DESTDIR)$(configdir)udev.permissions ]; then \
+ echo $(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir); \
+ $(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir); \
+ fi
+
+
+
+install: install-config install-dbus-policy all
+ $(INSTALL) -d $(DESTDIR)$(udevdir)
$(INSTALL) -d $(DESTDIR)$(hotplugdir)
$(INSTALL_PROGRAM) -D $(ROOT) $(DESTDIR)$(sbindir)/$(ROOT)
$(INSTALL_PROGRAM) -D etc/init.d/udev $(DESTDIR)$(initdir)/udev
$(INSTALL_DATA) -D udev.8 $(DESTDIR)$(mandir)/man8/udev.8
- $(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir)
- $(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir)
- $(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir)
- rm -f $(DESTDIR)$(hotplugdir)/udev.hotplug
- - ln -s $(sbindir)/$(ROOT) $(DESTDIR)$(hotplugdir)/udev.hotplug
+ - ln -f -s $(sbindir)/$(ROOT) $(DESTDIR)$(hotplugdir)/udev.hotplug
@extras="$(EXTRAS)" ; for target in $$extras ; do \
echo $$target ; \
$(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \