diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/xpi.mk | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -66,6 +66,12 @@ # stripped prefixes is used. This value is used to determine # xpi:Provides. # +# MOZ_XPI_PRESERVE_PERMISSIONS (OPTIONAL): +# if defined (set to 1), the permission of the installed files +# will not be changed. If not defined or set to $(null), the +# permission of the files will be set to 644 and the permissions +# of scripts (files containing a shebang) will be set to 755. +# # Deprecated variables: # # MOZ_XPI_MOZILLA_DIRS /deprecated/ (OPTIONAL/NODEFAULT - see "Note:"): @@ -184,6 +190,10 @@ ifeq ($(origin MOZ_XPI_DOCUMENTED_LICENSE_FILES),undefined) cd $(install_dir) && find \( -iname copying -o -iname gpl.txt -o -iname licen[cs]e -o -iname licen[cs]e.txt \) -printf "xpi.mk: deleted %p\n" -delete endif endif +ifeq (,$(MOZ_XPI_PRESERVE_PERMISSIONS)) + find $(install_dir) -type d -exec chmod 755 {} \; + cd $(install_dir) && find * -type f | while read fn; do head -n1 "$$fn" | grep -q "^\#\!" && echo "xpi.mk: Made $$fn executable." && chmod 755 "$$fn" || chmod 644 "$$fn"; done +endif touch $@ installlinks-%-stamp: $(patsubst %,install-%-stamp,$(XPI_BASE_FILE)) |