* non-Linux support for udev
@ 2007-12-28 23:18 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2007-12-28 23:18 UTC (permalink / raw)
To: linux-hotplug
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-28 23:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-28 23:18 non-Linux support for udev Samuel Thibault
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).