X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=Makefile;h=8af6ecf638f2c7c680d5dd552102cf8028049644;hp=20c739e4041d6a7e4263effa28ee7ab7214346c3;hb=bc59f0167a03be2d2e4cf8a680dda8444243c64f;hpb=869fc2f1ff73209b9aa5dc7d582eba39feaf6f86 diff --git a/Makefile b/Makefile index 20c739e40..8af6ecf63 100644 --- a/Makefile +++ b/Makefile @@ -33,8 +33,8 @@ USE_DBUS = false ROOT = udev DAEMON = udevd SENDER = udevsend -HELPERS = udevinfo -VERSION = 014_bk +HELPER = udevinfo +VERSION = 015_bk INSTALL_DIR = /usr/local/bin RELEASE_NAME = $(ROOT)-$(VERSION) LOCAL_CFG_DIR = etc/udev @@ -165,7 +165,7 @@ endif CFLAGS += -I$(PWD)/libsysfs -all: $(ROOT) $(UDEVD) $(HELPERS) +all: $(ROOT) $(UDEVD) $(HELPER) @extras="$(EXTRAS)" ; for target in $$extras ; do \ echo $$target ; \ $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \ @@ -200,8 +200,7 @@ OBJS = udev_config.o \ $(SYSFS) \ $(TDB) -HEADERS = $(GEN_HEADERS) \ - udev.h \ +HEADERS = udev.h \ namedev.h \ udev_version.h \ udev_dbus.h \ @@ -233,6 +232,8 @@ udev_version.h: @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_BIN \"$(PWD)/udev\" >> $@ + @echo \#define UDEVD_BIN \"$(PWD)/udevd\" >> $@ # config files automatically generated GEN_CONFIGS = $(LOCAL_CFG_DIR)/udev.conf @@ -243,13 +244,14 @@ $(LOCAL_CFG_DIR)/udev.conf: $(OBJS): $(GEN_HEADERS) +udev.o: $(GEN_HEADERS) -$(ROOT): udev.o $(OBJS) $(HEADERS) +$(ROOT): udev.o $(OBJS) $(HEADERS) $(GEN_HEADERS) $(LD) $(LDFLAGS) -o $@ $(CRT0) udev.o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS) $(STRIPCMD) $@ -$(HELPERS): udevinfo.o $(OBJS) $(HEADERS) - $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS) +$(HELPER): udevinfo.o $(OBJS) $(HEADERS) + $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o logging.o udev_config.o udevdb.o $(SYSFS) $(TDB) $(LIB_OBJS) $(ARCH_LIB_OBJS) $(STRIPCMD) $@ $(DAEMON): udevd.h udevd.o udevd.o logging.o @@ -263,7 +265,7 @@ $(SENDER): udevd.h udevsend.o udevd.o logging.o clean: -find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \ | xargs rm -f - -rm -f core $(ROOT) $(GEN_HEADERS) $(GEN_CONFIGS) $(DAEMON) $(SENDER) + -rm -f core $(ROOT) $(GEN_HEADERS) $(GEN_CONFIGS) $(HELPER) $(DAEMON) $(SENDER) $(MAKE) -C klibc clean @extras="$(EXTRAS)" ; for target in $$extras ; do \ echo $$target ; \ @@ -336,13 +338,15 @@ 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 $(HELPER) $(DESTDIR)$(sbindir)/$(HELPER) @if [ "x$(USE_LSB)" = "xtrue" ]; then \ $(INSTALL_PROGRAM) -D etc/init.d/udev.init.LSB $(DESTDIR)$(initdir)/udev; \ - ln -s $(DESTDIR)$(initdir)/udev $(sbin_dir)/rcudev; \ + ln -s $(DESTDIR)$(initdir)/udev $(sbindir)/rcudev; \ else \ $(INSTALL_PROGRAM) -D etc/init.d/udev $(DESTDIR)$(initdir)/udev; \ fi $(INSTALL_DATA) -D udev.8 $(DESTDIR)$(mandir)/man8/udev.8 + $(INSTALL_DATA) -D udevinfo.8 $(DESTDIR)$(mandir)/man8/udevinfo.8 - rm -f $(DESTDIR)$(hotplugdir)/udev.hotplug - ln -f -s $(sbindir)/$(ROOT) $(DESTDIR)$(hotplugdir)/udev.hotplug @extras="$(EXTRAS)" ; for target in $$extras ; do \ @@ -358,7 +362,9 @@ uninstall: uninstall-dbus-policy - rm $(configdir)/udev.conf - rm $(initdir)/udev - rm $(mandir)/man8/udev.8 + - rm $(mandir)/man8/udevinfo.8 - rm $(sbindir)/$(ROOT) + - rm $(sbindir)/$(HELPER) - rmdir $(hotplugdir) - rmdir $(configdir) - rmdir $(udevdir)