[lfs-book] r9973 - in trunk: . BOOK BOOK/udev-lfs

bdubbs at linuxfromscratch.org bdubbs at linuxfromscratch.org
Fri Aug 31 19:31:17 PDT 2012


Author: bdubbs
Date: 2012-08-31 20:31:13 -0600 (Fri, 31 Aug 2012)
New Revision: 9973

Added:
   trunk/BOOK/udev-lfs/
   trunk/BOOK/udev-lfs/Makefile.lfs
   trunk/BOOK/udev-lfs/README
   trunk/BOOK/udev-lfs/cfg.h
   trunk/BOOK/udev-lfs/makefile-incl.gudev
   trunk/BOOK/udev-lfs/makefile-incl.keymap
   trunk/BOOK/udev-lfs/udevd.8
Removed:
   trunk/BOOK/udev-lfs/Makefile.lfs
   trunk/BOOK/udev-lfs/README
   trunk/BOOK/udev-lfs/cfg.h
   trunk/BOOK/udev-lfs/makefile-incl.gudev
   trunk/BOOK/udev-lfs/makefile-incl.keymap
   trunk/udev-lfs/
Modified:
   trunk/BOOK/aux-file-data.sh
   trunk/BOOK/process-scripts.sh
Log:
Move directory to make build easier

Modified: trunk/BOOK/aux-file-data.sh
===================================================================
--- trunk/BOOK/aux-file-data.sh	2012-08-31 18:32:57 UTC (rev 9972)
+++ trunk/BOOK/aux-file-data.sh	2012-09-01 02:31:13 UTC (rev 9973)
@@ -28,13 +28,3 @@
        -e s/BOOTSCRIPTS-INSTALL-KB/$bootinstallsize/ \
        -e s/BOOTSCRIPTS-MD5SUM/$bootmd5/ $FILE
 
-############
-
-# udev configuration tarball data
-#udevconfig=$(ls udev-config*.bz2)
-#udevsize=$(ls -lk $udevconfig | cut -f5 -d" ")
-#udevmd5=$(md5sum $udevconfig | cut -f1 -d" ")
-
-#sed -i -e s/UDEV-SIZE/$udevsize/ \
-#       -e s/UDEV-MD5SUM/$udevmd5/ $FILE
-

Modified: trunk/BOOK/process-scripts.sh
===================================================================
--- trunk/BOOK/process-scripts.sh	2012-08-31 18:32:57 UTC (rev 9972)
+++ trunk/BOOK/process-scripts.sh	2012-09-01 02:31:13 UTC (rev 9973)
@@ -5,7 +5,7 @@
          bootscripts/lfs/sysconfig/*    \
          bootscripts/lfs/lib/services/* \
          bootscripts/lfs/sbin/*         \
-         ../udev-lfs/*.rules
+         udev-lfs/*.rules
 do
   script=$(basename $s)
   

Deleted: trunk/BOOK/udev-lfs/Makefile.lfs
===================================================================
--- trunk/udev-lfs/Makefile.lfs	2012-07-30 17:38:02 UTC (rev 9921)
+++ trunk/BOOK/udev-lfs/Makefile.lfs	2012-09-01 02:31:13 UTC (rev 9973)
@@ -1,314 +0,0 @@
-# Custom systemd Makefile that builds/installs udev only for LFS
-# Bruce Dubbs 2012-07-11
-
-# vim: tabstop=3
-
-SHELL=/bin/bash
-VERSION=187
-
-ifeq ($(V),)
- VB = @
-else
- VB =
-endif
-
-WARN = -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 \
--Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs \
--Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self \
--Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes \
--Wstrict-prototypes -Wredundant-decls -Wmissing-declarations \
--Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align \
--Wstrict-aliasing=2 -Wwrite-strings -Wno-overlength-strings \
--Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result \
--Werror=overflow -Wp,-D_FORTIFY_SOURCE=2 -Wno-long-long 
-
-OPTIONS = -O2 -pipe -ffast-math -fno-common -fdiagnostics-show-option \
--fno-strict-aliasing -ffunction-sections -fdata-sections -fPIC
-
-OPTIONS2 := $(OPTIONS) -fvisibility=hidden
-
-LDFLAGS   = -pthread -lrt -Wl,--as-needed -Wl,--gc-sections
-LDFLAGS2 := $(LDFLAGS) -lblkid -lkmod 
-
-DEF = -include cfg.h                    \
-      -DSYSCONFDIR=\"/etc\"             \
-      -DFIRMWARE_PATH="\"/lib/firmware/updates/\", \"/lib/firmware/\"" \
-      -DUSB_DATABASE=\"/usr/share/misc/usb.ids\"                       \
-      -DPCI_DATABASE=\"/usr/share/misc/pci.ids\"                       \
-      -DROOTPREFIX=                     \
-      -DUDEVLIBEXECDIR=\"/lib/udev\"    \
-      -D_LARGEFILE_SOURCE               \
-      -D_FILE_OFFSET_BITS=64
-
-INCLUDE = -I src/libudev -I src/shared -I src -I src/login -I src/systemd
-
-LIBUDEV_SRCS = libudev-device-private.c \
-               libudev-device.c         \
-               libudev-enumerate.c      \
-               libudev-list.c           \
-               libudev-monitor.c        \
-               libudev-queue-private.c  \
-               libudev-queue.c          \
-               libudev-util.c           \
-               libudev.c
-
-LIBUDEV_OBJS := $(addprefix build/, $(LIBUDEV_SRCS:.c=.o))
-
-LIBUDEV           = libudev
-LIBUDEV_MAJOR     = .1
-LIBUDEV_MINOR     = .0
-LIBUDEV_PATCH     = .2
-LIBUDEV_SONAME    := $(LIBUDEV).so
-LIBUDEV_LINK_NAME := $(LIBUDEV_SONAME)$(LIBUDEV_MAJOR)
-LIBUDEV_REAL_NAME := $(LIBUDEV_LINK_NAME)$(LIBUDEV_MINOR)$(LIBUDEV_PATCH)
-
-COMMON_LIB = udev-local.a
-
-COMMON_SRCS = log.c         \
-              label.c       \
-              mkdir.c       \
-              cgroup-util.c \
-              strv.c        \
-              path-util.c   \
-              conf-files.c  \
-              hashmap.c     \
-              set.c         \
-              exit-status.c \
-              util.c        \
-              dev-setup.c   \
-              sd-login.c    \
-              sd-daemon.c
-
-COMMON_OBJS := $(addprefix build/, $(COMMON_SRCS:.c=.o))
-
-UDEVD_SRCS = udev-ctrl.c             \
-             udev-rules.c            \
-             udev-watch.c            \
-             udev-event.c            \
-             udev-node.c             \
-             udev-builtin.c          \
-             udev-builtin-blkid.c    \
-             udev-builtin-firmware.c \
-             udev-builtin-path_id.c  \
-             udev-builtin-hwdb.c     \
-             udev-builtin-kmod.c     \
-             udev-builtin-uaccess.c  \
-             udev-builtin-usb_id.c   \
-             udev-builtin-input_id.c
-
-UDEVD_OBJS := $(addprefix build/, $(UDEVD_SRCS:.c=.o))
-
-UDEV_ADMIN_SRCS = udevadm.c               \
-                  udevadm-test.c          \
-                  udevadm-monitor.c       \
-                  udevadm-settle.c        \
-                  udevadm-info.c          \
-                  udevadm-test-builtin.c  \
-                  udevadm-trigger.c       \
-                  udevadm-control.c       \
-                  udev-rules.c            \
-                  udev-ctrl.c             \
-                  udev-event.c            \
-                  udev-node.c             \
-                  udev-watch.c            \
-                  udev-builtin.c          \
-                  udev-builtin-blkid.c    \
-                  udev-builtin-firmware.c \
-                  udev-builtin-path_id.c  \
-                  udev-builtin-hwdb.c     \
-                  udev-builtin-kmod.c     \
-                  udev-builtin-uaccess.c  \
-                  udev-builtin-usb_id.c   \
-                  udev-builtin-input_id.c
-
-UDEV_ADMIN_OBJS := $(addprefix build/, $(UDEV_ADMIN_SRCS:.c=.o))
-
-LFS_RULES = 55-lfs.rules
-
-VPATH = src/login          src/udev          src/udev/accelerometer \
-        src/udev/scsi_id   src/udev/cdrom_id src/udev/v4l_id        \
-        src/udev/mtd_probe src/udev/collect  src/udev/ata_id        \
-        src/libudev        src/libsystemd-daemon
-
-SED_PROCESS = \
-  sed  -e 's|@VERSION@|$(VERSION)|g'       \
-       -e 's|@prefix@|/usr|g'              \
-       -e 's|@exec_prefix@|/usr|g'         \
-       -e 's|@udevlibexecdir@|/lib/udev|g' \
-       -e 's|@libdir@|/usr/lib|g'          \
-       -e 's|@includedir@|/usr/include|g'  \
-        < $< > $@
-
-
-udev: cfg.h                      \
-      build                      \
-      build/$(COMMON_LIB)        \
-      build/$(LIBUDEV_REAL_NAME) \
-      build/udevd                \
-      build/udevadm              \
-      build/accelerometer        \
-      build/ata_id               \
-      build/cdrom_id             \
-      build/scsi_id              \
-      build/v4l_id               \
-      build/mtd_probe            \
-      build/collect              \
-      build/udev.pc              \
-      build/libudev.pc
-
-build:
-	@mkdir -p build
-
-cfg.h: udev-lfs-$(VERSION)/cfg.h
-	cp udev-lfs-$(VERSION)/cfg.h .
-
-build/%o: %c
-	@echo CC $<
-	$(VB)gcc -c $(WARN) $(OPTIONS2) $(INCLUDE) $(DEF) -o $@ $<
-
-# Sources from src/libudev use -fvisibility=hidden
-build/%o: src/libudev/%c
-	@echo CC $<
-	$(VB)gcc -c $(WARN) $(OPTIONS) $(INCLUDE) $(DEF) -o $@ $<
-
-# Sources from src/shared use -fvisibility=hidden
-build/%o: src/shared/%c
-	@echo CC $<
-	$(VB)gcc -c $(WARN) $(OPTIONS) $(INCLUDE) $(DEF) -o $@ $<
-
-# Build the dynamic library
-build/$(LIBUDEV_REAL_NAME): $(LIBUDEV_OBJS) build/$(COMMON_LIB)
-	@echo LINK $@
-	$(VB)gcc -shared -fPIC -DPIC             \
-      $(LIBUDEV_OBJS)                       \
-      build/$(COMMON_LIB)                   \
-      -Wl,--no-whole-archive -ldl -lrt -O2  \
-      -Wl,--as-needed                       \
-      -Wl,--gc-sections                     \
-      -Wl,-soname,$(LIBUDEV_LINK_NAME)      \
-      -o build/$(LIBUDEV_REAL_NAME)
-
-	ln -sfn $(LIBUDEV_REAL_NAME) build/$(LIBUDEV_LINK_NAME)
-	ln -sfn $(LIBUDEV_REAL_NAME) build/$(LIBUDEV_SONAME)
-
-      #-Wl,--whole-archive                   \
-      #-Wl,--version-script=./src/libudev/libudev.sym \
-
-# Build the static library for internal use
-build/$(COMMON_LIB): $(COMMON_OBJS) $(LIBUDEV_OBJS) $(UDEVD_OBJS)
-	@echo AR $@
-	$(VB)ar rcs build/$(COMMON_LIB) $(COMMON_OBJS) $(LIBUDEV_OBJS)
-
-build/udevd: build/$(COMMON_LIB) build/udevd.o
-	@echo LINK $@
-	$(VB)gcc build/udevd.o $(UDEVD_OBJS) -o $@ $(LDFLAGS2) \
-      build/udev-local.a build/$(COMMON_LIB)
-	$(VB)strip --strip-unneeded $@
-
-build/udevadm: $(UDEV_ADMIN_OBJS)
-	@echo LINK $@
-	$(VB)gcc $(UDEV_ADMIN_OBJS) -o $@ $(LDFLAGS2) build/$(COMMON_LIB) \
-      build/udev-local.a
-	$(VB)strip --strip-unneeded $@
-
-build/accelerometer: build/accelerometer.o build/$(COMMON_LIB)
-	@echo LINK $@
-	$(VB)gcc build/accelerometer.o -o $@ \
-      build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS) -lm
-	$(VB)strip --strip-unneeded $@
-
-build/scsi_id: build/scsi_id.o build/scsi_serial.o build/$(COMMON_LIB)
-	@echo LINK $@
-	$(VB)gcc build/scsi_id.o build/scsi_serial.o -o $@ \
-      build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
-	$(VB)strip --strip-unneeded $@
-
-build/ata_id: build/ata_id.o build/$(COMMON_LIB)
-	@echo LINK $@
-	$(VB)gcc build/ata_id.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
-	$(VB)strip --strip-unneeded $@
-
-build/cdrom_id: build/cdrom_id.o build/$(COMMON_LIB)
-	@echo LINK $@
-	$(VB)gcc build/cdrom_id.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
-	$(VB)strip --strip-unneeded $@
-
-build/v4l_id: build/v4l_id.o build/$(COMMON_LIB)
-	@echo LINK $@
-	$(VB)gcc build/v4l_id.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
-	$(VB)strip --strip-unneeded $@
-
-build/mtd_probe: build/mtd_probe.o build/probe_smartmedia.o build/$(COMMON_LIB)
-	@echo LINK $@
-	$(VB)gcc build/mtd_probe.o build/probe_smartmedia.o -o $@ \
-      build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
-	$(VB)strip --strip-unneeded $@
-
-build/collect: build/collect.o build/$(COMMON_LIB)
-	@echo LINK $@
-	$(VB)gcc build/collect.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
-	$(VB)strip --strip-unneeded $@
-
-build/%pc: %pc.in
-	@echo SED $<
-	@$(SED_PROCESS)
-
-install: udev
-	@mkdir -pv $(DESTDIR)/lib/udev/devices/pts   $(DESTDIR)/lib/udev/rules.d \
-              $(DESTDIR){,/usr}/lib/firmware    $(DESTDIR)/sbin             \
-              $(DESTDIR)/usr/lib/pkgconfig      $(DESTDIR)/etc/udev/rules.d \
-              $(DESTDIR)/usr/share/doc/udev/lfs $(DESTDIR)/usr/include      \
-              $(DESTDIR)/usr/share/man/man{7,8}
-
-   # Copy executables
-	@cp -v build/udevadm                  $(DESTDIR)/sbin
-	@cp -v build/{udevd,accelerometer,ata_id,cdrom_id,collect,mtd_probe,scsi_id,v4l_id} \
-                                         $(DESTDIR)/lib/udev
-	@cp -v udev-lfs-$(VERSION)/write*     $(DESTDIR)/lib/udev
-	@cp -v udev-lfs-$(VERSION)/*functions $(DESTDIR)/lib/udev
-
-   # Copy and set up library and associated files
-	@cp -v build/{lib,}udev.pc            $(DESTDIR)/usr/lib/pkgconfig
-	@cp -v build/$(LIBUDEV_REAL_NAME)     $(DESTDIR)/lib
-
-	ln -svfn ../../lib/$(LIBUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBUDEV_SONAME)
-	ln -svfn $(LIBUDEV_REAL_NAME)           $(DESTDIR)/lib/$(LIBUDEV_LINK_NAME)
-
-   # Copy the libudev header
-	@cp -v src/libudev/libudev.h          $(DESTDIR)/usr/include
-
-   # Create null device and copy rules
-	@cp -v rules/*                        $(DESTDIR)/lib/udev/rules.d
-	@rm -v                                $(DESTDIR)/lib/udev/rules.d/99*
-	@cp -v udev-lfs-$(VERSION)/*lfs.rules $(DESTDIR)/etc/udev/rules.d
-
-   # Copy documentation
-	@cp -v man/udev.7                     $(DESTDIR)/usr/share/man/man7
-	@cp -v man/udevadm.8                  $(DESTDIR)/usr/share/man/man8
-	@cp -v udev-lfs-$(VERSION)/udevd.8    $(DESTDIR)/usr/share/man/man8/udevd.8
-	@cp -v udev-lfs-$(VERSION)/doc/*      $(DESTDIR)/usr/share/doc/udev/lfs
-
-   # Copy misc
-	@cp -v udev-lfs-$(VERSION)/init-net-rules.sh  $(DESTDIR)/lib/udev
-
-include udev-lfs-$(VERSION)/makefile-incl.gudev
-include udev-lfs-$(VERSION)/makefile-incl.gir
-include udev-lfs-$(VERSION)/makefile-incl.keymap
-
-all        : udev keymap gudev gir-data
-install-all: install install-keymap install-gudev install-gir-data
-
-clean:
-	rm -rf build
-	rm -f  cfg.h
-	rm -f src/gudev/gudevmarshal.h
-	rm -f src/gudev/gudevmarshal.c
-	rm -f src/gudev/gudevenumtypes.h
-	rm -f src/gudev/gudevenumtypes.c
-	rm -f src/udev/keymap/keys.txt
-	rm -f src/udev/keymap/keys-from-name.gperf
-	rm -f src/udev/keymap/keys-from-name.h
-	rm -f src/udev/keymap/keys-to-name.h
-
-.PHONY: clean build 
-

Copied: trunk/BOOK/udev-lfs/Makefile.lfs (from rev 9953, trunk/udev-lfs/Makefile.lfs)
===================================================================
--- trunk/BOOK/udev-lfs/Makefile.lfs	                        (rev 0)
+++ trunk/BOOK/udev-lfs/Makefile.lfs	2012-09-01 02:31:13 UTC (rev 9973)
@@ -0,0 +1,311 @@
+# Custom systemd Makefile that builds/installs udev only for LFS
+# Bruce Dubbs 2012-07-11
+
+# vim: tabstop=3
+
+SHELL=/bin/bash
+VERSION=188
+
+ifeq ($(V),)
+ VB = @
+else
+ VB =
+endif
+
+WARN = -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 \
+-Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs \
+-Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self \
+-Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes \
+-Wstrict-prototypes -Wredundant-decls -Wmissing-declarations \
+-Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align \
+-Wstrict-aliasing=2 -Wwrite-strings -Wno-overlength-strings \
+-Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result \
+-Werror=overflow -Wp,-D_FORTIFY_SOURCE=2 -Wno-long-long 
+
+OPTIONS = -O2 -pipe -ffast-math -fno-common -fdiagnostics-show-option \
+-fno-strict-aliasing -ffunction-sections -fdata-sections -fPIC
+
+OPTIONS2 := $(OPTIONS) -fvisibility=hidden
+
+LDFLAGS   = -pthread -lrt -Wl,--as-needed -Wl,--gc-sections
+LDFLAGS2 := $(LDFLAGS) -lblkid -lkmod 
+
+DEF = -include cfg.h                    \
+      -DSYSCONFDIR=\"/etc\"             \
+      -DFIRMWARE_PATH="\"/lib/firmware/updates/\", \"/lib/firmware/\"" \
+      -DUSB_DATABASE=\"/usr/share/misc/usb.ids\"                       \
+      -DPCI_DATABASE=\"/usr/share/misc/pci.ids\"                       \
+      -DROOTPREFIX=                     \
+      -DUDEVLIBEXECDIR=\"/lib/udev\"    \
+      -D_LARGEFILE_SOURCE               \
+      -D_FILE_OFFSET_BITS=64
+
+INCLUDE = -I src/libudev -I src/shared -I src -I src/login -I src/systemd
+
+LIBUDEV_SRCS = libudev-device-private.c \
+               libudev-device.c         \
+               libudev-enumerate.c      \
+               libudev-list.c           \
+               libudev-monitor.c        \
+               libudev-queue-private.c  \
+               libudev-queue.c          \
+               libudev-util.c           \
+               libudev.c
+
+LIBUDEV_OBJS := $(addprefix build/, $(LIBUDEV_SRCS:.c=.o))
+
+LIBUDEV           = libudev
+LIBUDEV_MAJOR     = .1
+LIBUDEV_MINOR     = .0
+LIBUDEV_PATCH     = .2
+LIBUDEV_SONAME    := $(LIBUDEV).so
+LIBUDEV_LINK_NAME := $(LIBUDEV_SONAME)$(LIBUDEV_MAJOR)
+LIBUDEV_REAL_NAME := $(LIBUDEV_LINK_NAME)$(LIBUDEV_MINOR)$(LIBUDEV_PATCH)
+
+COMMON_LIB = udev-local.a
+
+COMMON_SRCS = log.c         \
+              label.c       \
+              mkdir.c       \
+              cgroup-util.c \
+              strv.c        \
+              path-util.c   \
+              conf-files.c  \
+              hashmap.c     \
+              set.c         \
+              exit-status.c \
+              util.c        \
+              dev-setup.c   \
+              sd-login.c    \
+              sd-daemon.c
+
+COMMON_OBJS := $(addprefix build/, $(COMMON_SRCS:.c=.o))
+
+UDEVD_SRCS = udev-ctrl.c             \
+             udev-rules.c            \
+             udev-watch.c            \
+             udev-event.c            \
+             udev-node.c             \
+             udev-builtin.c          \
+             udev-builtin-blkid.c    \
+             udev-builtin-firmware.c \
+             udev-builtin-path_id.c  \
+             udev-builtin-hwdb.c     \
+             udev-builtin-kmod.c     \
+             udev-builtin-uaccess.c  \
+             udev-builtin-usb_id.c   \
+             udev-builtin-input_id.c
+
+UDEVD_OBJS := $(addprefix build/, $(UDEVD_SRCS:.c=.o))
+
+UDEV_ADMIN_SRCS = udevadm.c               \
+                  udevadm-test.c          \
+                  udevadm-monitor.c       \
+                  udevadm-settle.c        \
+                  udevadm-info.c          \
+                  udevadm-test-builtin.c  \
+                  udevadm-trigger.c       \
+                  udevadm-control.c       \
+                  udev-rules.c            \
+                  udev-ctrl.c             \
+                  udev-event.c            \
+                  udev-node.c             \
+                  udev-watch.c            \
+                  udev-builtin.c          \
+                  udev-builtin-blkid.c    \
+                  udev-builtin-firmware.c \
+                  udev-builtin-path_id.c  \
+                  udev-builtin-hwdb.c     \
+                  udev-builtin-kmod.c     \
+                  udev-builtin-uaccess.c  \
+                  udev-builtin-usb_id.c   \
+                  udev-builtin-input_id.c
+
+UDEV_ADMIN_OBJS := $(addprefix build/, $(UDEV_ADMIN_SRCS:.c=.o))
+
+LFS_RULES = 55-lfs.rules
+
+VPATH = src/login          src/udev          src/udev/accelerometer \
+        src/udev/scsi_id   src/udev/cdrom_id src/udev/v4l_id        \
+        src/udev/mtd_probe src/udev/collect  src/udev/ata_id        \
+        src/libudev        src/libsystemd-daemon
+
+SED_PROCESS = \
+  sed  -e 's|@VERSION@|$(VERSION)|g'       \
+       -e 's|@prefix@|/usr|g'              \
+       -e 's|@exec_prefix@|/usr|g'         \
+       -e 's|@udevlibexecdir@|/lib/udev|g' \
+       -e 's|@libdir@|/usr/lib|g'          \
+       -e 's|@includedir@|/usr/include|g'  \
+        < $< > $@
+
+
+udev: common                     \
+      build/$(COMMON_LIB)        \
+      build/$(LIBUDEV_REAL_NAME) \
+      build/udevd                \
+      build/udevadm              \
+      build/accelerometer        \
+      build/ata_id               \
+      build/cdrom_id             \
+      build/scsi_id              \
+      build/v4l_id               \
+      build/mtd_probe            \
+      build/collect              \
+      build/udev.pc              \
+      build/libudev.pc
+
+common: udev-lfs-$(VERSION)/cfg.h
+	@mkdir -p build
+	cp udev-lfs-$(VERSION)/cfg.h .
+
+build/%o: %c
+	@echo CC $<
+	$(VB)gcc -c $(WARN) $(OPTIONS2) $(INCLUDE) $(DEF) -o $@ $<
+
+# Sources from src/libudev use -fvisibility=hidden
+build/%o: src/libudev/%c
+	@echo CC $<
+	$(VB)gcc -c $(WARN) $(OPTIONS) $(INCLUDE) $(DEF) -o $@ $<
+
+# Sources from src/shared use -fvisibility=hidden
+build/%o: src/shared/%c
+	@echo CC $<
+	$(VB)gcc -c $(WARN) $(OPTIONS) $(INCLUDE) $(DEF) -o $@ $<
+
+# Build the dynamic library
+build/$(LIBUDEV_REAL_NAME): $(LIBUDEV_OBJS) build/$(COMMON_LIB)
+	@echo LINK $@
+	$(VB)gcc -shared -fPIC -DPIC             \
+      $(LIBUDEV_OBJS)                       \
+      build/$(COMMON_LIB)                   \
+      -Wl,--no-whole-archive -ldl -lrt -O2  \
+      -Wl,--as-needed                       \
+      -Wl,--gc-sections                     \
+      -Wl,-soname,$(LIBUDEV_LINK_NAME)      \
+      -o build/$(LIBUDEV_REAL_NAME)
+
+	ln -sfn $(LIBUDEV_REAL_NAME) build/$(LIBUDEV_LINK_NAME)
+	ln -sfn $(LIBUDEV_REAL_NAME) build/$(LIBUDEV_SONAME)
+
+      #-Wl,--whole-archive                   \
+      #-Wl,--version-script=./src/libudev/libudev.sym \
+
+# Build the static library for internal use
+build/$(COMMON_LIB): $(COMMON_OBJS) $(LIBUDEV_OBJS) $(UDEVD_OBJS)
+	@echo AR $@
+	$(VB)ar rcs build/$(COMMON_LIB) $(COMMON_OBJS) $(LIBUDEV_OBJS)
+
+build/udevd: build/$(COMMON_LIB) build/udevd.o
+	@echo LINK $@
+	$(VB)gcc build/udevd.o $(UDEVD_OBJS) -o $@ $(LDFLAGS2) \
+      build/udev-local.a build/$(COMMON_LIB)
+	$(VB)strip --strip-unneeded $@
+
+build/udevadm: $(UDEV_ADMIN_OBJS)
+	@echo LINK $@
+	$(VB)gcc $(UDEV_ADMIN_OBJS) -o $@ $(LDFLAGS2) build/$(COMMON_LIB) \
+      build/udev-local.a
+	$(VB)strip --strip-unneeded $@
+
+build/accelerometer: build/accelerometer.o build/$(COMMON_LIB)
+	@echo LINK $@
+	$(VB)gcc build/accelerometer.o -o $@ \
+      build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS) -lm
+	$(VB)strip --strip-unneeded $@
+
+build/scsi_id: build/scsi_id.o build/scsi_serial.o build/$(COMMON_LIB)
+	@echo LINK $@
+	$(VB)gcc build/scsi_id.o build/scsi_serial.o -o $@ \
+      build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
+	$(VB)strip --strip-unneeded $@
+
+build/ata_id: build/ata_id.o build/$(COMMON_LIB)
+	@echo LINK $@
+	$(VB)gcc build/ata_id.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
+	$(VB)strip --strip-unneeded $@
+
+build/cdrom_id: build/cdrom_id.o build/$(COMMON_LIB)
+	@echo LINK $@
+	$(VB)gcc build/cdrom_id.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
+	$(VB)strip --strip-unneeded $@
+
+build/v4l_id: build/v4l_id.o build/$(COMMON_LIB)
+	@echo LINK $@
+	$(VB)gcc build/v4l_id.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
+	$(VB)strip --strip-unneeded $@
+
+build/mtd_probe: build/mtd_probe.o build/probe_smartmedia.o build/$(COMMON_LIB)
+	@echo LINK $@
+	$(VB)gcc build/mtd_probe.o build/probe_smartmedia.o -o $@ \
+      build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
+	$(VB)strip --strip-unneeded $@
+
+build/collect: build/collect.o build/$(COMMON_LIB)
+	@echo LINK $@
+	$(VB)gcc build/collect.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS)
+	$(VB)strip --strip-unneeded $@
+
+build/%pc: %pc.in
+	@echo GEN $@
+	@$(SED_PROCESS)
+
+install: udev
+	@mkdir -pv $(DESTDIR)/lib/udev/devices/pts   $(DESTDIR)/lib/udev/rules.d \
+              $(DESTDIR){,/usr}/lib/firmware    $(DESTDIR)/sbin             \
+              $(DESTDIR)/usr/lib/pkgconfig      $(DESTDIR)/etc/udev/rules.d \
+              $(DESTDIR)/usr/share/doc/udev/lfs $(DESTDIR)/usr/include      \
+              $(DESTDIR)/usr/share/man/man{7,8}
+
+   # Copy executables
+	@cp -v build/udevadm                  $(DESTDIR)/sbin
+	@cp -v build/{udevd,accelerometer,ata_id,cdrom_id,collect,mtd_probe,scsi_id,v4l_id} \
+                                         $(DESTDIR)/lib/udev
+	@cp -v udev-lfs-$(VERSION)/write*     $(DESTDIR)/lib/udev
+	@cp -v udev-lfs-$(VERSION)/*functions $(DESTDIR)/lib/udev
+
+   # Copy and set up library and associated files
+	@cp -v build/{lib,}udev.pc            $(DESTDIR)/usr/lib/pkgconfig
+	@cp -v build/$(LIBUDEV_REAL_NAME)     $(DESTDIR)/lib
+
+	ln -svfn ../../lib/$(LIBUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBUDEV_SONAME)
+	ln -svfn $(LIBUDEV_REAL_NAME)           $(DESTDIR)/lib/$(LIBUDEV_LINK_NAME)
+
+   # Copy the libudev header
+	@cp -v src/libudev/libudev.h          $(DESTDIR)/usr/include
+
+   # Create null device and copy rules
+	@cp -v rules/*                        $(DESTDIR)/lib/udev/rules.d
+	@rm -v                                $(DESTDIR)/lib/udev/rules.d/99*
+	@cp -v udev-lfs-$(VERSION)/*lfs.rules $(DESTDIR)/etc/udev/rules.d
+
+   # Copy documentation
+	@cp -v man/udev.7                     $(DESTDIR)/usr/share/man/man7
+	@cp -v man/udevadm.8                  $(DESTDIR)/usr/share/man/man8
+	@cp -v udev-lfs-$(VERSION)/udevd.8    $(DESTDIR)/usr/share/man/man8/udevd.8
+	@cp -v udev-lfs-$(VERSION)/doc/*      $(DESTDIR)/usr/share/doc/udev/lfs
+
+   # Copy misc
+	@cp -v udev-lfs-$(VERSION)/init-net-rules.sh  $(DESTDIR)/lib/udev
+
+include udev-lfs-$(VERSION)/makefile-incl.gudev
+include udev-lfs-$(VERSION)/makefile-incl.gir
+include udev-lfs-$(VERSION)/makefile-incl.keymap
+
+all        : udev keymap gudev gir-data
+install-all: install install-keymap install-gudev install-gir-data
+
+clean:
+	rm -rf build
+	rm -f  cfg.h
+	rm -f src/gudev/gudevmarshal.h
+	rm -f src/gudev/gudevmarshal.c
+	rm -f src/gudev/gudevenumtypes.h
+	rm -f src/gudev/gudevenumtypes.c
+	rm -f src/udev/keymap/keys.txt
+	rm -f src/udev/keymap/keys-from-name.gperf
+	rm -f src/udev/keymap/keys-from-name.h
+	rm -f src/udev/keymap/keys-to-name.h
+
+.PHONY: clean build 
+

Deleted: trunk/BOOK/udev-lfs/README
===================================================================
--- trunk/udev-lfs/README	2012-07-30 17:38:02 UTC (rev 9921)
+++ trunk/BOOK/udev-lfs/README	2012-09-01 02:31:13 UTC (rev 9973)
@@ -1,42 +0,0 @@
-The udev-lfs set of files is a customization of systemd.
-In 2012, udev was merged with systemd and a build methodology
-incompatible with LFS.  These files extract the udev
-code from systemd for LFS.
-
-These files are distributed in the form of a tar file available
-from the LFS file mirrors.  The tarball is created with:
-
-mkdir /tmp/udev-lfs-$VERSION
-cp av * /tmp/udev-lfs-$VERSION
-tar -jcf /tmp/udev-lfs-$VERSION.tar.bz2 -C /tmp udev-lfs-$VERSION
-
-Makefile.lfs         - The main LFS Makefile.  Builds and installs
-                       udev from systemd sources.
-
-makefile-incl.keymap - BLFS makefile for keymap and supporting files
-makefile-incl.gudev  - BLFS makefile for libgudev
-makefile-incl.gir    - BLFS makefile for GObject files
-
-
-contrib              - Useful rules from debian
-contrib/debian
-contrib/debian/83-cdrom-symlinks.rules
-contrib/debian/write_cd_aliases
-contrib/debian/81-cdrom.rules
-
-55-lfs.rules         - LFS custom rules
-write_net_rules      - Scripts for LFS rules
-write_cd_rules
-rule_generator.functions
-
-doc                  - Documentation for LFS installed rules
-doc/55-lfs.txt
-doc/README
-
-cfg.h                - Basic info needed for udev compilation
-
-ChangeLog            - Log of changes to 55-lfs-rules
-
-init-net-rules.sh    - A script for establishing persistent network
-                       rules before the first LFS boot
-

Copied: trunk/BOOK/udev-lfs/README (from rev 9932, trunk/udev-lfs/README)
===================================================================
--- trunk/BOOK/udev-lfs/README	                        (rev 0)
+++ trunk/BOOK/udev-lfs/README	2012-09-01 02:31:13 UTC (rev 9973)
@@ -0,0 +1,42 @@
+The udev-lfs set of files is a customization of systemd.
+In 2012, udev was merged with systemd and a build methodology
+incompatible with LFS.  These files extract the udev
+code from systemd for LFS.
+
+These files are distributed in the form of a tar file available
+from the LFS file mirrors.  The tarball is created with:
+
+mkdir /tmp/udev-lfs-$VERSION
+cp -av * /tmp/udev-lfs-$VERSION
+tar -jcf /tmp/udev-lfs-$VERSION.tar.bz2 -C /tmp udev-lfs-$VERSION
+
+Makefile.lfs         - The main LFS Makefile.  Builds and installs
+                       udev from systemd sources.
+
+makefile-incl.keymap - BLFS makefile for keymap and supporting files
+makefile-incl.gudev  - BLFS makefile for libgudev
+makefile-incl.gir    - BLFS makefile for GObject files
+
+
+contrib              - Useful rules from debian
+contrib/debian
+contrib/debian/83-cdrom-symlinks.rules
+contrib/debian/write_cd_aliases
+contrib/debian/81-cdrom.rules
+
+55-lfs.rules         - LFS custom rules
+write_net_rules      - Scripts for LFS rules
+write_cd_rules
+rule_generator.functions
+
+doc                  - Documentation for LFS installed rules
+doc/55-lfs.txt
+doc/README
+
+cfg.h                - Basic info needed for udev compilation
+
+ChangeLog            - Log of changes to 55-lfs-rules
+
+init-net-rules.sh    - A script for establishing persistent network
+                       rules before the first LFS boot
+

Deleted: trunk/BOOK/udev-lfs/cfg.h
===================================================================
--- trunk/udev-lfs/cfg.h	2012-07-30 17:38:02 UTC (rev 9921)
+++ trunk/BOOK/udev-lfs/cfg.h	2012-09-01 02:31:13 UTC (rev 9973)
@@ -1,44 +0,0 @@
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define if XZ is available */
-#define HAVE_XZ 1
-
-/* Name of package */
-#define PACKAGE "udev"
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Enable GNU extensions on systems that have them.  */
-# define _GNU_SOURCE 1
-/* Version number of package */
-#define VERSION "187"
-

Copied: trunk/BOOK/udev-lfs/cfg.h (from rev 9932, trunk/udev-lfs/cfg.h)
===================================================================
--- trunk/BOOK/udev-lfs/cfg.h	                        (rev 0)
+++ trunk/BOOK/udev-lfs/cfg.h	2012-09-01 02:31:13 UTC (rev 9973)
@@ -0,0 +1,44 @@
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define if XZ is available */
+#define HAVE_XZ 1
+
+/* Name of package */
+#define PACKAGE "udev"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Enable GNU extensions on systems that have them.  */
+# define _GNU_SOURCE 1
+/* Version number of package */
+#define VERSION "188"
+

Deleted: trunk/BOOK/udev-lfs/makefile-incl.gudev
===================================================================
--- trunk/udev-lfs/makefile-incl.gudev	2012-07-30 17:38:02 UTC (rev 9921)
+++ trunk/BOOK/udev-lfs/makefile-incl.gudev	2012-09-01 02:31:13 UTC (rev 9973)
@@ -1,106 +0,0 @@
-# Custom systemd Makefile include that builds/installs gudev only for LFS
-
-# vim: tabstop=3
-
-LIBGUDEV_SRCS =      \
-   gudevclient.c     \
-   gudevdevice.c     \
-   gudevenumerator.c \
-   gudevenumtypes.c  \
-   gudevmarshal.c
-
-LIBGUDEV_INCLUDES =           \
-   src/gudev/gudev.h          \
-   src/gudev/gudevenums.h     \
-   src/gudev/gudevenumtypes.h \
-   src/gudev/gudevtypes.h     \
-   src/gudev/gudevclient.h    \
-   src/gudev/gudevdevice.h    \
-   src/gudev/gudevenumerator.h
-
-LIBGUDEV_OBJS := $(addprefix build/, $(LIBGUDEV_SRCS:.c=.o))
-
-LIBGUDEV_CFLAGS =             \
-   -I src/gudev               \
-   -D_POSIX_PTHREAD_SEMANTICS \
-   -D_REENTRANT               \
-   -D_GUDEV_COMPILATION       \
-   -DG_LOG_DOMAIN=\"GUdev\"   \
-   -fvisibility=default       \
-   -I /usr/include/glib-2.0   \
-   -I /usr/lib/glib-2.0/include
-
-LIBGUDEV_LDFLAGS =      \
-   -L build -L /usr/lib \
-   -ludev -lgobject-2.0 \
-   -lglib-2.0
-
-GUDEV_GENERATED =             \
-   src/gudev/gudevmarshal.h   \
-   src/gudev/gudevmarshal.c   \
-   src/gudev/gudevenumtypes.h \
-   src/gudev/gudevenumtypes.c
-
-LIBGUDEV            = libgudev-1.0
-LIBGUDEV_MAJOR      = .0
-LIBGUDEV_MINOR      = .1
-LIBGUDEV_PATCH      = .2
-LIBGUDEV_SONAME    := $(LIBGUDEV).so
-LIBGUDEV_LINK_NAME := $(LIBGUDEV_SONAME)$(LIBGUDEV_MAJOR)
-LIBGUDEV_REAL_NAME := $(LIBGUDEV_LINK_NAME)$(LIBGUDEV_MINOR)$(LIBGUDEV_PATCH)
-
-src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
-	@echo GEN $@
-	$(VB)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
-
-src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
-	@echo GEN $@
-	@echo "#include \"gudevmarshal.h\"" > $@
-	$(VB)glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
-
-src/gudev/gudevenumtypes.h: src/gudev/gudevenumtypes.h.template src/gudev/gudevenums.h
-	@echo GEN $@
-	$(VB)glib-mkenums --template $^ > $@
-
-src/gudev/gudevenumtypes.c: src/gudev/gudevenumtypes.c.template src/gudev/gudevenums.h 
-	@echo GEN $@
-	$(VB)glib-mkenums --template $^ > $@
-
-build/%o: src/gudev/%c build cfg.h $(GUDEV_GENERATED)
-	@echo CCGUDEV $<
-	$(VB)gcc -c $(LIBGUDEV_CFLAGS) $(WARN) $(OPTIONS) $(INCLUDE) $(DEF) -o $@ $<
-
-build/$(LIBGUDEV_REAL_NAME): $(LIBGUDEV_OBJS) build/udev-local.a build/$(LIBUDEV_REAL_NAME)
-	@echo LINK $@
-	$(VB)gcc -shared -Wl,--export-dynamic -Wl,-soname,$(LIBGUDEV_LINK_NAME) \
-   -o build/$(LIBGUDEV_REAL_NAME) $(LIBGUDEV_OBJS) $(LIBGUDEV_LDFLAGS)
-
-	ln -sfn $(LIBGUDEV_REAL_NAME) build/$(LIBGUDEV_LINK_NAME)
-	ln -sfn $(LIBGUDEV_REAL_NAME) build/$(LIBGUDEV_SONAME)
-
-VPATH += src/gudev
-
-gudev: build cfg.h build/$(LIBGUDEV_REAL_NAME) build/gudev-1.0.pc
-
-clean-gudev:
-	rm -f src/gudev/gudevmarshal.h
-	rm -f src/gudev/gudevmarshal.c
-	rm -f src/gudev/gudevenumtypes.h
-	rm -f src/gudev/gudevenumtypes.c
-	rm -f $(LIBGUDEV_OBJS)
-	rm -f build/libgudev-1.0.so*
-
-install-gudev: gudev
-	@mkdir -pv $(DESTDIR)/usr/include/gudev-1.0/gudev \
-              $(DESTDIR)/usr/lib/pkgconfig           \
-              $(DESTDIR)/usr/share/gtk-doc/html/gudev
-
-	@cp -v $(LIBGUDEV_INCLUDES)        $(DESTDIR)/usr/include/gudev-1.0/gudev
-	@cp -v build/$(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib
-
-	@ln -svfn $(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBGUDEV_SONAME)
-	@ln -svfn $(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBGUDEV_LINK_NAME)
-
-	@cp -v build/gudev-1.0.pc       $(DESTDIR)/usr/lib/pkgconfig/gudev-1.0.pc
-	@cp -v docs/gudev/html/*        $(DESTDIR)/usr/share/gtk-doc/html/gudev
-

Copied: trunk/BOOK/udev-lfs/makefile-incl.gudev (from rev 9953, trunk/udev-lfs/makefile-incl.gudev)
===================================================================
--- trunk/BOOK/udev-lfs/makefile-incl.gudev	                        (rev 0)
+++ trunk/BOOK/udev-lfs/makefile-incl.gudev	2012-09-01 02:31:13 UTC (rev 9973)
@@ -0,0 +1,108 @@
+# Custom systemd Makefile include that builds/installs gudev only for LFS
+
+# vim: tabstop=3
+
+LIBGUDEV_SRCS =      \
+   gudevclient.c     \
+   gudevdevice.c     \
+   gudevenumerator.c \
+   gudevenumtypes.c  \
+   gudevmarshal.c
+
+LIBGUDEV_INCLUDES =           \
+   src/gudev/gudev.h          \
+   src/gudev/gudevenums.h     \
+   src/gudev/gudevenumtypes.h \
+   src/gudev/gudevtypes.h     \
+   src/gudev/gudevclient.h    \
+   src/gudev/gudevdevice.h    \
+   src/gudev/gudevenumerator.h
+
+LIBGUDEV_OBJS := $(addprefix build/, $(LIBGUDEV_SRCS:.c=.o))
+
+LIBGUDEV_CFLAGS =             \
+   -I src/gudev               \
+   -D_POSIX_PTHREAD_SEMANTICS \
+   -D_REENTRANT               \
+   -D_GUDEV_COMPILATION       \
+   -DG_LOG_DOMAIN=\"GUdev\"   \
+   -fvisibility=default       \
+   -I /usr/include/glib-2.0   \
+   -I /usr/lib/glib-2.0/include
+
+LIBGUDEV_LDFLAGS =      \
+   -L build -L /usr/lib \
+   -ludev -lgobject-2.0 \
+   -lglib-2.0
+
+GUDEV_GENERATED =             \
+   src/gudev/gudevmarshal.h   \
+   src/gudev/gudevmarshal.c   \
+   src/gudev/gudevenumtypes.h \
+   src/gudev/gudevenumtypes.c
+
+LIBGUDEV            = libgudev-1.0
+LIBGUDEV_MAJOR      = .0
+LIBGUDEV_MINOR      = .1
+LIBGUDEV_PATCH      = .2
+LIBGUDEV_SONAME    := $(LIBGUDEV).so
+LIBGUDEV_LINK_NAME := $(LIBGUDEV_SONAME)$(LIBGUDEV_MAJOR)
+LIBGUDEV_REAL_NAME := $(LIBGUDEV_LINK_NAME)$(LIBGUDEV_MINOR)$(LIBGUDEV_PATCH)
+
+src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
+	@echo GEN $@
+	$(VB)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
+
+src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
+	@echo GEN $@
+	@echo "#include \"gudevmarshal.h\"" > $@
+	$(VB)glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
+
+src/gudev/gudevenumtypes.h: src/gudev/gudevenumtypes.h.template src/gudev/gudevenums.h
+	@echo GEN $@
+	$(VB)glib-mkenums --template $^ > $@
+
+src/gudev/gudevenumtypes.c: src/gudev/gudevenumtypes.c.template src/gudev/gudevenums.h 
+	@echo GEN $@
+	$(VB)glib-mkenums --template $^ > $@
+
+build/%o: src/gudev/%c $(GUDEV_GENERATED) common
+	@echo CC $<
+	$(VB)gcc -c $(LIBGUDEV_CFLAGS) $(WARN) $(OPTIONS) $(INCLUDE) $(DEF) -o $@ $<
+
+build/$(LIBGUDEV_REAL_NAME): $(LIBGUDEV_OBJS) build/udev-local.a build/$(LIBUDEV_REAL_NAME)
+	@echo LINK $@
+	$(VB)gcc -shared -Wl,--export-dynamic -Wl,-soname,$(LIBGUDEV_LINK_NAME) \
+   -o build/$(LIBGUDEV_REAL_NAME) $(LIBGUDEV_OBJS) $(LIBGUDEV_LDFLAGS)
+
+	ln -sfn $(LIBGUDEV_REAL_NAME) build/$(LIBGUDEV_LINK_NAME)
+	ln -sfn $(LIBGUDEV_REAL_NAME) build/$(LIBGUDEV_SONAME)
+
+build/gudev-1.0.pc: src/gudev/gudev-1.0.pc.in
+	@echo GEN $@
+	@$(SED_PROCESS)
+
+gudev: build/$(LIBGUDEV_REAL_NAME) build/gudev-1.0.pc
+
+clean-gudev:
+	rm -f src/gudev/gudevmarshal.h
+	rm -f src/gudev/gudevmarshal.c
+	rm -f src/gudev/gudevenumtypes.h
+	rm -f src/gudev/gudevenumtypes.c
+	rm -f $(LIBGUDEV_OBJS)
+	rm -f build/libgudev-1.0.so*
+
+install-gudev: gudev
+	@mkdir -pv $(DESTDIR)/usr/include/gudev-1.0/gudev \
+              $(DESTDIR)/usr/lib/pkgconfig           \
+              $(DESTDIR)/usr/share/gtk-doc/html/gudev
+
+	@cp -v $(LIBGUDEV_INCLUDES)        $(DESTDIR)/usr/include/gudev-1.0/gudev
+	@cp -v build/$(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib
+
+	@ln -svfn $(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBGUDEV_SONAME)
+	@ln -svfn $(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBGUDEV_LINK_NAME)
+
+	@cp -v build/gudev-1.0.pc       $(DESTDIR)/usr/lib/pkgconfig
+	@cp -v docs/gudev/html/*        $(DESTDIR)/usr/share/gtk-doc/html/gudev
+

Deleted: trunk/BOOK/udev-lfs/makefile-incl.keymap
===================================================================
--- trunk/udev-lfs/makefile-incl.keymap	2012-07-30 17:38:02 UTC (rev 9921)
+++ trunk/BOOK/udev-lfs/makefile-incl.keymap	2012-09-01 02:31:13 UTC (rev 9973)
@@ -1,151 +0,0 @@
-# Custom systemd Makefile include that builds/installs gir only for LFS
-
-# vim: tabstop=3
-
-KEYMAPS =                                          \
-   keymaps/acer                                    \
-   keymaps/acer-aspire_5720                        \
-   keymaps/acer-aspire_8930                        \
-   keymaps/acer-aspire_5920g                       \
-   keymaps/acer-aspire_6920                        \
-   keymaps/acer-travelmate_c300                    \
-   keymaps/asus                                    \
-   keymaps/compaq-e_evo                            \
-   keymaps/dell                                    \
-   keymaps/dell-latitude-xt2                       \
-   keymaps/everex-xt5000                           \
-   keymaps/fujitsu-amilo_li_2732                   \
-   keymaps/fujitsu-amilo_pa_2548                   \
-   keymaps/fujitsu-amilo_pro_edition_v3505         \
-   keymaps/fujitsu-amilo_pro_v3205                 \
-   keymaps/fujitsu-amilo_si_1520                   \
-   keymaps/fujitsu-esprimo_mobile_v5               \
-   keymaps/fujitsu-esprimo_mobile_v6               \
-   keymaps/genius-slimstar-320                     \
-   keymaps/hewlett-packard                         \
-   keymaps/hewlett-packard-2510p_2530p             \
-   keymaps/hewlett-packard-compaq_elitebook        \
-   keymaps/hewlett-packard-pavilion                \
-   keymaps/hewlett-packard-presario-2100           \
-   keymaps/hewlett-packard-tablet                  \
-   keymaps/hewlett-packard-tx2                     \
-   keymaps/ibm-thinkpad-usb-keyboard-trackpoint    \
-   keymaps/inventec-symphony_6.0_7.0               \
-   keymaps/lenovo-3000                             \
-   keymaps/lenovo-ideapad                          \
-   keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
-   keymaps/lenovo-thinkpad_x6_tablet               \
-   keymaps/lenovo-thinkpad_x200_tablet             \
-   keymaps/lg-x110                                 \
-   keymaps/logitech-wave                           \
-   keymaps/logitech-wave-cordless                  \
-   keymaps/logitech-wave-pro-cordless              \
-   keymaps/maxdata-pro_7000                        \
-   keymaps/medion-fid2060                          \
-   keymaps/medionnb-a555                           \
-   keymaps/micro-star                              \
-   keymaps/module-asus-w3j                         \
-   keymaps/module-ibm                              \
-   keymaps/module-lenovo                           \
-   keymaps/module-sony                             \
-   keymaps/module-sony-old                         \
-   keymaps/module-sony-vgn                         \
-   keymaps/olpc-xo                                 \
-   keymaps/onkyo                                   \
-   keymaps/oqo-model2                              \
-   keymaps/samsung-other                           \
-   keymaps/samsung-90x3a                           \
-   keymaps/samsung-sq1us                           \
-   keymaps/samsung-sx20s                           \
-   keymaps/toshiba-satellite_a100                  \
-   keymaps/toshiba-satellite_a110                  \
-   keymaps/toshiba-satellite_m30x                  \
-   keymaps/zepto-znote
-
-KEYMAPS_FR =                           \
-   keymaps-force-release/dell-touchpad \
-   keymaps-force-release/dell-xps      \
-   keymaps-force-release/hp-other      \
-   keymaps-force-release/samsung-other \
-   keymaps-force-release/samsung-90x3a \
-   keymaps-force-release/common-volume-keys
-
-KEYMAP_DEPS = src/udev/keymap/keys-from-name.h src/udev/keymap/keys-to-name.h
-
-src/udev/keymap/keys.txt:
-	@echo AWK $@
-	$(VB)awk '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ \
-   {                                         \
-     if ($$2 != "KEY_MAX") { print $$2 }     \
-   }'                                        \
-   /usr/include/linux/input.h | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
-
-src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt
-	@echo AWK $@
-	$(VB)awk 'BEGIN                       \
-   {                                    \
-     print "struct key                  \
-     {                                  \
-       const char* name;                \
-       unsigned short id;               \
-     };";                               \
-                                        \
-     print "%null-strings"; print "%%"; \
-   }                                    \
-   {                                    \
-     print $$1 ", " $$1                 \
-   }' $< > $@
-
-src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf
-	@echo GPERF $@
-	$(VB)gperf -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C $< > $@
-
-src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt 
-	@echo AWK $@
-	$(VB)awk 'BEGIN                                     \
-   {                                                   \
-     print "const char* const key_names[KEY_CNT] = { " \
-   }                                                   \
-   {                                                   \
-     print "[" $$1 "] = \"" $$1 "\","                  \
-   }                                                   \
-   END{print "};"                                      \
-   }' $< > $@
-
-build/keymap: src/udev/keymap/keymap.c build/$(COMMON_LIB) $(KEYMAP_DEPS)
-	@echo LINK $@
-	$(VB)gcc $< -o $@ -I src/udev/keymap $(WARN) $(OPTIONS2) $(INCLUDE) $(DEF) \
-      build/$(COMMON_LIB) $(LDFLAGS)
-	$(VB)strip --strip-unneeded $@
-
-keymap: build/keymap
-
-install-keymap: keymap
-	@mkdir -pv $(DESTDIR)/lib/udev/keymaps/force-release \
-              $(DESTDIR)/lib/udev/rules.d               \
-              $(DESTDIR)/usr/share/doc/udev
-
-	@cp -v build/keymap  $(DESTDIR)/lib/udev
-
-	@cp -v $(KEYMAPS)    $(DESTDIR)/lib/udev/keymaps
-	@cp -v $(KEYMAPS_FR) $(DESTDIR)/lib/udev/keymaps/force-release
-
-	@cp -v src/udev/keymap/*.rules       $(DESTDIR)/lib/udev/rules.d
-	@cp -v src/udev/keymap/findkeyboards $(DESTDIR)/lib/udev
-
-	@cp -v src/udev/keymap/*.txt $(DESTDIR)/usr/share/doc/udev
-
-	@sed -e 's|@udevlibexecdir@|/lib/udev|g'              \
-            src/udev/keymap/keyboard-force-release.sh.in \
-            > $(DESTDIR)/lib/udev/keyboard-force-release.sh
-
-	@chmod 0755 $(DESTDIR)/lib/udev/keyboard-force-release.sh
-
-clean-keymap:
-	rm -f src/udev/keymap/keys.txt
-	rm -f src/udev/keymap/keys-from-name.gperf
-	rm -f src/udev/keymap/keys-from-name.h
-	rm -f src/udev/keymap/keys-to-name.h
-	rm -f build/keymap
-
-.PHONY: clean-keymap

Copied: trunk/BOOK/udev-lfs/makefile-incl.keymap (from rev 9953, trunk/udev-lfs/makefile-incl.keymap)
===================================================================
--- trunk/BOOK/udev-lfs/makefile-incl.keymap	                        (rev 0)
+++ trunk/BOOK/udev-lfs/makefile-incl.keymap	2012-09-01 02:31:13 UTC (rev 9973)
@@ -0,0 +1,151 @@
+# Custom systemd Makefile include that builds/installs keymap tool only for LFS
+
+# vim: tabstop=3
+
+KEYMAPS =                                          \
+   keymaps/acer                                    \
+   keymaps/acer-aspire_5720                        \
+   keymaps/acer-aspire_8930                        \
+   keymaps/acer-aspire_5920g                       \
+   keymaps/acer-aspire_6920                        \
+   keymaps/acer-travelmate_c300                    \
+   keymaps/asus                                    \
+   keymaps/compaq-e_evo                            \
+   keymaps/dell                                    \
+   keymaps/dell-latitude-xt2                       \
+   keymaps/everex-xt5000                           \
+   keymaps/fujitsu-amilo_li_2732                   \
+   keymaps/fujitsu-amilo_pa_2548                   \
+   keymaps/fujitsu-amilo_pro_edition_v3505         \
+   keymaps/fujitsu-amilo_pro_v3205                 \
+   keymaps/fujitsu-amilo_si_1520                   \
+   keymaps/fujitsu-esprimo_mobile_v5               \
+   keymaps/fujitsu-esprimo_mobile_v6               \
+   keymaps/genius-slimstar-320                     \
+   keymaps/hewlett-packard                         \
+   keymaps/hewlett-packard-2510p_2530p             \
+   keymaps/hewlett-packard-compaq_elitebook        \
+   keymaps/hewlett-packard-pavilion                \
+   keymaps/hewlett-packard-presario-2100           \
+   keymaps/hewlett-packard-tablet                  \
+   keymaps/hewlett-packard-tx2                     \
+   keymaps/ibm-thinkpad-usb-keyboard-trackpoint    \
+   keymaps/inventec-symphony_6.0_7.0               \
+   keymaps/lenovo-3000                             \
+   keymaps/lenovo-ideapad                          \
+   keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
+   keymaps/lenovo-thinkpad_x6_tablet               \
+   keymaps/lenovo-thinkpad_x200_tablet             \
+   keymaps/lg-x110                                 \
+   keymaps/logitech-wave                           \
+   keymaps/logitech-wave-cordless                  \
+   keymaps/logitech-wave-pro-cordless              \
+   keymaps/maxdata-pro_7000                        \
+   keymaps/medion-fid2060                          \
+   keymaps/medionnb-a555                           \
+   keymaps/micro-star                              \
+   keymaps/module-asus-w3j                         \
+   keymaps/module-ibm                              \
+   keymaps/module-lenovo                           \
+   keymaps/module-sony                             \
+   keymaps/module-sony-old                         \
+   keymaps/module-sony-vgn                         \
+   keymaps/olpc-xo                                 \
+   keymaps/onkyo                                   \
+   keymaps/oqo-model2                              \
+   keymaps/samsung-other                           \
+   keymaps/samsung-90x3a                           \
+   keymaps/samsung-sq1us                           \
+   keymaps/samsung-sx20s                           \
+   keymaps/toshiba-satellite_a100                  \
+   keymaps/toshiba-satellite_a110                  \
+   keymaps/toshiba-satellite_m30x                  \
+   keymaps/zepto-znote
+
+KEYMAPS_FR =                           \
+   keymaps-force-release/dell-touchpad \
+   keymaps-force-release/dell-xps      \
+   keymaps-force-release/hp-other      \
+   keymaps-force-release/samsung-other \
+   keymaps-force-release/samsung-90x3a \
+   keymaps-force-release/common-volume-keys
+
+KEYMAP_DEPS = common src/udev/keymap/keys-from-name.h src/udev/keymap/keys-to-name.h
+
+src/udev/keymap/keys.txt:
+	@echo GEN $@
+	$(VB)awk '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ \
+   {                                         \
+     if ($$2 != "KEY_MAX") { print $$2 }     \
+   }'                                        \
+   /usr/include/linux/input.h | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
+
+src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt
+	@echo GEN $@
+	$(VB)awk 'BEGIN                       \
+   {                                    \
+     print "struct key                  \
+     {                                  \
+       const char* name;                \
+       unsigned short id;               \
+     };";                               \
+                                        \
+     print "%null-strings"; print "%%"; \
+   }                                    \
+   {                                    \
+     print $$1 ", " $$1                 \
+   }' $< > $@
+
+src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf
+	@echo GEN $@
+	$(VB)gperf -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C $< > $@
+
+src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt 
+	@echo GEN $@
+	$(VB)awk 'BEGIN                                     \
+   {                                                   \
+     print "const char* const key_names[KEY_CNT] = { " \
+   }                                                   \
+   {                                                   \
+     print "[" $$1 "] = \"" $$1 "\","                  \
+   }                                                   \
+   END{print "};"                                      \
+   }' $< > $@
+
+build/keymap: src/udev/keymap/keymap.c build/$(COMMON_LIB) $(KEYMAP_DEPS)
+	@echo LINK $@
+	$(VB)gcc $< -o $@ -I src/udev/keymap $(WARN) $(OPTIONS2) $(INCLUDE) $(DEF) \
+      build/$(COMMON_LIB) $(LDFLAGS)
+	$(VB)strip --strip-unneeded $@
+
+keymap: build/keymap
+
+install-keymap: keymap
+	@mkdir -pv $(DESTDIR)/lib/udev/keymaps/force-release \
+              $(DESTDIR)/lib/udev/rules.d               \
+              $(DESTDIR)/usr/share/doc/udev
+
+	@cp -v build/keymap  $(DESTDIR)/lib/udev
+
+	@cp -v $(KEYMAPS)    $(DESTDIR)/lib/udev/keymaps
+	@cp -v $(KEYMAPS_FR) $(DESTDIR)/lib/udev/keymaps/force-release
+
+	@cp -v src/udev/keymap/*.rules       $(DESTDIR)/lib/udev/rules.d
+	@cp -v src/udev/keymap/findkeyboards $(DESTDIR)/lib/udev
+
+	@cp -v src/udev/keymap/*.txt $(DESTDIR)/usr/share/doc/udev
+
+	@sed -e 's|@udevlibexecdir@|/lib/udev|g'              \
+            src/udev/keymap/keyboard-force-release.sh.in \
+            > $(DESTDIR)/lib/udev/keyboard-force-release.sh
+
+	@chmod 0755 $(DESTDIR)/lib/udev/keyboard-force-release.sh
+
+clean-keymap:
+	rm -f src/udev/keymap/keys.txt
+	rm -f src/udev/keymap/keys-from-name.gperf
+	rm -f src/udev/keymap/keys-from-name.h
+	rm -f src/udev/keymap/keys-to-name.h
+	rm -f build/keymap
+
+.PHONY: clean-keymap

Copied: trunk/BOOK/udev-lfs/udevd.8 (from rev 9932, trunk/udev-lfs/udevd.8)
===================================================================
--- trunk/BOOK/udev-lfs/udevd.8	                        (rev 0)
+++ trunk/BOOK/udev-lfs/udevd.8	2012-09-01 02:31:13 UTC (rev 9973)
@@ -0,0 +1,115 @@
+.\"     Title: systemd-udevd.service
+.\"    Author: Kay Sievers <kay at vrfy.org>
+.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
+.\"      Date: 07/20/2012
+.\"    Manual: systemd-udevd.service
+.\"    Source: systemd
+.\"  Language: English
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" Manually updated for udev only for LFS by BRuce Dubbs
+.\" <bdubbs at linuxfromscratch.org>
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\"
+.TH "UDEVD" "8" "" "systemd (LFS modified man page)" "udevd"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+udevd \- Device event managing daemon
+.SH "SYNOPSIS"
+.PP
+.HP \w'\fB/usr/lib/udevd\fR\ 'u
+\fB/lib/udev/udevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\fR] [\fB\-\-children\-max=\fR] [\fB\-\-exec\-delay=\fR] \ [\fB\-\-resolve\-names=early|late|never\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
+.SH "DESCRIPTION"
+.PP
+udevd listens to kernel uevents\&. For every event, udevd executes matching instructions specified in udev rules\&. See
+\fBudev\fR(7)\&.
+.PP
+The behavior of the running daemon can be changed with
+\fBudevadm control\fR\&.
+.SH "OPTIONS"
+.PP
+\fB\-\-daemon\fR
+.RS 4
+Detach and run in the background\&.
+.RE
+.PP
+\fB\-\-debug\fR
+.RS 4
+Print debug messages to stderr\&.
+.RE
+.PP
+\fB\-\-children\-max=\fR
+.RS 4
+Limit the number of parallel executed events\&.
+.RE
+.PP
+\fB\-\-exec\-delay=\fR
+.RS 4
+Number of seconds to delay the execution of RUN instructions\&. This might be useful when debugging system crashes during coldplug cause by loading non\-working kernel modules\&.
+.RE
+.PP
+\fB\-\-resolve\-names=\fR
+.RS 4
+Specify when udevd should resolve names of users and groups\&. When set to
+\fBearly\fR
+(the default) names will be resolved when the rules are parsed\&. When set to
+\fBlate\fR
+names will be resolved for every event\&. When set to
+\fBnever\fR
+names will never be resolved and all devices will be owned by root\&.
+.RE
+.PP
+\fB\-\-version\fR
+.RS 4
+Print version number\&.
+.RE
+.PP
+\fB\-\-help\fR
+.RS 4
+Print help text\&.
+.RE
+.SH "ENVIRONMENT"
+.PP
+\fIUDEV_LOG=\fR
+.RS 4
+Set the logging priority\&.
+.RE
+.SH "KERNEL COMMAND LINE"
+.PP
+The parameters starting with "rd\&.", will be read when udev is used in an initrd\&.
+.PP
+\fIudev\&.log\-priority=\fR, \fIrd\&.udev\&.log\-priority=\fR
+.RS 4
+Set the logging priority\&.
+.RE
+.PP
+\fIudev\&.children\-max=\fR, \fIrd\&.udev\&.children\-max=\fR
+.RS 4
+Limit the number of parallel executed events\&.
+.RE
+.PP
+\fIudev\&.exec\-delay=\fR, \fIrd\&.udev\&.exec\-delay=\fR
+.RS 4
+Number of seconds to delay the execution of RUN instructions\&. This might be useful when debugging system crashes during coldplug cause by loading non\-working kernel modules\&.
+.RE
+.SH "SEE ALSO"
+.PP
+\fBudev\fR(7),
+\fBudevadm\fR(8)




More information about the lfs-book mailing list