linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless-regdb: fix Makefile to prevent unintended rebuilds
@ 2009-01-09 18:24 Pavel Roskin
  0 siblings, 0 replies; only message in thread
From: Pavel Roskin @ 2009-01-09 18:24 UTC (permalink / raw)
  To: Luis R. Rodriguez, linux-wireless

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@gnu.org>
---
 Makefile |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 1d8ff2a..7a0749b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,21 @@
-.PHONY: all clean
+.PHONY: all clean maintainer-clean
 
 all: regulatory.bin key.pub.pem
 
 clean:
+	rm -f *.pyc
+
+maintainer-clean:
+	$(MAKE) 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

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

only message in thread, other threads:[~2009-01-09 18:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-09 18:24 [PATCH] wireless-regdb: fix Makefile to prevent unintended rebuilds Pavel Roskin

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