mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-05 01:48:06 +02:00
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:
parent
37a56ea0da
commit
f435bf07ac
2 changed files with 4 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue