summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2012-10-24 10:56:55 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2012-10-24 10:57:11 +0100
commit8d823369bad1be0e429f4c231dad4074974797a5 (patch)
tree84040d2eb03e9897863c6c7543bb64127ae94a17
parentaf7e594ba961dca39e9e9fb5d4f3693ad213c480 (diff)
downloadbuildsystem-8d823369bad1be0e429f4c231dad4074974797a5.tar.gz
buildsystem-8d823369bad1be0e429f4c231dad4074974797a5.tar.bz2
Install binaries with correct permissions.
-rw-r--r--makefiles/Makefile.top24
1 files changed, 20 insertions, 4 deletions
diff --git a/makefiles/Makefile.top b/makefiles/Makefile.top
index 99651fc..4d6747d 100644
--- a/makefiles/Makefile.top
+++ b/makefiles/Makefile.top
@@ -286,6 +286,25 @@ define install_shared_lib
$(INSTALL) $(INSTALLFLAGS) -m 755 $1 $2/$(notdir $1)
$(LN) $(LNFLAGS) -f -s $(notdir $1) $2/$(SONAME)
$(LN) $(LNFLAGS) -f -s $(notdir $1) $2/$(SHAREDLIBNAME)
+
+endef
+
+# Install a binary or normal file ($1) to the specified location ($2)
+define install_binary_or_normal_file
+ $(if $(and $(filter binary,$(COMPONENT_TYPE)), \
+ $(filter $(OUTPUT),$1)), \
+ $(INSTALL) $(INSTALLFLAGS) -m 755 $1 $2,
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $1 $2)
+
+endef
+
+# Install a non-pkgconfig file ($1) to the specified location ($2)
+define install_non_pkgconfig
+ $(if $(and $(filter lib-shared,$(COMPONENT_TYPE)), \
+ $(filter $(OUTPUT),$1)), \
+ $(call install_shared_lib,$1,$2), \
+ $(call install_binary_or_normal_file,$1,$2))
+
endef
# Install a file ($1) to the specified location ($2)
@@ -293,10 +312,7 @@ define install_file
$(if $1, \
$(if $(findstring .pc.in,$1), \
$(call install_pkgconfig,$1,$2), \
- $(if $(and $(filter lib-shared,$(COMPONENT_TYPE)), \
- $(filter $(OUTPUT),$1)), \
- $(call install_shared_lib,$1,$2), \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $1 $2)))
+ $(call install_non_pkgconfig,$1,$2)))
endef