X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=Makefile;h=9415e1ec975ded757575b803e30589fe6653b912;hp=ae9d2767210dfc8ffd8ce3cd837ae820efe6e687;hb=5d4754f19521568b775ba7a31465d3af192ce382;hpb=bbd063b5c2aa055a707b472d4e0b1ed297d00674 diff --git a/Makefile b/Makefile index ae9d27672..9415e1ec9 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ INSTALL_SCRIPT = ${INSTALL_PROGRAM} EXTRAS= # place to put our device nodes -udevdir = ${prefix}/udev/ +udevdir = ${prefix}/udev # Comment out this line to build with something other # than the local version of klibc @@ -186,7 +186,7 @@ endif ifeq ($(DBUS), true) CFLAGS += -DUSE_DBUS CFLAGS += $(shell pkg-config --cflags dbus-1) - LIB_OBJS += $(shell pkg-config --libs-only-l dbus-1) + LDFLAGS += $(shell pkg-config --libs dbus-1) OBJS += udev_dbus.o endif @@ -196,13 +196,21 @@ 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_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\" >> $@ +# config files automatically generated +GEN_CONFIGS = udev.conf + +# Rules on how to create the generated config files +udev.conf: + sed -e "s-@udevdir@-$(udevdir)-" < udev.conf.in > $@ + + $(OBJS): $(GEN_HEADERS) $(ROOT): $(OBJS) @@ -212,7 +220,7 @@ $(ROOT): $(OBJS) clean: -find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \ | xargs rm -f - -rm -f core $(ROOT) $(GEN_HEADERS) + -rm -f core $(ROOT) $(GEN_HEADERS) $(GEN_CONFIGS) $(MAKE) -C klibc clean @for target in $(EXTRAS) ; do \ echo $$target ; \ @@ -265,7 +273,7 @@ uninstall-dbus-policy: - endif -install: install-dbus-policy all +install: install-dbus-policy all $(GEN_CONFIGS) $(INSTALL) -d $(DESTDIR)$(udevdir) $(INSTALL) -d $(DESTDIR)$(configdir) $(INSTALL) -d $(DESTDIR)$(hotplugdir)