With the separate install sub-parts, the udev install can be optional using the NO_INSTALL_UDEV option now. Signed-off-by: Jon Loeliger <jdl@xxxxxxxxxxxxxxxxxxx> --- Makefile | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 589c453..8dbdf14 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,9 @@ Q=@ NQ=@echo endif +INSTALL_EXECS := crda +INSTALL_MAN := crda.8.gz regdbdump.8.gz + $(REG_BIN): $(NQ) ' EXIST ' $(REG_BIN) $(NQ) @@ -113,12 +116,19 @@ verify: $(REG_BIN) regdbdump @$(NQ) ' GZIP' $< $(Q)gzip < $< > $@ -install: crda crda.8.gz regdbdump.8.gz - $(NQ) ' INSTALL crda' + +install: install_execs install_udev install_man + +install_execs: $(INSTALL_EXECS) $(Q)$(MKDIR) $(DESTDIR)/$(SBINDIR) - $(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) crda - $(NQ) ' INSTALL regdbdump' - $(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) regdbdump + $(Q)for exec in $(INSTALL_EXECS) ; do \ + echo " INSTALL $$exec" ; \ + $(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) $$exec ; \ + done + +.PHONY: install_udev +install_udev: +ifndef NO_INSTALL_UDEV $(NQ) ' INSTALL $(UDEV_LEVEL)regulatory.rules' $(Q)$(MKDIR) $(DESTDIR)/$(UDEV_RULE_DIR)/ @# This removes the old rule you may have, we were not @@ -129,6 +139,9 @@ install: crda crda.8.gz regdbdump.8.gz $(Q)$(INSTALL) -m 644 -t \ $(DESTDIR)/$(UDEV_RULE_DIR)/ \ udev/$(UDEV_LEVEL)regulatory.rules +endif + +install_man: $(INSTALL_MAN) $(NQ) ' INSTALL crda.8.gz' $(Q)$(MKDIR) $(DESTDIR)$(MANDIR)/man8/ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ crda.8.gz -- 1.6.3.GIT -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html