X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=Configurations%2Funix-Makefile.tmpl;h=fea5be840746113386d3265bac887fed985b7281;hp=0603b4144d28068c6e138959495c6844094ced8f;hb=dc6a62d5d5de905776433ab8ab6b1b2fffaae1ea;hpb=5b7b0115256c4d0be0f92468df14bdf1c57634a5 diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 0603b4144d..fea5be8407 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -679,9 +679,12 @@ tags TAGS: FORCE # Release targets (note: only available on Unix) ##################### +# If your tar command doesn't support --owner and --group, make sure to +# use one that does, for example GNU tar TAR_COMMAND=$(TAR) $(TARFLAGS) --owner 0 --group 0 -cvf - PREPARE_CMD=: tar: + set -e; \ TMPDIR=/var/tmp/openssl-copy.$$$$; \ DISTDIR=$(NAME); \ mkdir -p $$TMPDIR/$$DISTDIR; \ @@ -690,23 +693,23 @@ tar: excl_re="^(fuzz/corpora|`echo $$excl_re | sed -e 's/ /$$|/g'`\$$)"; \ echo "$$excl_re"; \ git ls-tree -r --name-only --full-tree HEAD \ - | grep -v -E "$$excl_re" \ + | egrep -v "$$excl_re" \ | while read F; do \ mkdir -p $$TMPDIR/$$DISTDIR/`dirname $$F`; \ cp $$F $$TMPDIR/$$DISTDIR/$$F; \ done); \ - (cd $$TMPDIR; \ + (cd $$TMPDIR/$$DISTDIR; \ $(PREPARE_CMD); \ - find $$TMPDIR/$$DISTDIR -type d -print | xargs chmod 755; \ - find $$TMPDIR/$$DISTDIR -type f -print | xargs chmod a+r; \ - find $$TMPDIR/$$DISTDIR -type f -perm -0100 -print | xargs chmod a+x; \ - $(TAR_COMMAND) $$DISTDIR) \ + find . -type d -print | xargs chmod 755; \ + find . -type f -print | xargs chmod a+r; \ + find . -type f -perm -0100 -print | xargs chmod a+x); \ + (cd $$TMPDIR; $(TAR_COMMAND) $$DISTDIR) \ | (cd $(SRCDIR); gzip --best > $(TARFILE).gz); \ rm -rf $$TMPDIR cd $(SRCDIR); ls -l $(TARFILE).gz dist: - @$(MAKE) PREPARE_CMD='$(PERL) ./Configure dist' tar + @$(MAKE) PREPARE_CMD='$(PERL) ./Configure dist' TARFILE="$(TARFILE)" NAME="$(NAME)" tar # Helper targets #####################################################