Search Linux Wireless

[PATCH v2] wireless-regdb: fix Makefile to prevent unintended rebuilds

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

 



Rules depending on key.priv.pem should only be available if that file is
already present.  They should not trigger automatic generation of
key.priv.pem.

"make clean" should not remove files that can only be generated by the
maintainer.  Use "make maintainer-clean" for that.

"make clean" should remove *.pyc files.

Signed-off-by: Pavel Roskin <proski@xxxxxxx>
---
This revision of the patch contains a minor simplification.  Unlike the
first version, it will be sent to the right address (hopefully).

 Makefile |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 1d8ff2a..85d50bd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,20 @@
-.PHONY: all clean
+.PHONY: all clean maintainer-clean
 
 all: regulatory.bin key.pub.pem
 
 clean:
+	rm -f *.pyc
+
+maintainer-clean: clean
 	rm -f regulatory.bin key.pub.pem
 
+ifneq ($(wildcard key.priv.pem),)
 regulatory.bin: db.txt key.priv.pem
 	./db2bin.py regulatory.bin db.txt key.priv.pem
 
 key.pub.pem: key.priv.pem
 	openssl rsa -in key.priv.pem -out key.pub.pem -pubout -outform PEM
+endif
 
 key.priv.pem:
 	openssl genrsa -out key.priv.pem 2048


-- 
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