summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-04-23 21:50:27 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:35:17 -0700
commitaef6bb132ef2f5b4c446e42f6050033d4f5c177b (patch)
tree1ab956b49274969379cd70a435646d8a2e013a59 /Makefile
parentda361dd7dfd451153e9dc10866a79de8a9f2f414 (diff)
[PATCH] udev default config layout changes
Here we catch up, after the default config changes. o the man page is updated to reflect the new default config o /etc/udev/rules.d/ + permissions.d/ dirs are created now o udev.rules is installed in /etc/udev/rules.d/50-udev.rules so the user can easily order the files by prepending a number. (RedHat has the same name in the last rpm.) o defined directory names in the Makefile are all without slashes now, not the first half with and the remaining without. o all binaries are uninstalled now o leading slashes in config values are now removed or prepended while the config is parsed, so we are more robust if the usere changes something. o replaced the macros from udev_config.c with real code, cause we can skip if the value matches and not useless iterate over the remaining fields. o config parsing errors are logged with info() now, fixes the bug where we report a error with debug_parse(), even when there isn't one
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile64
1 files changed, 34 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index 7969c0f51d..7c716e852e 100644
--- a/Makefile
+++ b/Makefile
@@ -51,9 +51,9 @@ sbindir = ${exec_prefix}/sbin
usrbindir = ${exec_prefix}/usr/bin
mandir = ${prefix}/usr/share/man
hotplugdir = ${etcdir}/hotplug.d/default
-configdir = ${etcdir}/udev/
-initdir = ${etcdir}/init.d/
-dev_ddir = ${etcdir}/dev.d/
+configdir = ${etcdir}/udev
+initdir = ${etcdir}/init.d
+dev_ddir = ${etcdir}/dev.d
srcdir = .
INSTALL = /usr/bin/install -c
@@ -228,16 +228,16 @@ GEN_HEADERS = udev_version.h
# Rules on how to create the generated header files
udev_version.h:
- @echo \#define UDEV_VERSION \"$(VERSION)\" > $@
- @echo \#define UDEV_ROOT \"$(udevdir)/\" >> $@
- @echo \#define UDEV_DB \"$(udevdir)/\.udev.tdb\" >> $@
- @echo \#define UDEV_CONFIG_DIR \"$(configdir)\" >> $@
- @echo \#define UDEV_CONFIG_FILE \"$(configdir)\udev.conf\" >> $@
- @echo \#define UDEV_RULES_FILE \"$(configdir)\udev.rules\" >> $@
- @echo \#define UDEV_PERMISSION_FILE \"$(configdir)\udev.permissions\" >> $@
- @echo \#define UDEV_LOG_DEFAULT \"yes\" >> $@
- @echo \#define UDEV_BIN \"$(DESTDIR)$(sbindir)/udev\" >> $@
- @echo \#define UDEVD_BIN \"$(DESTDIR)$(sbindir)/udevd\" >> $@
+ @echo \#define UDEV_VERSION \"$(VERSION)\" > $@
+ @echo \#define UDEV_ROOT \"$(udevdir)/\" >> $@
+ @echo \#define UDEV_DB \"$(udevdir)/.udev.tdb\" >> $@
+ @echo \#define UDEV_CONFIG_DIR \"$(configdir)\" >> $@
+ @echo \#define UDEV_CONFIG_FILE \"$(configdir)/udev.conf\" >> $@
+ @echo \#define UDEV_RULES_FILE \"$(configdir)/rules.d\" >> $@
+ @echo \#define UDEV_PERMISSION_FILE \"$(configdir)/permissions.d\" >> $@
+ @echo \#define UDEV_LOG_DEFAULT \"yes\" >> $@
+ @echo \#define UDEV_BIN \"$(DESTDIR)$(sbindir)/udev\" >> $@
+ @echo \#define UDEVD_BIN \"$(DESTDIR)$(sbindir)/udevd\" >> $@
# config files automatically generated
GEN_CONFIGS = $(LOCAL_CFG_DIR)/udev.conf
@@ -343,29 +343,29 @@ install-initscript: etc/init.d/udev etc/init.d/udev.debian etc/init.d/udev.init.
fi
install-config: $(GEN_CONFIGS)
- $(INSTALL) -d $(DESTDIR)$(configdir)
- @if [ ! -r $(DESTDIR)$(configdir)udev.conf ]; then \
+ $(INSTALL) -d $(DESTDIR)$(configdir)/rules.d
+ $(INSTALL) -d $(DESTDIR)$(configdir)/permissions.d
+ @if [ ! -r $(DESTDIR)$(configdir)/udev.conf ]; then \
echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.conf $(DESTDIR)$(configdir); \
$(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.conf $(DESTDIR)$(configdir); \
fi
- @if [ ! -r $(DESTDIR)$(configdir)udev.rules ]; then \
- echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.rules $(DESTDIR)$(configdir); \
- $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.rules $(DESTDIR)$(configdir); \
+ @if [ ! -r $(DESTDIR)$(configdir)/rules.d/50-udev.rules ]; then \
+ echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.rules $(DESTDIR)$(configdir)/rules.d/50-udev.rules; \
+ $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.rules $(DESTDIR)$(configdir)/rules.d/50-udev.rules; \
fi
- @if [ ! -r $(DESTDIR)$(configdir)udev.permissions ]; then \
- echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.permissions $(DESTDIR)$(configdir); \
- $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.permissions $(DESTDIR)$(configdir); \
+ @if [ ! -r $(DESTDIR)$(configdir)/permissions.d/50-udev.permissions ]; then \
+ echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.permissions $(DESTDIR)$(configdir)/permissions.d/50-udev.permissions; \
+ $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.permissions $(DESTDIR)$(configdir)/permissions.d/50-udev.permissions; \
fi
install-dev.d:
- $(INSTALL) -d $(DESTDIR)$(dev_ddir)
- $(INSTALL) -d $(DESTDIR)$(dev_ddir)default/
- $(INSTALL_PROGRAM) -D etc/dev.d/net/hotplug.dev $(DESTDIR)$(dev_ddir)net/hotplug.dev
+ $(INSTALL) -d $(DESTDIR)$(dev_ddir)/default
+ $(INSTALL_PROGRAM) -D etc/dev.d/net/hotplug.dev $(DESTDIR)$(dev_ddir)/net/hotplug.dev
uninstall-dev.d:
- - rm $(dev_ddir)net/hotplug.dev
- - rmdir $(dev_ddir)net
- - rmdir $(dev_ddir)default
+ - rm $(dev_ddir)/net/hotplug.dev
+ - rmdir $(dev_ddir)/net
+ - rmdir $(dev_ddir)/default
- rmdir $(dev_ddir)
install-man:
@@ -406,16 +406,20 @@ endif
uninstall: uninstall-man uninstall-dev.d
- rm $(hotplugdir)/udev.hotplug
- - rm $(configdir)/udev.permissions
- - rm $(configdir)/udev.rules
+ - rm $(configdir)/rules.d/50-udev.rules
+ - rm $(configdir)/permissions.d/50-udev.permissions
- rm $(configdir)/udev.conf
+ - rmdir $(configdir)/rules.d
+ - rmdir $(configdir)/permissions.d
+ - rmdir $(configdir)
- rm $(initdir)/udev
- rm $(sbindir)/$(ROOT)
- rm $(sbindir)/$(DAEMON)
- rm $(sbindir)/$(SENDER)
+ - rm $(sbindir)/$(STARTER)
- rm $(usrbindir)/$(INFO)
+ - rm $(usrbindir)/$(TESTER)
- rmdir $(hotplugdir)
- - rmdir $(configdir)
- rm $(udevdir)/.udev.tdb
- rmdir $(udevdir)
@extras="$(EXTRAS)" ; for target in $$extras ; do \