build: Don't create empty udev rules.d directory

When UDEV_DIR is empty it will create "/rules.d" directory which is
not desired. So check for enabled HID2HCI support before installing
any udev rules.
This commit is contained in:
Marcel Holtmann 2012-12-19 15:03:45 +01:00
parent 61c448fea1
commit af9464b0f2

View File

@ -174,20 +174,16 @@ test_scripts =
include Makefile.tools
include Makefile.obexd
if HID2HCI
rulesdir = @UDEV_DIR@/rules.d
udev_files =
rules_DATA = tools/97-hid2hci.rules
if HID2HCI
udev_files += tools/hid2hci.rules
CLEANFILES += $(rules_DATA)
endif
EXTRA_DIST += tools/hid2hci.rules
rules_DATA = $(foreach file,$(udev_files), tools/97-$(notdir $(file)))
CLEANFILES += $(rules_DATA)
if TEST
testdir = $(pkglibdir)/test
test_SCRIPTS = $(test_scripts)