From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from c60.cesmail.net ([216.154.195.49]:28882 "EHLO c60.cesmail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752580AbZAISYI (ORCPT ); Fri, 9 Jan 2009 13:24:08 -0500 Subject: [PATCH] wireless-regdb: fix Makefile to prevent unintended rebuilds To: "Luis R. Rodriguez" , linux-wireless@vger.kernel.org From: Pavel Roskin Date: Fri, 09 Jan 2009 13:24:05 -0500 Message-ID: <20090109182405.31872.62007.stgit@dv.roinet.com> (sfid-20090109_192414_386620_B3C9303E) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Sender: linux-wireless-owner@vger.kernel.org List-ID: 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 --- 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