linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan McGee <dan@archlinux.org>
To: linux-sparse@vger.kernel.org
Cc: Dan McGee <dan@archlinux.org>
Subject: [PATCH] Makefile: fix permissions mixup on install
Date: Tue, 27 Oct 2009 19:46:08 -0500	[thread overview]
Message-ID: <1256690768-2577-1-git-send-email-dan@archlinux.org> (raw)
In-Reply-To: <449c10960910271737s4acf67dfsf29daf25fed9b53b@mail.gmail.com>

`install` by default uses 755 permissions; for everything but executables we
want to use 644 permissions.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
 Makefile |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 571673e..f6b0d2c 100644
--- a/Makefile
+++ b/Makefile
@@ -79,9 +79,12 @@ QUIET_LINK    = $(Q:@=@echo    '     LINK     '$@;)
 QUIET_INST_SH = $(Q:@=echo -n  '     INSTALL  ';)
 QUIET_INST    = $(Q:@=@echo -n '     INSTALL  ';)
 
-define INSTALL_CMD
+define INSTALL_PROG
 	$(Q)$(QUIET_INST_SH)install -v $1 $(DESTDIR)$2/$1 || exit 1;
+endef
 
+define INSTALL_OTHER
+	$(Q)$(QUIET_INST_SH)install -v -m 644 $1 $(DESTDIR)$2/$1 || exit 1;
 endef
 
 SED_PC_CMD = 's|@version@|$(VERSION)|g;		\
@@ -103,11 +106,11 @@ install: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
 	$(Q)install -d $(DESTDIR)$(MAN1DIR)
 	$(Q)install -d $(DESTDIR)$(INCLUDEDIR)/sparse
 	$(Q)install -d $(DESTDIR)$(PKGCONFIGDIR)
-	$(foreach f,$(INST_PROGRAMS),$(call INSTALL_CMD,$f,$(BINDIR)))
-	$(foreach f,$(INST_MAN1),$(call INSTALL_CMD,$f,$(MAN1DIR)))
-	$(foreach f,$(LIBS),$(call INSTALL_CMD,$f,$(LIBDIR)))
-	$(foreach f,$(LIB_H),$(call INSTALL_CMD,$f,$(INCLUDEDIR)/sparse))
-	$(call INSTALL_CMD,sparse.pc,$(PKGCONFIGDIR))
+	$(foreach f,$(INST_PROGRAMS),$(call INSTALL_PROG,$f,$(BINDIR)))
+	$(foreach f,$(INST_MAN1),$(call INSTALL_OTHER,$f,$(MAN1DIR)))
+	$(foreach f,$(LIBS),$(call INSTALL_OTHER,$f,$(LIBDIR)))
+	$(foreach f,$(LIB_H),$(call INSTALL_OTHER,$f,$(INCLUDEDIR)/sparse))
+	$(call INSTALL_OTHER,sparse.pc,$(PKGCONFIGDIR))
 
 sparse.pc: sparse.pc.in
 	$(QUIET_GEN)sed $(SED_PC_CMD) sparse.pc.in > sparse.pc
-- 
1.6.5.1


  reply	other threads:[~2009-10-28  0:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28  0:37 'make install' target issues Dan McGee
2009-10-28  0:46 ` Dan McGee [this message]
2009-10-28  4:05   ` [PATCH] Makefile: fix permissions mixup on install Christopher Li
2009-10-28  3:04 ` 'make install' target issues Christopher Li

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=1256690768-2577-1-git-send-email-dan@archlinux.org \
    --to=dan@archlinux.org \
    --cc=linux-sparse@vger.kernel.org \
    /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).