Search Linux Wireless

Re: [PATCH] wireless-regdb: Add install target to Makefile

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

 



On Fri, 2008-12-26 at 23:42 +0100, Michael Buesch wrote:
> +install:
> +	-install -o 0 -g 0 -m 644 regulatory.bin $(PREFIX)/lib/crda/regulatory.bin

The directory should be created first.  Most likely it doesn't exist.

Also, the minus in front of the "install" command is harmful.  Errors
should not be ignored.  If the file is not installed, "make install"
should fail.

"install -D" is not widely used in makefiles, so let's do it in two
steps.  $(PREFIX)/lib/crda/ could be abstracted as another variable.

Here's my take:

wireless-regdb: Add install target to Makefile

Signed-off-by: Pavel Roskin <proski@xxxxxxx>

diff --git a/Makefile b/Makefile
index 1d8ff2a..56881a7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,8 @@
-.PHONY: all clean
+# Install prefix
+PREFIX = /usr
+CDRA_PATH = $(PREFIX)/lib/crda
+
+.PHONY: all clean install
 
 all: regulatory.bin key.pub.pem
 
@@ -13,3 +17,7 @@ key.pub.pem: key.priv.pem
 
 key.priv.pem:
 	openssl genrsa -out key.priv.pem 2048
+
+install:
+	install -o 0 -g 0 -m 755 -d $(CDRA_PATH)
+	install -o 0 -g 0 -m 644 regulatory.bin $(CDRA_PATH)/regulatory.bin

-- 
Regards,
Pavel Roskin
--
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

[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