From: Kay Sievers Date: Mon, 8 Jun 2009 19:36:06 +0000 (+0200) Subject: libudev: move to top-level directory X-Git-Tag: 174~996 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48a9b173e88738ff4eefb3519f1d27711b417c8d;p=systemd libudev: move to top-level directory --- diff --git a/Makefile.am b/Makefile.am index 1bb2d777..678a3e42 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/Makefile.am.inc SUBDIRS = \ + libudev \ udev \ rules \ extras diff --git a/Makefile.am.inc b/Makefile.am.inc index 7ecd55de..802143bb 100644 --- a/Makefile.am.inc +++ b/Makefile.am.inc @@ -1,8 +1,8 @@ AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ + -I$(top_builddir)/libudev \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION + -DUDEV_PREFIX=\""$(udev_prefix)"\" AM_CFLAGS = diff --git a/configure.ac b/configure.ac index 9857d52e..e9c94964 100644 --- a/configure.ac +++ b/configure.ac @@ -70,9 +70,9 @@ fi AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([ Makefile + libudev/Makefile + libudev/libudev.pc udev/Makefile - udev/lib/Makefile - udev/lib/libudev.pc rules/Makefile extras/Makefile extras/ata_id/Makefile diff --git a/extras/ata_id/Makefile.am b/extras/ata_id/Makefile.am index d31fd2c9..ffbdba32 100644 --- a/extras/ata_id/Makefile.am +++ b/extras/ata_id/Makefile.am @@ -6,10 +6,10 @@ udevhome_PROGRAMS = \ ata_id_SOURCES = \ ata_id.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../udev/udev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c dist_man_MANS = \ ata_id.8 diff --git a/extras/cdrom_id/Makefile.am b/extras/cdrom_id/Makefile.am index 51b6a20e..8e1968e6 100644 --- a/extras/cdrom_id/Makefile.am +++ b/extras/cdrom_id/Makefile.am @@ -10,10 +10,10 @@ dist_udevrules_DATA = \ cdrom_id_SOURCES = \ cdrom_id.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c dist_man_MANS = \ cdrom_id.8 diff --git a/extras/collect/Makefile.am b/extras/collect/Makefile.am index d9792b89..7ad2937f 100644 --- a/extras/collect/Makefile.am +++ b/extras/collect/Makefile.am @@ -6,7 +6,7 @@ udevhome_PROGRAMS = \ collect_SOURCES = \ collect.c \ - ../../udev/lib/libudev-private.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-util.c \ - ../../udev/lib/libudev-list.c + ../../libudev/libudev-private.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-util.c \ + ../../libudev/libudev-list.c diff --git a/extras/collect/collect.c b/extras/collect/collect.c index 3a7e826e..3284c3df 100644 --- a/extras/collect/collect.c +++ b/extras/collect/collect.c @@ -31,8 +31,8 @@ #include #include -#include "../../udev/lib/libudev.h" -#include "../../udev/lib/libudev-private.h" +#include "libudev.h" +#include "libudev-private.h" #define TMPFILE UDEV_PREFIX "/dev/.udev/collect" #define BUFSIZE 16 diff --git a/extras/edd_id/Makefile.am b/extras/edd_id/Makefile.am index 9bfe4323..7c562d3c 100644 --- a/extras/edd_id/Makefile.am +++ b/extras/edd_id/Makefile.am @@ -10,10 +10,10 @@ dist_udevrules_DATA = \ edd_id_SOURCES = \ edd_id.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c dist_man_MANS = \ edd_id.8 diff --git a/extras/floppy/Makefile.am b/extras/floppy/Makefile.am index 8cb9cbd4..2baaa10f 100644 --- a/extras/floppy/Makefile.am +++ b/extras/floppy/Makefile.am @@ -6,12 +6,12 @@ udevhome_PROGRAMS = \ create_floppy_devices_SOURCES = \ create_floppy_devices.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c \ - ../../udev/lib/libudev-device.c \ - ../../udev/lib/libudev-enumerate.c \ + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c \ + ../../libudev/libudev-device.c \ + ../../libudev/libudev-enumerate.c \ ../../udev/udev-util.c if USE_SELINUX diff --git a/extras/fstab_import/Makefile.am b/extras/fstab_import/Makefile.am index c63dc7cf..42acfd15 100644 --- a/extras/fstab_import/Makefile.am +++ b/extras/fstab_import/Makefile.am @@ -10,8 +10,8 @@ dist_udevrules_DATA = \ fstab_import_SOURCES = \ fstab_import.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c diff --git a/extras/path_id/Makefile.am b/extras/path_id/Makefile.am index 5d4bf628..867ad5ef 100644 --- a/extras/path_id/Makefile.am +++ b/extras/path_id/Makefile.am @@ -6,12 +6,12 @@ udevhome_PROGRAMS = \ path_id_SOURCES = \ path_id.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-device.c \ - ../../udev/lib/libudev-enumerate.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-device.c \ + ../../libudev/libudev-enumerate.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c dist_man_MANS = \ path_id.8 diff --git a/extras/path_id/path_id.c b/extras/path_id/path_id.c index 08b7e150..dbb52bad 100644 --- a/extras/path_id/path_id.c +++ b/extras/path_id/path_id.c @@ -28,8 +28,8 @@ #include #include -#include <../../udev/lib/libudev.h> -#include <../../udev/udev.h> +#include "libudev.h" +#include "../../udev/udev.h" int debug; @@ -366,7 +366,7 @@ int main(int argc, char **argv) if (udev == NULL) goto exit; - logging_init("usb_id"); + logging_init("path_id"); udev_set_log_fn(udev, log_fn); while (1) { diff --git a/extras/scsi_id/Makefile.am b/extras/scsi_id/Makefile.am index 29d5fe73..ffebc38e 100644 --- a/extras/scsi_id/Makefile.am +++ b/extras/scsi_id/Makefile.am @@ -10,10 +10,10 @@ scsi_id_SOURCES = \ scsi.h \ scsi_id.h \ bsg.h \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c dist_sysconf_DATA = \ scsi_id.config diff --git a/extras/usb_id/Makefile.am b/extras/usb_id/Makefile.am index 07b286d6..a9bd4070 100644 --- a/extras/usb_id/Makefile.am +++ b/extras/usb_id/Makefile.am @@ -6,12 +6,12 @@ udevhome_PROGRAMS = \ usb_id_SOURCES = \ usb_id.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c \ - ../../udev/lib/libudev-device.c \ - ../../udev/lib/libudev-enumerate.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c \ + ../../libudev/libudev-device.c \ + ../../libudev/libudev-enumerate.c dist_man_MANS = \ usb_id.8 diff --git a/udev/lib/.gitignore b/libudev/.gitignore similarity index 100% rename from udev/lib/.gitignore rename to libudev/.gitignore diff --git a/udev/lib/Makefile.am b/libudev/Makefile.am similarity index 96% rename from udev/lib/Makefile.am rename to libudev/Makefile.am index 7cd88330..1f0bf2f3 100644 --- a/udev/lib/Makefile.am +++ b/libudev/Makefile.am @@ -28,7 +28,7 @@ libudev_la_SOURCES =\ libudev_la_LDFLAGS = \ -version-info $(LIBUDEV_LT_CURRENT):$(LIBUDEV_LT_REVISION):$(LIBUDEV_LT_AGE) \ - -export-symbols $(top_srcdir)/udev/lib/exported_symbols + -export-symbols $(top_srcdir)/libudev/exported_symbols pkgconfigdir = $(prefix)/$(libdir_name)/pkgconfig pkgconfig_DATA = libudev.pc diff --git a/udev/lib/exported_symbols b/libudev/exported_symbols similarity index 100% rename from udev/lib/exported_symbols rename to libudev/exported_symbols diff --git a/udev/lib/libudev-ctrl.c b/libudev/libudev-ctrl.c similarity index 100% rename from udev/lib/libudev-ctrl.c rename to libudev/libudev-ctrl.c diff --git a/udev/lib/libudev-device-db-write.c b/libudev/libudev-device-db-write.c similarity index 100% rename from udev/lib/libudev-device-db-write.c rename to libudev/libudev-device-db-write.c diff --git a/udev/lib/libudev-device.c b/libudev/libudev-device.c similarity index 100% rename from udev/lib/libudev-device.c rename to libudev/libudev-device.c diff --git a/udev/lib/libudev-enumerate.c b/libudev/libudev-enumerate.c similarity index 100% rename from udev/lib/libudev-enumerate.c rename to libudev/libudev-enumerate.c diff --git a/udev/lib/libudev-list.c b/libudev/libudev-list.c similarity index 100% rename from udev/lib/libudev-list.c rename to libudev/libudev-list.c diff --git a/udev/lib/libudev-monitor.c b/libudev/libudev-monitor.c similarity index 100% rename from udev/lib/libudev-monitor.c rename to libudev/libudev-monitor.c diff --git a/udev/lib/libudev-private.h b/libudev/libudev-private.h similarity index 100% rename from udev/lib/libudev-private.h rename to libudev/libudev-private.h diff --git a/udev/lib/libudev-queue-export.c b/libudev/libudev-queue-export.c similarity index 100% rename from udev/lib/libudev-queue-export.c rename to libudev/libudev-queue-export.c diff --git a/udev/lib/libudev-queue.c b/libudev/libudev-queue.c similarity index 100% rename from udev/lib/libudev-queue.c rename to libudev/libudev-queue.c diff --git a/udev/lib/libudev-util.c b/libudev/libudev-util.c similarity index 100% rename from udev/lib/libudev-util.c rename to libudev/libudev-util.c diff --git a/udev/lib/libudev.c b/libudev/libudev.c similarity index 100% rename from udev/lib/libudev.c rename to libudev/libudev.c diff --git a/udev/lib/libudev.h b/libudev/libudev.h similarity index 96% rename from udev/lib/libudev.h rename to libudev/libudev.h index 241091c3..ffeb80f8 100644 --- a/udev/lib/libudev.h +++ b/libudev/libudev.h @@ -16,11 +16,6 @@ #include #include -/* this will stay as long as the DeviceKit integration of udev is work in progress */ -#if !defined _LIBUDEV_COMPILATION && !defined LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE -#error "#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE is needed to use this experimental library version" -#endif - /* * udev - library context * diff --git a/udev/lib/libudev.pc.in b/libudev/libudev.pc.in similarity index 100% rename from udev/lib/libudev.pc.in rename to libudev/libudev.pc.in diff --git a/udev/lib/test-libudev.c b/libudev/test-libudev.c similarity index 100% rename from udev/lib/test-libudev.c rename to libudev/test-libudev.c diff --git a/udev/Makefile.am b/udev/Makefile.am index 94989e64..ca5b4fae 100644 --- a/udev/Makefile.am +++ b/udev/Makefile.am @@ -1,8 +1,5 @@ include $(top_srcdir)/Makefile.am.inc -SUBDIRS = \ - lib - sbin_PROGRAMS = \ udevd \ udevadm @@ -19,18 +16,18 @@ common_files = \ udev-node.c \ udev-rules.c \ udev-util.c \ - lib/libudev.h \ - lib/libudev-private.h \ - lib/libudev.c \ - lib/libudev-list.c \ - lib/libudev-util.c \ - lib/libudev-device.c \ - lib/libudev-device-db-write.c \ - lib/libudev-monitor.c \ - lib/libudev-enumerate.c \ - lib/libudev-queue.c \ - lib/libudev-queue-export.c \ - lib/libudev-ctrl.c + ../libudev/libudev.h \ + ../libudev/libudev-private.h \ + ../libudev/libudev.c \ + ../libudev/libudev-list.c \ + ../libudev/libudev-util.c \ + ../libudev/libudev-device.c \ + ../libudev/libudev-device-db-write.c \ + ../libudev/libudev-monitor.c \ + ../libudev/libudev-enumerate.c \ + ../libudev/libudev-queue.c \ + ../libudev/libudev-queue-export.c \ + ../libudev/libudev-ctrl.c if USE_SELINUX common_files += \ diff --git a/udev/udev.h b/udev/udev.h index 71879753..8926dee9 100644 --- a/udev/udev.h +++ b/udev/udev.h @@ -22,8 +22,8 @@ #include #include -#include "lib/libudev.h" -#include "lib/libudev-private.h" +#include "libudev.h" +#include "libudev-private.h" #define DEFAULT_FAKE_PARTITIONS_COUNT 15 #define UDEV_EVENT_TIMEOUT 180