linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/5] Separate install target into exec, udev and man sub-parts.
@ 2009-06-30 21:19 Jon Loeliger
  0 siblings, 0 replies; only message in thread
From: Jon Loeliger @ 2009-06-30 21:19 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless@vger.kernel.org

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@bigfootnetworks.com>
---
 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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-30 21:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30 21:19 [PATCH 2/5] Separate install target into exec, udev and man sub-parts Jon Loeliger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).