aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2012-09-08 16:37:56 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2012-09-08 16:37:56 +0200
commit0c7ba8e03e55622169175cbba4045526e29323d8 (patch)
tree69aa9626b6e839d7ee89d804c7aa318a661fee71 /Makefile.am
parent5a26bd51e77f54160854d668c590a2d1d53265a5 (diff)
don't install udev rules by default, as it may pollute the system
For cmake call with -DINSTALL_UDEV_RULES=ON for the rules to be installed during the default install/uninstall stages. For autotools call "make install-udev-rules" or "make uninstall-udev- The rules file will be installed to "/etc/udev/rules.d".
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index ec705c8..2ffa532 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,16 +7,19 @@ SUBDIRS = include src
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = librtlsdr.pc
-udevrulesdir=/etc/udev/rules.d
-udevrules_DATA = rtl-sdr.rules
-
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
-EXTRA_DIST = git-version-gen $(udevrules_DATA)
+install-udev-rules:
+ $(INSTALL_DATA) rtl-sdr.rules /etc/udev/rules.d
+
+uninstall-udev-rules:
+ rm -rf /etc/udev/rules.d/rtl-sdr.rules
+
+EXTRA_DIST = git-version-gen
if HAVE_DOXYGEN