aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2009-10-28 00:46:08 +0000
committerChristopher <sparse@chrisli.org>2010-03-28 17:51:36 -0700
commitfb73c74b5c4ac1b3abc55e232ce8ac72685dd981 (patch)
tree55ad0fa260ff7cc8225cd02b2a5e5bec965c5669
parentNew attribute designated_init: mark a struct as requiring designated init (diff)
downloadsparse-fb73c74b5c4ac1b3abc55e232ce8ac72685dd981.tar.gz
sparse-fb73c74b5c4ac1b3abc55e232ce8ac72685dd981.tar.bz2
sparse-fb73c74b5c4ac1b3abc55e232ce8ac72685dd981.zip
Makefile: fix permissions mixup on install
`install` by default uses 755 permissions; for everything but executables we want to use 644 permissions. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 80fce74..b07f472 100644
--- a/Makefile
+++ b/Makefile
@@ -79,8 +79,13 @@ QUIET_LINK = $(Q:@=@echo ' LINK '$@;)
QUIET_INST_SH = $(Q:@=echo -n ' INSTALL ';)
QUIET_INST = $(Q:@=@echo -n ' INSTALL ';)
-define INSTALL_CMD
- $(Q)$(QUIET_INST_SH)install -v $1 $(DESTDIR)$2/$1 || exit 1;
+define INSTALL_EXEC
+ $(QUIET_INST)install -v $1 $(DESTDIR)$2/$1 || exit 1;
+
+endef
+
+define INSTALL_FILE
+ $(QUIET_INST)install -v -m 644 $1 $(DESTDIR)$2/$1 || exit 1;
endef
@@ -103,11 +108,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_EXEC,$f,$(BINDIR)))
+ $(foreach f,$(INST_MAN1),$(call INSTALL_FILE,$f,$(MAN1DIR)))
+ $(foreach f,$(LIBS),$(call INSTALL_FILE,$f,$(LIBDIR)))
+ $(foreach f,$(LIB_H),$(call INSTALL_FILE,$f,$(INCLUDEDIR)/sparse))
+ $(call INSTALL_FILE,sparse.pc,$(PKGCONFIGDIR))
sparse.pc: sparse.pc.in
$(QUIET_GEN)sed $(SED_PC_CMD) sparse.pc.in > sparse.pc