From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: linux-hotplug@vger.kernel.org
Subject: non-Linux support for udev
Date: Fri, 28 Dec 2007 23:18:17 +0000 [thread overview]
Message-ID: <20071228231817.GC4319@implementation> (raw)
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
Hello,
The subject of this mail may look odd, but udev's extras can indeed be
quite useful for non-Linux systems too, notably libvolume_id, which can
be used for hal. The attached patch permits to do this by simply
running
make LINUX=false EXTRAS=extras/volume_id
Samuel
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 3684 bytes --]
diff -ur udev-118-orig/Makefile udev-118/Makefile
--- udev-118-orig/Makefile 2007-12-19 00:50:56.692492000 +0100
+++ udev-118/Makefile 2007-12-29 00:22:36.982492000 +0100
@@ -42,10 +42,15 @@
# make the build silent
V =
+# Build for Linux
+LINUX = true
+
+ifeq ($(strip $(LINUX)),true)
PROGRAMS = \
udevd \
udevadm \
test-udev
+endif
HEADERS = \
udev.h \
@@ -57,6 +62,13 @@
list.h
UDEV_OBJS = \
+ udev_utils.o \
+ udev_utils_string.o \
+ udev_utils_file.o \
+ udev_sysdeps.o
+
+ifeq ($(strip $(LINUX)),true)
+UDEV_OBJS += \
udev_device.o \
udev_config.o \
udev_node.o \
@@ -64,16 +76,14 @@
udev_sysfs.o \
udev_rules.o \
udev_rules_parse.o \
- udev_utils.o \
- udev_utils_string.o \
- udev_utils_file.o \
udevmonitor.o \
udevinfo.o \
udevcontrol.o \
udevtrigger.o \
udevsettle.o \
- udevtest.o \
- udev_sysdeps.o
+ udevtest.o
+endif
+
LIBUDEV = libudev.a
MAN_PAGES = \
@@ -152,7 +162,7 @@
endif
export E Q
-all: $(PROGRAMS) $(MAN_PAGES)
+all: $(LIBUDEV) $(PROGRAMS) $(MAN_PAGES)
$(Q) extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) CC="$(CC)" \
CFLAGS="$(CFLAGS)" \
@@ -221,6 +231,7 @@
.PHONY: clean
install-config:
+ifeq ($(strip $(LINUX)),true)
$(INSTALL) -d $(DESTDIR)$(configdir)/rules.d
@ if [ ! -r $(DESTDIR)$(configdir)/udev.conf ]; then \
$(INSTALL_DATA) etc/udev/udev.conf $(DESTDIR)$(configdir); \
@@ -230,12 +241,14 @@
$(INSTALL_DATA) $$i $(DESTDIR)$(configdir)/rules.d; \
fi \
done
+endif
@ extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) -C $$target $@ || exit 1; \
done;
.PHONY: install-config
install-man:
+ifeq ($(strip $(LINUX)),true)
$(INSTALL_DATA) -D udev.7 $(DESTDIR)$(mandir)/man7/udev.7
$(INSTALL_DATA) -D udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8
$(INSTALL_DATA) -D udevadm.8 $(DESTDIR)$(mandir)/man8/udevadm.8
@@ -245,12 +258,14 @@
ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevsettle.8
ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevmonitor.8
ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevcontrol.8
+endif
@extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) -C $$target $@ || exit 1; \
done;
.PHONY: install-man
uninstall-man:
+ifeq ($(strip $(LINUX)),true)
- rm -f $(DESTDIR)$(mandir)/man7/udev.7
- rm -f $(DESTDIR)$(mandir)/man8/udevadm.8
- rm -f $(DESTDIR)$(mandir)/man8/udevinfo.8
@@ -260,12 +275,14 @@
- rm -f $(DESTDIR)$(mandir)/man8/udevsettle.8
- rm -f $(DESTDIR)$(mandir)/man8/udevmonitor.8
- rm -f $(DESTDIR)$(mandir)/man8/udevcontrol.8
+endif
@ extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) -C $$target $@ || exit 1; \
done;
.PHONY: uninstall-man
install-bin:
+ifeq ($(strip $(LINUX)),true)
$(INSTALL) -d $(DESTDIR)$(udevdir)
$(INSTALL_PROGRAM) -D udevd $(DESTDIR)$(sbindir)/udevd
$(INSTALL_PROGRAM) -D udevadm $(DESTDIR)$(sbindir)/udevadm
@@ -277,17 +294,21 @@
mkdir -p -m 0755 $(DESTDIR)$(usrbindir)
ln -f -s $(sbindir)/udevadm $(DESTDIR)$(usrbindir)/udevinfo
ln -f -s $(sbindir)/udevadm $(DESTDIR)$(usrbindir)/udevtest
+endif
@extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) -C $$target $@ || exit 1; \
done;
+ifeq ($(strip $(LINUX)),true)
ifndef DESTDIR
- killall udevd
- rm -rf /dev/.udev
- $(sbindir)/udevd --daemon
endif
+endif
.PHONY: install-bin
uninstall-bin:
+ifeq ($(strip $(LINUX)),true)
- rm -f $(DESTDIR)$(sbindir)/udevd
- rm -f $(DESTDIR)$(sbindir)/udevadm
- rm -f $(DESTDIR)$(sbindir)/udevtrigger
@@ -300,6 +321,7 @@
- killall udevd
- rm -rf /dev/.udev
endif
+endif
@extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) -C $$target $@ || exit 1; \
done;
[-- Attachment #3: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
[-- Attachment #4: Type: text/plain, Size: 226 bytes --]
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
reply other threads:[~2007-12-28 23:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071228231817.GC4319@implementation \
--to=samuel.thibault@ens-lyon.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).