linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Michael Buesch <mb@bu3sch.de>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	Luis Rodriguez <mcgrof@gmail.com>
Subject: Re: [PATCH] wireless-regdb: Add install target to Makefile
Date: Sat, 27 Dec 2008 01:42:54 -0500	[thread overview]
Message-ID: <1230360174.2633.15.camel@dv> (raw)
In-Reply-To: <200812262342.57675.mb@bu3sch.de>

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@gnu.org>

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

  reply	other threads:[~2008-12-27  6:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-26 22:42 [PATCH] wireless-regdb: Add install target to Makefile Michael Buesch
2008-12-27  6:42 ` Pavel Roskin [this message]
2008-12-27  9:19   ` Michael Buesch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1230360174.2633.15.camel@dv \
    --to=proski@gnu.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    --cc=mcgrof@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).