Search Linux Wireless

[PATCH] iw: Makefile changes for easier packaging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Attached is a trivial patch to make packaging a bit easier.
No strong feelings either way, so rejection will cause no
hard feelings :-)

-RW
Trivial patch for easier packaging of iw
Signed-off-by: Robby Workman <rworkman@xxxxxxxxxxxxx>
---
diff --git a/Makefile b/Makefile
index 3fa0a83..df59b51 100644
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,14 @@
 
 MAKEFLAGS += --no-print-directory
 
+PREFIX ?= /usr
+BINDIR ?= $(PREFIX)/bin
+MANDIR ?= $(PREFIX)/share/man
+
 MKDIR ?= mkdir -p
 INSTALL ?= install
-PREFIX ?= /usr
 CC ?= "gcc"
+
 CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration `pkg-config --cflags libnl-1`
 CFLAGS += -O2 -g
 LDFLAGS += `pkg-config --libs libnl-1`
@@ -49,11 +53,11 @@ check:
 
 install: iw iw.8.gz
 	@$(NQ) ' INST iw'
-	$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)/bin/
-	$(Q)$(INSTALL) -m 755 -o root -g root -t $(DESTDIR)$(PREFIX)/bin/ iw
+	$(Q)$(MKDIR) $(DESTDIR)$(BINDIR)
+	$(Q)$(INSTALL) -m 755 -t $(DESTDIR)$(BINDIR) iw
 	@$(NQ) ' INST iw.8'
-	$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)/share/man/man8/
-	$(Q)$(INSTALL) -m 644 -o root -g root -t $(DESTDIR)$(PREFIX)/share/man/man8/ iw.8.gz
+	$(Q)$(MKDIR) $(DESTDIR)$(MANDIR)/man8/
+	$(Q)$(INSTALL) -m 644 -t $(DESTDIR)$(MANDIR)/man8/ iw.8.gz
 
 clean:
 	$(Q)rm -f iw *.o *~ *.gz version.h *-stamp

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux