diff --git a/Makefile b/Makefile index 882beb6172f8f..4a309d280df95 100644 --- a/Makefile +++ b/Makefile @@ -515,10 +515,13 @@ endif # Make tarball with only Julia code light-source-dist: light-source-dist.tmp - # Prefix everything with the current directory name (usually "julia"), then create tarball - DIRNAME=$$(basename $$(pwd)); \ - sed -e "s_.*_$$DIRNAME/&_" light-source-dist.tmp > light-source-dist.tmp1; \ - cd ../ && tar -cz --no-recursion -T $$DIRNAME/light-source-dist.tmp1 -f $$DIRNAME/julia-$(JULIA_VERSION)_$(JULIA_COMMIT).tar.gz + # Prefix everything with "julia-$(commit-sha)/" or "julia-$(version)/" and then create tarball + # To achieve prefixing, we temporarily create a symlink in the source directory that points back + # to the source directory. + sed -e "s_.*_julia-${JULIA_COMMIT}/&_" light-source-dist.tmp > light-source-dist.tmp1 + ln -s . julia-${JULIA_COMMIT} + tar -cz --no-recursion -T light-source-dist.tmp1 -f julia-$(JULIA_VERSION)_$(JULIA_COMMIT).tar.gz + rm julia-${JULIA_COMMIT} source-dist: @echo \'source-dist\' target is deprecated: use \'full-source-dist\' instead. @@ -532,10 +535,13 @@ full-source-dist: light-source-dist.tmp cp light-source-dist.tmp full-source-dist.tmp -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 - # Prefix everything with the current directory name (usually "julia"), then create tarball - DIRNAME=$$(basename $$(pwd)); \ - sed -e "s_.*_$$DIRNAME/&_" full-source-dist.tmp > full-source-dist.tmp1; \ - cd ../ && tar -cz --no-recursion -T $$DIRNAME/full-source-dist.tmp1 -f $$DIRNAME/julia-$(JULIA_VERSION)_$(JULIA_COMMIT)-full.tar.gz + # Prefix everything with "julia-$(commit-sha)/" or "julia-$(version)/" and then create tarball + # To achieve prefixing, we temporarily create a symlink in the source directory that points back + # to the source directory. + sed -e "s_.*_julia-${JULIA_COMMIT}/&_" full-source-dist.tmp > full-source-dist.tmp1 + ln -s . julia-${JULIA_COMMIT} + tar -cz --no-recursion -T full-source-dist.tmp1 -f julia-$(JULIA_VERSION)_$(JULIA_COMMIT)-full.tar.gz + rm julia-${JULIA_COMMIT} clean: | $(CLEAN_TARGETS) @-$(MAKE) -C $(BUILDROOT)/base clean