summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/ata_id/Makefile54
-rw-r--r--extras/cdrom_id/Makefile61
-rw-r--r--extras/dasd_id/Makefile54
-rw-r--r--extras/edd_id/Makefile54
-rw-r--r--extras/firmware/Makefile54
-rw-r--r--extras/floppy/Makefile53
-rw-r--r--extras/run_directory/Makefile65
-rw-r--r--extras/scsi_id/Makefile124
-rw-r--r--extras/usb_id/Makefile54
-rw-r--r--extras/volume_id/Makefile60
10 files changed, 399 insertions, 234 deletions
diff --git a/extras/ata_id/Makefile b/extras/ata_id/Makefile
index 769b7e3c2d..d93e694778 100644
--- a/extras/ata_id/Makefile
+++ b/extras/ata_id/Makefile
@@ -1,15 +1,15 @@
-# Makefile for ata_id
+# Makefile for udev extra invoked from the udev main Makefile
#
-# Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
+# 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
-# the Free Software Foundation; version 2 of the License.
+# Released under the GNU General Public License, version 2.
#
PROG = ata_id
-
-all: $(PROG)
+OBJ =
+HEADERS =
+GEN_HEADERS =
+MAN_PAGES =
prefix =
exec_prefix = ${prefix}
@@ -18,9 +18,7 @@ sbindir = ${exec_prefix}/sbin
usrbindir = ${exec_prefix}/usr/bin
usrsbindir = ${exec_prefix}/usr/sbin
mandir = ${prefix}/usr/share/man
-devddir = ${etcdir}/dev.d/default
configdir = ${etcdir}/udev/
-initdir = ${etcdir}/init.d/
srcdir = .
INSTALL = /usr/bin/install -c
@@ -28,23 +26,43 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-OBJS = ata_id.o $(LIBUDEV)
+all: $(PROG) $(MAN_PAGES)
+.PHONY: all
+.DEFAULT: all
-$(OBJS): $(HEADERS)
+%.o: %.c $(GEN_HEADERS)
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+$(PROG): %: $(HEADERS) %.o $(OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
-$(PROG): $(OBJS) $(HEADERS)
- $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIB_OBJS)
+# man pages
+%.8: %.xml
+ xmlto man $?
+.PRECIOUS: %.8
clean:
- rm -f $(PROG) $(OBJS)
-
-spotless: clean
+ rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+.PHONY: clean
install-bin: all
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: install-bin
uninstall-bin:
- rm $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: uninstall-bin
+
+install-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+uninstall-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+install-config:
+ @echo "no config file to install"
+.PHONY: install-config
+
diff --git a/extras/cdrom_id/Makefile b/extras/cdrom_id/Makefile
index c6dfc4e1a8..3e91d4fc47 100644
--- a/extras/cdrom_id/Makefile
+++ b/extras/cdrom_id/Makefile
@@ -1,16 +1,15 @@
-# Makefile for cdrom_id
+# Makefile for udev extra invoked from the udev main Makefile
#
-# Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
-# Copyright (C) 2005 Greg Kroah-Hartman <gregkh@suse.de>
+# 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
-# the Free Software Foundation; version 2 of the License.
+# Released under the GNU General Public License, version 2.
#
PROG = cdrom_id
-
-all: $(PROG)
+OBJ =
+HEADERS =
+GEN_HEADERS =
+MAN_PAGES =
prefix =
exec_prefix = ${prefix}
@@ -19,9 +18,7 @@ sbindir = ${exec_prefix}/sbin
usrbindir = ${exec_prefix}/usr/bin
usrsbindir = ${exec_prefix}/usr/sbin
mandir = ${prefix}/usr/share/man
-devddir = ${etcdir}/dev.d/default
configdir = ${etcdir}/udev/
-initdir = ${etcdir}/init.d/
srcdir = .
INSTALL = /usr/bin/install -c
@@ -29,23 +26,49 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-OBJS = cdrom_id.o $(LIBUDEV)
+all: $(PROG) $(MAN_PAGES)
+.PHONY: all
+.DEFAULT: all
-$(OBJS): $(HEADERS)
+%.o: %.c $(GEN_HEADERS)
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+$(PROG): %: $(HEADERS) %.o $(OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
-$(PROG): $(OBJS) $(HEADERS)
- $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIB_OBJS)
+# man pages
+%.8: %.xml
+ xmlto man $?
+.PRECIOUS: %.8
clean:
- rm -f $(PROG) $(OBJS)
-
-spotless: clean
+ rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+.PHONY: clean
install-bin: all
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: install-bin
uninstall-bin:
- rm $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: uninstall-bin
+
+install-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+uninstall-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+install-config:
+ @echo "no config file to install"
+.PHONY: install-config
+
+install: all install-bin install-config install-man
+.PHONY: install
+
+uninstall: uninstall-bin uninstall-man
+.PHONY: uninstall
+
diff --git a/extras/dasd_id/Makefile b/extras/dasd_id/Makefile
index 23331ce14c..2a14050d66 100644
--- a/extras/dasd_id/Makefile
+++ b/extras/dasd_id/Makefile
@@ -1,15 +1,15 @@
-# Makefile for dasd_id
+# Makefile for udev extra invoked from the udev main Makefile
#
-# Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
+# 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
-# the Free Software Foundation; version 2 of the License.
+# Released under the GNU General Public License, version 2.
#
PROG = dasd_id
-
-all: $(PROG)
+OBJ =
+HEADERS =
+GEN_HEADERS =
+MAN_PAGES =
prefix =
exec_prefix = ${prefix}
@@ -18,9 +18,7 @@ sbindir = ${exec_prefix}/sbin
usrbindir = ${exec_prefix}/usr/bin
usrsbindir = ${exec_prefix}/usr/sbin
mandir = ${prefix}/usr/share/man
-devddir = ${etcdir}/dev.d/default
configdir = ${etcdir}/udev/
-initdir = ${etcdir}/init.d/
srcdir = .
INSTALL = /usr/bin/install -c
@@ -28,23 +26,43 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-OBJS = dasd_id.o $(LIBUDEV)
+all: $(PROG) $(MAN_PAGES)
+.PHONY: all
+.DEFAULT: all
-$(OBJS): $(HEADERS)
+%.o: %.c $(GEN_HEADERS)
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+$(PROG): %: $(HEADERS) %.o $(OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
-$(PROG): $(OBJS) $(HEADERS)
- $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIB_OBJS)
+# man pages
+%.8: %.xml
+ xmlto man $?
+.PRECIOUS: %.8
clean:
- rm -f $(PROG) $(OBJS)
-
-spotless: clean
+ rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+.PHONY: clean
install-bin: all
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: install-bin
uninstall-bin:
- rm $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: uninstall-bin
+
+install-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+uninstall-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+install-config:
+ @echo "no config file to install"
+.PHONY: install-config
+
diff --git a/extras/edd_id/Makefile b/extras/edd_id/Makefile
index aa3db4f209..70244ea468 100644
--- a/extras/edd_id/Makefile
+++ b/extras/edd_id/Makefile
@@ -1,15 +1,15 @@
-# Makefile for edd_id
+# Makefile for udev extra invoked from the udev main Makefile
#
-# Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
+# 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
-# the Free Software Foundation; version 2 of the License.
+# Released under the GNU General Public License, version 2.
#
PROG = edd_id
-
-all: $(PROG)
+OBJ =
+HEADERS =
+GEN_HEADERS =
+MAN_PAGES =
prefix =
exec_prefix = ${prefix}
@@ -18,9 +18,7 @@ sbindir = ${exec_prefix}/sbin
usrbindir = ${exec_prefix}/usr/bin
usrsbindir = ${exec_prefix}/usr/sbin
mandir = ${prefix}/usr/share/man
-devddir = ${etcdir}/dev.d/default
configdir = ${etcdir}/udev/
-initdir = ${etcdir}/init.d/
srcdir = .
INSTALL = /usr/bin/install -c
@@ -28,23 +26,43 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-OBJS = $(PROG).o $(LIBUDEV)
+all: $(PROG) $(MAN_PAGES)
+.PHONY: all
+.DEFAULT: all
-$(OBJS): $(HEADERS)
+%.o: %.c $(GEN_HEADERS)
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+$(PROG): %: $(HEADERS) %.o $(OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
-$(PROG): $(OBJS) $(HEADERS)
- $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIB_OBJS)
+# man pages
+%.8: %.xml
+ xmlto man $?
+.PRECIOUS: %.8
clean:
- rm -f $(PROG) $(OBJS)
-
-spotless: clean
+ rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+.PHONY: clean
install-bin: all
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: install-bin
uninstall-bin:
- rm $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: uninstall-bin
+
+install-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+uninstall-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+install-config:
+ @echo "no config file to install"
+.PHONY: install-config
+
diff --git a/extras/firmware/Makefile b/extras/firmware/Makefile
index 5632e0dee5..7de94c40a7 100644
--- a/extras/firmware/Makefile
+++ b/extras/firmware/Makefile
@@ -1,15 +1,15 @@
-# Makefile for firmware_helper
+# Makefile for udev extra invoked from the udev main Makefile
#
-# Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
+# 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
-# the Free Software Foundation; version 2 of the License.
+# Released under the GNU General Public License, version 2.
#
PROG = firmware_helper
-
-all: $(PROG)
+OBJ =
+HEADERS =
+GEN_HEADERS =
+MAN_PAGES =
prefix =
exec_prefix = ${prefix}
@@ -18,9 +18,7 @@ sbindir = ${exec_prefix}/sbin
usrbindir = ${exec_prefix}/usr/bin
usrsbindir = ${exec_prefix}/usr/sbin
mandir = ${prefix}/usr/share/man
-devddir = ${etcdir}/dev.d/default
configdir = ${etcdir}/udev/
-initdir = ${etcdir}/init.d/
srcdir = .
INSTALL = /usr/bin/install -c
@@ -28,24 +26,42 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-OBJS = $(PROG).o $(LIBUDEV) $(LIBSYSFS)
-HEADERS =
+all: $(PROG) $(MAN_PAGES)
+.PHONY: all
+.DEFAULT: all
-$(OBJS): $(HEADERS)
+%.o: %.c $(GEN_HEADERS)
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+$(PROG): %: $(HEADERS) %.o $(OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
-$(PROG): $(OBJS) $(HEADERS)
- $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIB_OBJS)
+# man pages
+%.8: %.xml
+ xmlto man $?
+.PRECIOUS: %.8
clean:
- rm -f $(PROG) $(OBJS)
-
-spotless: clean
+ rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+.PHONY: clean
install-bin: all
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: install-bin
uninstall-bin:
- rm $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: uninstall-bin
+
+install-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+uninstall-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+install-config:
+ @echo "no config file to install"
+.PHONY: install-config
diff --git a/extras/floppy/Makefile b/extras/floppy/Makefile
index b7915fc484..8568e28edf 100644
--- a/extras/floppy/Makefile
+++ b/extras/floppy/Makefile
@@ -1,15 +1,15 @@
-# Makefile for create_floppy_devices
+# Makefile for udev extra invoked from the udev main Makefile
#
-# Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
+# 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
-# the Free Software Foundation; version 2 of the License.
+# Released under the GNU General Public License, version 2.
#
PROG = create_floppy_devices
-
-all: $(PROG)
+OBJ =
+HEADERS =
+GEN_HEADERS =
+MAN_PAGES =
prefix =
exec_prefix = ${prefix}
@@ -18,9 +18,7 @@ sbindir = ${exec_prefix}/sbin
usrbindir = ${exec_prefix}/usr/bin
usrsbindir = ${exec_prefix}/usr/sbin
mandir = ${prefix}/usr/share/man
-devddir = ${etcdir}/dev.d/default
configdir = ${etcdir}/udev/
-initdir = ${etcdir}/init.d/
srcdir = .
INSTALL = /usr/bin/install -c
@@ -28,23 +26,42 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-OBJS = $(PROG).o $(LIBUDEV)
+all: $(PROG) $(MAN_PAGES)
+.PHONY: all
+.DEFAULT: all
-$(OBJS): $(HEADERS)
+%.o: %.c $(GEN_HEADERS)
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+$(PROG): %: $(HEADERS) %.o $(OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
-$(PROG): $(OBJS) $(HEADERS)
- $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIB_OBJS)
+# man pages
+%.8: %.xml
+ xmlto man $?
+.PRECIOUS: %.8
clean:
- rm -f $(PROG) $(OBJS)
-
-spotless: clean
+ rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+.PHONY: clean
install-bin: all
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: install-bin
uninstall-bin:
- rm $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: uninstall-bin
+
+install-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+uninstall-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+install-config:
+ @echo "no config file to install"
+.PHONY: install-config
diff --git a/extras/run_directory/Makefile b/extras/run_directory/Makefile
index 38ef7b128e..8444c3ba63 100644
--- a/extras/run_directory/Makefile
+++ b/extras/run_directory/Makefile
@@ -1,16 +1,14 @@
-# Makefile for run_directory
+# Makefile for udev extra invoked from the udev main Makefile
#
-# Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
+# 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
-# the Free Software Foundation; version 2 of the License.
+# Released under the GNU General Public License, version 2.
#
-
-DEVD = udev_run_devd
-HOTPLUGD = udev_run_hotplugd
-
-all: $(DEVD) $(HOTPLUGD)
+PROG = udev_run_devd udev_run_hotplugd
+OBJS = run_directory.o
+HEADERS =
+GEN_HEADERS =
+MAN_PAGES =
prefix =
exec_prefix = ${prefix}
@@ -19,9 +17,7 @@ sbindir = ${exec_prefix}/sbin
usrbindir = ${exec_prefix}/usr/bin
usrsbindir = ${exec_prefix}/usr/sbin
mandir = ${prefix}/usr/share/man
-devddir = ${etcdir}/dev.d/default
configdir = ${etcdir}/udev/
-initdir = ${etcdir}/init.d/
srcdir = .
INSTALL = /usr/bin/install -c
@@ -29,25 +25,44 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-OBJS = $(LIBUDEV)
+all: $(PROG) $(MAN_PAGES)
+.PHONY: all
+.DEFAULT: all
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+%.o: %.c $(GEN_HEADERS)
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
-$(DEVD): $(HEADERS) $(DEVD).o run_directory.o
- $(QUIET) $(LD) $(LDFLAGS) -o $(DEVD) $(DEVD).o run_directory.o $(OBJS)
+$(PROG): %: $(HEADERS) %.o $(OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
-$(HOTPLUGD): $(HEADERS) $(HOTPLUGD).o run_directory.o
- $(QUIET) $(LD) $(LDFLAGS) -o $(HOTPLUGD) $(HOTPLUGD).o run_directory.o $(OBJS)
+# man pages
+%.8: %.xml
+ xmlto man $?
+.PRECIOUS: %.8
clean:
- rm -f $(DEVD) $(HOTPLUGD) run_directory.o
-
-spotless: clean
+ rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+.PHONY: clean
install-bin: all
- $(INSTALL_PROGRAM) $(DEVD) $(DESTDIR)$(sbindir)/$(DEVD)
- $(INSTALL_PROGRAM) $(HOTPLUGD) $(DESTDIR)$(sbindir)/$(HOTPLUGD)
+ $(INSTALL_PROGRAM) udev_run_devd $(DESTDIR)$(sbindir)/udev_run_devd
+ $(INSTALL_PROGRAM) udev_run_devd $(DESTDIR)$(sbindir)/udev_run_hotplugd
+.PHONY: install-bin
uninstall-bin:
- - rm $(DESTDIR)$(sbindir)/$(DEVD)
+ - rm $(DESTDIR)$(sbindir)/udev_run_devd
+ - rm $(DESTDIR)$(sbindir)/udev_run_hotplugd
+.PHONY: uninstall-bin
+
+install-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+uninstall-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+install-config:
+ @echo "no config file to install"
+.PHONY: install-config
diff --git a/extras/scsi_id/Makefile b/extras/scsi_id/Makefile
index 3b75e165fb..bb3422a9c4 100644
--- a/extras/scsi_id/Makefile
+++ b/extras/scsi_id/Makefile
@@ -1,85 +1,93 @@
+# Makefile for udev extra invoked from the udev main Makefile
#
# Copyright (C) 2003 IBM
+# 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
-# the Free Software Foundation; version 2 of the License.
+# Released under the GNU General Public License, version 2.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-SCSI_ID_VERSION=0.9
+SCSI_ID_VERSION = 0.9
+
+PROG = scsi_id
+OBJS= scsi_serial.o
+HEADERS = scsi_id.h scsi.h scsi_id_version.h
+GEN_HEADERS = scsi_id_version.h
+MAN_PAGES = scsi_id.8
prefix =
-etcdir = ${prefix}/etc
-sbindir = ${prefix}/sbin
+exec_prefix = ${prefix}
+etcdir = ${prefix}/etc
+sbindir = ${exec_prefix}/sbin
+usrbindir = ${exec_prefix}/usr/bin
+usrsbindir = ${exec_prefix}/usr/sbin
mandir = ${prefix}/usr/share/man
+configdir = ${etcdir}/udev/
+srcdir = .
-INSTALL = /usr/bin/install -c
+INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+
+# be able to run without udev
+LIBSYSFS = -lsysfs
+CROSS =
+QUIET =
+CC = $(CROSS)gcc
+LD = $(CROSS)gcc
+AR = $(CROSS)ar
+STRIPCMD = $(CROSS)strip
+RANLIB = $(CROSS)ranlib
+HOSTCC = gcc
+CFLAGS += -Wall -pipe -fno-builtin -Wstrict-prototypes -Wsign-compare -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+LDFLAGS += -Wl
+
+all: $(PROG) $(MAN_PAGES)
+.PHONY: all
+.DEFAULT: all
+
+%.o: %.c $(GEN_HEADERS)
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
+
+$(PROG): %: $(HEADERS) %.o $(OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
-# Note some of the variables used here are set when built under udev, and
-# otherwise might not be set.
-
-CFLAGS+=-Wall -fno-builtin
-
-PROG=scsi_id
-LIBSYSFS=-lsysfs
-
-#
-# Built static and stripped when built with udev.
-#
-# STRIP=-s
-# LDFLAGS=$(STRIP)
-LD=$(CC)
-
-OBJS= scsi_id.o scsi_serial.o
+scsi_id_version.h:
+ @echo "/* This file is auto-generated by the Makefile */" > $@
+ @echo \#define SCSI_ID_VERSION \"$(SCSI_ID_VERSION)\" >> $@
+ @echo \#define SCSI_ID_CONFIG_FILE \"$(etcdir)/scsi_id.config\" >> $@
-all: $(PROG)
+# man pages
+%.8: %.xml
+ xmlto man $?
+.PRECIOUS: %.8
-# XXX use a compressed man page?
+clean:
+ rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+.PHONY: clean
install-bin: all
- $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+ $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: install-bin
+
+uninstall-bin:
+ - rm $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: uninstall-bin
install-man:
$(INSTALL_DATA) -D scsi_id.8 $(DESTDIR)$(mandir)/man8/scsi_id.8
+.PHONY: uninstall-man
+
+uninstall-man:
+ -rm -f $(mandir)/man8/scsi_id.8
+.PHONY: uninstall-man
install-config:
@if [ ! -r $(DESTDIR)$(etcdir)/scsi_id.config ]; then \
echo $(INSTALL_DATA) -D ./scsi_id.config $(DESTDIR)$(etcdir); \
$(INSTALL_DATA) -D ./scsi_id.config $(DESTDIR)$(etcdir)/scsi_id.config; \
fi
-
-uninstall-bin:
- -rm $(DESTDIR)$(sbindir)/$(PROG)
-
-uninstall-man:
- -rm $(DESTDIR)$(mandir)/man8/scsi_id.8
-
-GEN_HEADER=scsi_id_version.h
-
-scsi_id_version.h:
- @echo "/* This file is auto-generated by the Makefile */" > $@
- @echo \#define SCSI_ID_VERSION \"$(SCSI_ID_VERSION)\" >> $@
- @echo \#define SCSI_ID_CONFIG_FILE \"$(etcdir)/scsi_id.config\" >> $@
-$(OBJS): scsi_id.h scsi.h scsi_id_version.h
-
-clean:
- rm -f $(PROG) $(OBJS) $(GEN_HEADER)
-
-spotless: clean
-
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+.PHONY: install-config
-$(PROG): $(OBJS)
- $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(CRT0) $(OBJS) $(LIBSYSFS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
diff --git a/extras/usb_id/Makefile b/extras/usb_id/Makefile
index 10dd09da21..1796aaea09 100644
--- a/extras/usb_id/Makefile
+++ b/extras/usb_id/Makefile
@@ -1,15 +1,15 @@
-# Makefile for usb_id
+# Makefile for udev extra invoked from the udev main Makefile
#
-# Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
+# 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
-# the Free Software Foundation; version 2 of the License.
+# Released under the GNU General Public License, version 2.
#
PROG = usb_id
-
-all: $(PROG)
+OBJ =
+HEADERS =
+GEN_HEADERS =
+MAN_PAGES =
prefix =
exec_prefix = ${prefix}
@@ -18,9 +18,7 @@ sbindir = ${exec_prefix}/sbin
usrbindir = ${exec_prefix}/usr/bin
usrsbindir = ${exec_prefix}/usr/sbin
mandir = ${prefix}/usr/share/man
-devddir = ${etcdir}/dev.d/default
configdir = ${etcdir}/udev/
-initdir = ${etcdir}/init.d/
srcdir = .
INSTALL = /usr/bin/install -c
@@ -28,24 +26,42 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-OBJS = $(PROG).o $(VOLUME_ID_OBJS) $(LIBUDEV) $(LIBSYSFS)
-HEADERS =
+all: $(PROG) $(MAN_PAGES)
+.PHONY: all
+.DEFAULT: all
-$(OBJS): $(HEADERS)
+%.o: %.c $(GEN_HEADERS)
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+$(PROG): %: $(HEADERS) %.o $(OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
-$(PROG): $(OBJS) $(HEADERS)
- $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIB_OBJS)
+# man pages
+%.8: %.xml
+ xmlto man $?
+.PRECIOUS: %.8
clean:
- rm -f $(PROG) $(OBJS)
-
-spotless: clean
+ rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+.PHONY: clean
install-bin: all
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: install-bin
uninstall-bin:
- rm $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: uninstall-bin
+
+install-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+uninstall-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+install-config:
+ @echo "no config file to install"
+.PHONY: install-config
diff --git a/extras/volume_id/Makefile b/extras/volume_id/Makefile
index c1dd74f0f7..56cab10e23 100644
--- a/extras/volume_id/Makefile
+++ b/extras/volume_id/Makefile
@@ -1,15 +1,18 @@
-# Makefile for volume_id
+# Makefile for udev extra invoked from the udev main Makefile
#
-# Copyright (C) 2004, 2005 Kay Sievers <kay.sievers@vrfy.org>
+# 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
-# the Free Software Foundation; version 2 of the License.
+# Released under the GNU General Public License, version 2.
#
-PROG = vol_id
+VOLUME_ID_BASE=volume_id
+include $(VOLUME_ID_BASE)/Makefile.inc
-all: $(PROG)
+PROG = vol_id
+OBJS = $(VOLUME_ID_OBJS)
+HEADERS = $(VOLUME_ID_HEADERS)
+GEN_HEADERS =
+MAN_PAGES =
prefix =
exec_prefix = ${prefix}
@@ -18,9 +21,7 @@ sbindir = ${exec_prefix}/sbin
usrbindir = ${exec_prefix}/usr/bin
usrsbindir = ${exec_prefix}/usr/sbin
mandir = ${prefix}/usr/share/man
-devddir = ${etcdir}/dev.d/default
configdir = ${etcdir}/udev/
-initdir = ${etcdir}/init.d/
srcdir = .
INSTALL = /usr/bin/install -c
@@ -28,27 +29,42 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-VOLUME_ID_BASE=volume_id
-include $(VOLUME_ID_BASE)/Makefile.inc
+all: $(PROG) $(MAN_PAGES)
+.PHONY: all
+.DEFAULT: all
-OBJS = vol_id.o $(VOLUME_ID_OBJS) $(LIBUDEV)
-HEADERS = $(VOLUME_ID_HEADERS)
-
-$(OBJS): $(HEADERS)
+%.o: %.c $(GEN_HEADERS)
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+$(PROG): %: $(HEADERS) %.o $(OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
-$(PROG): $(OBJS) $(HEADERS)
- $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS)
+# man pages
+%.8: %.xml
+ xmlto man $?
+.PRECIOUS: %.8
clean:
- rm -f $(PROG) $(OBJS)
-
-spotless: clean
+ rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+.PHONY: clean
install-bin: all
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: install-bin
uninstall-bin:
- rm $(DESTDIR)$(sbindir)/$(PROG)
+.PHONY: uninstall-bin
+
+install-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+uninstall-man:
+ @echo "Please create a man page for this tool."
+.PHONY: uninstall-man
+
+install-config:
+ @echo "no config file to install"
+.PHONY: install-config