diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-01-23 03:24:16 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-01-23 03:24:16 +0100 |
commit | d8a57e7c2624bf19ad2f4f91a6d9149d5228402f (patch) | |
tree | 4922db6da1f64f69fed7a0c11f137a79e8312675 | |
parent | aaa14841de57fc0d8c92514da9453c58d9ba59fe (diff) |
Makefile: remove dynamic config file generation
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-rw-r--r-- | Makefile | 34 | ||||
-rw-r--r-- | etc/udev/udev.conf (renamed from etc/udev/udev.conf.in) | 0 | ||||
-rw-r--r-- | udev_sysfs.c | 2 | ||||
-rw-r--r-- | udev_utils_run.c | 3 |
4 files changed, 13 insertions, 26 deletions
@@ -43,7 +43,7 @@ USE_STATIC = false # make EXTRAS="extras/<extra1> extras/<extra2>" EXTRAS = -# make the build silent. Set this to something else to make it noisy again. +# make the build silent. V = false PROGRAMS = \ @@ -89,10 +89,6 @@ MAN_PAGES = \ udevinfo.8 \ udevstart.8 -# config files automatically generated -GEN_CONFIGS = \ - $(LOCAL_CFG_DIR)/udev.conf - GEN_HEADERS = \ udev_version.h @@ -105,12 +101,11 @@ libudevdir = ${prefix}/lib/udev mandir = ${prefix}/usr/share/man configdir = ${etcdir}/udev udevdir = /dev -LOCAL_CFG_DIR = etc/udev DESTDIR = INSTALL = /usr/bin/install -c INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_DATA = ${INSTALL} -m 644 INSTALL_SCRIPT = ${INSTALL_PROGRAM} PWD = $(shell pwd) @@ -149,7 +144,6 @@ ifeq ($(strip $(USE_GCOV)),true) LDFLAGS += -fprofile-arcs endif -# if our own version of klibc is used, we need to build it ifeq ($(strip $(USE_KLIBC)),true) KLCC = /usr/bin/$(CROSS)klcc CC = $(KLCC) @@ -211,14 +205,9 @@ $(LIBUDEV): $(HOST_PROGS) $(HEADERS) $(GEN_HEADERS) $(UDEV_OBJS) $(QUIET) $(AR) cq $@ $(UDEV_OBJS) $(QUIET) $(RANLIB) $@ -# generate config files -$(GEN_CONFIGS): - sed -e "s:@udevdir@:$(udevdir):" -e "s:@configdir@:$(configdir):" < $@.in > $@ - -# generate config header file udev_version.h: - @echo "Creating udev_version.h" - @echo \#define UDEV_VERSION \"$(VERSION)\" > $@ + @echo "/* Generated by make. */" > $@ + @echo \#define UDEV_VERSION \"$(VERSION)\" >> $@ @echo \#define UDEV_ROOT \"$(udevdir)\" >> $@ @echo \#define UDEV_CONFIG_FILE \"$(configdir)/udev.conf\" >> $@ @echo \#define UDEV_RULES_FILE \"$(configdir)/rules.d\" >> $@ @@ -239,8 +228,9 @@ clean: - find -name "*.gcda" -print0 | xargs -0rt rm -f - find -name "*.gcov" -print0 | xargs -0rt rm -f - rm -f udev_gcov.txt - - rm -f core $(PROGRAMS) $(GEN_HEADERS) $(GEN_CONFIGS) + - rm -f core $(PROGRAMS) $(GEN_HEADERS) - rm -f udev-$(VERSION).tar.gz + - rm -f udev-$(VERSION).tar.bz2 @extras="$(EXTRAS)"; for target in $$extras; do \ echo $$target; \ $(MAKE) -C $$target $@ || exit 1; \ @@ -249,14 +239,13 @@ clean: release: git-tar-tree HEAD udev-$(VERSION) | gzip -9v > udev-$(VERSION).tar.gz - @echo "udev-$(VERSION).tar.gz created" + git-tar-tree HEAD udev-$(VERSION) | bzip2 -9v > udev-$(VERSION).tar.bz2 .PHONY: release -install-config: $(GEN_CONFIGS) +install-config: $(INSTALL) -d $(DESTDIR)$(configdir)/rules.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); \ + $(INSTALL_DATA) etc/udev/udev.conf $(DESTDIR)$(configdir); \ fi @if [ ! -r $(DESTDIR)$(configdir)/rules.d/50-udev.rules ]; then \ echo; \ @@ -327,8 +316,8 @@ uninstall-bin: - rm -f $(DESTDIR)$(sbindir)/udevcontrol - rm -f $(DESTDIR)$(sbindir)/udevstart - rm -f $(DESTDIR)$(usrsbindir)/udevmonitor - - rm -f $(usrbindir)/udevinfo - - rm -f $(DESTDIR)$(DESTDIR)$(usrbindir)/udevtest + - rm -f $(DESTDIR)$(usrbindir)/udevinfo + - rm -f $(DESTDIR)$(usrbindir)/udevtest ifndef DESTDIR - killall udevd - rm -rf /dev/.udev @@ -387,4 +376,3 @@ udev_gcov.txt: $(wildcard *.gcda) $(wildcard *.gcno) echo >> $@; \ done; \ echo "view $@ for the result" - diff --git a/etc/udev/udev.conf.in b/etc/udev/udev.conf index 41902c4f06..41902c4f06 100644 --- a/etc/udev/udev.conf.in +++ b/etc/udev/udev.conf diff --git a/udev_sysfs.c b/udev_sysfs.c index d1e43a60ee..8de523dadf 100644 --- a/udev_sysfs.c +++ b/udev_sysfs.c @@ -275,7 +275,7 @@ struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev) if (strncmp(parent_devpath, "/class", 6) == 0) { pos = strrchr(parent_devpath, '/'); if (pos == &parent_devpath[6] || pos == parent_devpath) { - dbg("class top level, look for device link"); + dbg("/class top level, look for device link"); goto device_link; } } diff --git a/udev_utils_run.c b/udev_utils_run.c index c6af90658d..31363588c8 100644 --- a/udev_utils_run.c +++ b/udev_utils_run.c @@ -30,7 +30,6 @@ #include <sys/un.h> #include <sys/wait.h> #include <sys/select.h> -#include <unistd.h> #include "udev.h" @@ -51,7 +50,7 @@ int pass_env_to_socket(const char *sockname, const char *devpath, const char *ac sock = socket(AF_LOCAL, SOCK_DGRAM, 0); memset(&saddr, 0x00, sizeof(struct sockaddr_un)); saddr.sun_family = AF_LOCAL; - /* only abstract namespace is supported */ + /* abstract namespace only */ strcpy(&saddr.sun_path[1], sockname); addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path+1) + 1; |