chiark / gitweb /
[PATCH] rename LOG to USE_LOG in all places
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Sun, 6 Mar 2005 09:15:51 +0000 (10:15 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:48:48 +0000 (23:48 -0700)
Makefile
extras/volume_id/udev_volume_id.c
logging.h
make_gcov.sh
udev.c
udevd.c
udevinfo.c
udevsend.c
udevtest.c

index baecda66f32d933292d3cc8db5ed3cb7632133a4..f2d445d627f0d08ec382424744f21ade3e9f14a3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
 # Makefile for udev
 #
 # Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com>
 # Makefile for udev
 #
 # Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com>
+# Copyright (C) 2004-2005 Kay Sievers <kay.sievers@vrfy.org>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 #
 
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 #
 
-# Set the following to control the use of syslog
-# Set it to `false' to remove all logging
+# Set this to make use of syslog
 USE_LOG = true
 
 USE_LOG = true
 
-# Set the following to `true' to log the debug
-# and make a unstripped, unoptimized  binary.
-# Leave this set to `false' for production use.
+# Set this to ad development debug messages
 DEBUG = false
 
 DEBUG = false
 
-# Set this to compile with Security-Enhanced Linux support.
+# Set this to include Security-Enhanced Linux support.
 USE_SELINUX = false
 
 USE_SELINUX = false
 
+# Set this to comile with the local version of klibc instead of glibc.
+USE_KLIBC = false
+
+# Set this to create statically linked binaries.
+USE_STATIC = false
+
+# To build any of the extras programs, run with:
+#      make EXTRAS="extras/a extras/b"
+EXTRAS=
+
+# make the build silent. Set this to something else to make it noisy again.
+V=false
+
 ROOT =         udev
 DAEMON =       udevd
 SENDER =       udevsend
 ROOT =         udev
 DAEMON =       udevd
 SENDER =       udevsend
@@ -39,9 +50,7 @@ INSTALL_DIR = /usr/local/bin
 RELEASE_NAME = $(ROOT)-$(VERSION)
 LOCAL_CFG_DIR =        etc/udev
 HOTPLUG_EXEC = $(ROOT)
 RELEASE_NAME = $(ROOT)-$(VERSION)
 LOCAL_CFG_DIR =        etc/udev
 HOTPLUG_EXEC = $(ROOT)
-
 DESTDIR =
 DESTDIR =
-
 KERNEL_DIR = /lib/modules/${shell uname -r}/build
 
 # override this to make udev look in a different location for it's config files
 KERNEL_DIR = /lib/modules/${shell uname -r}/build
 
 # override this to make udev look in a different location for it's config files
@@ -62,22 +71,10 @@ INSTALL_PROGRAM = ${INSTALL}
 INSTALL_DATA  = ${INSTALL} -m 644
 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
 
 INSTALL_DATA  = ${INSTALL} -m 644
 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
 
-# To build any of the extras programs, run with:
-#      make EXTRAS="extras/a extras/b" 
-EXTRAS=
-
 # place to put our device nodes
 udevdir =      ${prefix}/udev
 udevdb =       ${udevdir}/.udevdb
 
 # place to put our device nodes
 udevdir =      ${prefix}/udev
 udevdb =       ${udevdir}/.udevdb
 
-# Comment out this line to build with something other 
-# than the local version of klibc
-#USE_KLIBC = true
-
-# make the build silent (well, at least the udev part)  Set this
-# to something else to make it noisy again.
-V=false
-
 # set up PWD so that older versions of make will work with our build.
 PWD = $(shell pwd)
 
 # set up PWD so that older versions of make will work with our build.
 PWD = $(shell pwd)
 
@@ -160,7 +157,7 @@ CFLAGS +=   -I$(PWD)/libsysfs/sysfs \
                -I$(PWD)/libsysfs
 
 ifeq ($(strip $(USE_LOG)),true)
                -I$(PWD)/libsysfs
 
 ifeq ($(strip $(USE_LOG)),true)
-       CFLAGS += -DLOG
+       CFLAGS += -DUSE_LOG
 endif
 
 # if DEBUG is enabled, then we do not strip or optimize
 endif
 
 # if DEBUG is enabled, then we do not strip or optimize
@@ -182,10 +179,7 @@ ifeq ($(strip $(USE_KLIBC)),true)
        INCLUDE_DIR     := $(KLIBC_BASE)/include
        LINUX_INCLUDE_DIR       := $(KERNEL_DIR)/include
        include $(KLIBC_DIR)/arch/$(ARCH)/MCONFIG
        INCLUDE_DIR     := $(KLIBC_BASE)/include
        LINUX_INCLUDE_DIR       := $(KERNEL_DIR)/include
        include $(KLIBC_DIR)/arch/$(ARCH)/MCONFIG
-       # arch specific objects
        ARCH_LIB_OBJS =  $(KLIBC_DIR)/libc.a
        ARCH_LIB_OBJS =  $(KLIBC_DIR)/libc.a
-
-
        CRT0 = $(KLIBC_DIR)/crt0.o
        LIBC = $(ARCH_LIB_OBJS) $(LIB_OBJS) $(CRT0)
        CFLAGS += $(WARNINGS) -nostdinc                         \
        CRT0 = $(KLIBC_DIR)/crt0.o
        LIBC = $(ARCH_LIB_OBJS) $(LIB_OBJS) $(CRT0)
        CFLAGS += $(WARNINGS) -nostdinc                         \
@@ -197,8 +191,7 @@ ifeq ($(strip $(USE_KLIBC)),true)
                -I$(GCCINCDIR)                                  \
                -I$(LINUX_INCLUDE_DIR)
        LIB_OBJS =
                -I$(GCCINCDIR)                                  \
                -I$(LINUX_INCLUDE_DIR)
        LIB_OBJS =
-       LDFLAGS = --static --nostdlib -nostartfiles -nodefaultlibs
-
+       LDFLAGS = -static -nostdlib -nostartfiles -nodefaultlibs
 else
        WARNINGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
        CRT0 =
 else
        WARNINGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
        CRT0 =
@@ -213,6 +206,11 @@ ifeq ($(strip $(USE_SELINUX)),true)
        CFLAGS += -DUSE_SELINUX
 endif
 
        CFLAGS += -DUSE_SELINUX
 endif
 
+ifeq ($(strip $(USE_STATIC)),true)
+       CFLAGS += -DUSE_STATIC
+       LDFLAGS += -static
+endif
+
 ifeq ($(strip $(V)),false)
        QUIET=@$(PWD)/ccdv
        HOST_PROGS=ccdv
 ifeq ($(strip $(V)),false)
        QUIET=@$(PWD)/ccdv
        HOST_PROGS=ccdv
index c36b89f8bd4d8d443cdde11ff6400226e22fbf0e..54d95270d0bcda7480ff4027fa5a42000951afca 100644 (file)
@@ -35,7 +35,7 @@
 
 #define BLKGETSIZE64 _IOR(0x12,114,size_t)
 
 
 #define BLKGETSIZE64 _IOR(0x12,114,size_t)
 
-#ifdef LOG
+#ifdef USE_LOG
 void log_message(int level, const char *format, ...)
 {
        va_list args;
 void log_message(int level, const char *format, ...)
 {
        va_list args;
index 4f51217b9ac730d68fc3c00c4d4e5d2cc6bf1067..3ff54ec9747648f36f8ee2412ed39532fc62b6d4 100644 (file)
--- a/logging.h
+++ b/logging.h
@@ -30,7 +30,7 @@
 #define logging_init(foo)              do { } while (0)
 #define logging_close(foo)             do { } while (0)
 
 #define logging_init(foo)              do { } while (0)
 #define logging_close(foo)             do { } while (0)
 
-#ifdef LOG
+#ifdef USE_LOG
 #include <stdarg.h>
 #include <unistd.h>
 #include <syslog.h>
 #include <stdarg.h>
 #include <unistd.h>
 #include <syslog.h>
@@ -73,6 +73,6 @@ static inline void logging_close(void)
        closelog();
 }
 
        closelog();
 }
 
-#endif /* LOG */
+#endif /* USE_LOG */
 
 #endif
 
 #endif
index 4d5f63f1dd830d1ee31b2108182ef6ab0fd8c1b6..e3ceb96d077c88b43a2b78096f7e131b693e0744 100644 (file)
@@ -28,7 +28,7 @@ GCCINCDIR=`gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"`
 LIBSYSFS="-I$PWD/libsysfs/sysfs -I$PWD/libsysfs"
 WARNINGS="-Wall -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
 GCC="-I$GCCINCDIR"
 LIBSYSFS="-I$PWD/libsysfs/sysfs -I$PWD/libsysfs"
 WARNINGS="-Wall -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
 GCC="-I$GCCINCDIR"
-USE_LOG="-DLOG"
+USE_LOG="-DUSE_LOG"
 DEBUG="-D_GNU_SOURCE"
 GCOV_FLAGS="-pipe -fprofile-arcs -ftest-coverage"
 
 DEBUG="-D_GNU_SOURCE"
 GCOV_FLAGS="-pipe -fprofile-arcs -ftest-coverage"
 
diff --git a/udev.c b/udev.c
index c26ce46b64ded246f87a5cca5f329a9a6421989f..76de8181d17e6c1fcba9095674477da03ab93988 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -40,7 +40,7 @@
 #include "logging.h"
 
 
 #include "logging.h"
 
 
-#ifdef LOG
+#ifdef USE_LOG
 void log_message(int level, const char *format, ...)
 {
        va_list args;
 void log_message(int level, const char *format, ...)
 {
        va_list args;
diff --git a/udevd.c b/udevd.c
index bd21f156146e7bc0162901f11d394a23c3948fad..1376cf05c777a4a331f13c0d758deff240d895de 100644 (file)
--- a/udevd.c
+++ b/udevd.c
@@ -1,7 +1,7 @@
 /*
  * udevd.c - hotplug event serializer
  *
 /*
  * udevd.c - hotplug event serializer
  *
- * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2004-2005 Kay Sievers <kay.sievers@vrfy.org>
  * Copyright (C) 2004 Chris Friesen <chris_friesen@sympatico.ca>
  *
  *
  * Copyright (C) 2004 Chris Friesen <chris_friesen@sympatico.ca>
  *
  *
@@ -67,7 +67,7 @@ static void user_sighandler(void);
 static void reap_sigchilds(void);
 char *udev_bin;
 
 static void reap_sigchilds(void);
 char *udev_bin;
 
-#ifdef LOG
+#ifdef USE_LOG
 void log_message (int level, const char *format, ...)
 {
        va_list args;
 void log_message (int level, const char *format, ...)
 {
        va_list args;
index b2d22e984e44caa3a5d5e0d0bcdf5f22479de02a..e30a036ac6ee17be4cd2e95cbd8398116beb5f05 100644 (file)
@@ -3,7 +3,6 @@
  *
  * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
  *
  *
  * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
  *
- *
  *     This program is free software; you can redistribute it and/or modify it
  *     under the terms of the GNU General Public License as published by the
  *     Free Software Foundation version 2 of the License.
  *     This program is free software; you can redistribute it and/or modify it
  *     under the terms of the GNU General Public License as published by the
  *     Free Software Foundation version 2 of the License.
@@ -38,7 +37,7 @@
 
 #define SYSFS_VALUE_SIZE               256
 
 
 #define SYSFS_VALUE_SIZE               256
 
-#ifdef LOG
+#ifdef USE_LOG
 void log_message (int level, const char *format, ...)
 {
        va_list args;
 void log_message (int level, const char *format, ...)
 {
        va_list args;
index 5fe0f456a1d7e4dc65e8c3e2c989fc5aebaf93ed..dcd5a2ae934ab4620d392e52b93de39bcbfda5ce 100644 (file)
@@ -43,7 +43,7 @@
 /* global variables */
 static int sock = -1;
 
 /* global variables */
 static int sock = -1;
 
-#ifdef LOG
+#ifdef USE_LOG
 void log_message (int level, const char *format, ...)
 {
        va_list args;
 void log_message (int level, const char *format, ...)
 {
        va_list args;
index 4e02ac7dbc2b4f351947c1793a31d68ba405a11e..084fde07064a2fe2b39cbdc942ca2d61bde65d04 100644 (file)
@@ -36,7 +36,7 @@
 #include "logging.h"
 
 
 #include "logging.h"
 
 
-#ifdef LOG
+#ifdef USE_LOG
 void log_message (int level, const char *format, ...)
 {
        va_list args;
 void log_message (int level, const char *format, ...)
 {
        va_list args;