@@ -515,10 +515,9 @@ endif
515515
516516# Make tarball with only Julia code
517517light-source-dist : light-source-dist.tmp
518- # Prefix everything with the current directory name (usually "julia"), then create tarball
519- DIRNAME=$$(basename $$(pwd ) ) ; \
520- sed -e " s_.*_$$ DIRNAME/&_" light-source-dist.tmp > light-source-dist.tmp1; \
521- cd ../ && tar -cz --no-recursion -T $$ DIRNAME/light-source-dist.tmp1 -f $$ DIRNAME/julia-$(JULIA_VERSION ) _$(JULIA_COMMIT ) .tar.gz
518+ # The --transform option prepends julia-$(commit-sha)/ or julia-$(version)/ to filenames
519+ # (but requires a tar implementation supporting it).
520+ tar -cz --no-recursion --transform " s/^/julia-$( JULIA_COMMIT) \//" -T light-source-dist.tmp -f julia-$(JULIA_VERSION ) _$(JULIA_COMMIT ) .tar.gz
522521
523522source-dist :
524523 @echo \' source-dist\' target is deprecated: use \' full-source-dist\' instead.
@@ -532,10 +531,9 @@ full-source-dist: light-source-dist.tmp
532531 cp light-source-dist.tmp full-source-dist.tmp
533532 -ls deps/srccache/*.tar.gz deps/srccache/*.tar.bz2 deps/srccache/*.tar.xz deps/srccache/*.tgz deps/srccache/*.zip deps/srccache/*.pem >> full-source-dist.tmp
534533
535- # Prefix everything with the current directory name (usually "julia"), then create tarball
536- DIRNAME=$$(basename $$(pwd)); \
537- sed -e "s_.*_$$DIRNAME/&_" full-source-dist.tmp > full-source-dist.tmp1; \
538- cd ../ && tar -cz --no-recursion -T $$DIRNAME/full-source-dist.tmp1 -f $$DIRNAME/julia-$(JULIA_VERSION)_$(JULIA_COMMIT)-full.tar.gz
534+ # Create the tarball. The --transform option prepends julia-$(commit-sha)/ or
535+ # julia-$(version)/ to filenames (but requires a tar implementation supporting it).
536+ tar -cz --no-recursion --transform "s/^/julia-$(JULIA_COMMIT)\//" -T full-source-dist.tmp -f julia-$(JULIA_VERSION)_$(JULIA_COMMIT)-full.tar.gz
539537
540538clean : | $(CLEAN_TARGETS )
541539 @-$(MAKE ) -C $(BUILDROOT ) /base clean
0 commit comments