Simplify udev subdirectory handling

Use the BACKEND_TYPE_LINUX automake conditional to include the rules
directory. This way we don't need to specify DIST_SUBDIRS and can get
rid of UDEV_RULES.
Less redundandcy, less chance to miss a directory in the dist tarball.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
This commit is contained in:
Michael Biebl 2010-03-26 07:50:11 +01:00 committed by Martin Pitt
parent 37a56ea0da
commit f435bf07ac
2 changed files with 4 additions and 5 deletions

View file

@ -2,9 +2,11 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = devkit-power-gobject libupower-glib src doc tools policy po $(UDEV_RULES)
SUBDIRS = devkit-power-gobject libupower-glib src doc tools policy po
DIST_SUBDIRS = devkit-power-gobject libupower-glib src doc tools policy po rules
if BACKEND_TYPE_LINUX
SUBDIRS += rules
endif
# Creating ChangeLog from git log (taken from cairo/Makefile.am):
ChangeLog: $(srcdir)/ChangeLog

View file

@ -164,7 +164,6 @@ dnl ---------------------------------------------------------------------------
AC_ARG_WITH([backend],
AS_HELP_STRING([--with-backend=<option>],
[Default backend to use linux, freebsd, dummy (dummy)]))
UDEV_RULES=
# default to a sane option
if test x$with_backend = x; then
if test -e /usr/include/gudev-1.0/gudev/gudev.h ; then
@ -187,9 +186,7 @@ if test x$with_backend = xlinux; then
dnl Check libusb also
AC_CHECK_HEADERS(usb.h, , [AC_MSG_ERROR([Can't find usb.h. Please install libusb.])])
AC_CHECK_LIB([usb], [usb_find_devices], [], [AC_MSG_ERROR([Can't use libusb.])])
UDEV_RULES="rules"
fi
AC_SUBST(UDEV_RULES)
# export to Makefile.am
AM_CONDITIONAL(BACKEND_TYPE_DUMMY, [test x$with_backend = xdummy])