Skip to content

Commit 9f66ea0

Browse files
committed
Fix path munging in dist rule.
1 parent f06c01f commit 9f66ea0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mk/dist.mk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ PKG_GITMODULES := \
2323
$(wildcard $(S)src/llvm/*)) \
2424
$(PKG_LLVM_SKEL)
2525

26-
PKG_FILES = \
26+
PKG_FILES := \
2727
$(S)LICENSE.txt $(S)README.txt \
2828
$(S)configure $(S)Makefile.in \
29-
$(S)/doc \
29+
$(S)doc \
3030
$(addprefix $(S)src/, \
3131
README.txt \
3232
cargo \
@@ -42,8 +42,9 @@ PKG_FILES = \
4242
snapshots.txt \
4343
test) \
4444
$(PKG_GITMODULES) \
45-
$(MKFILE_DEPS)
45+
$(filter-out Makefile config.mk, $(MKFILE_DEPS))
4646

47+
UNROOTED_PKG_FILES := $(patsubst $(S)%,./%,$(PKG_FILES))
4748

4849
lic.txt: $(S)LICENSE.txt
4950
@$(call E, crlf: $@)
@@ -58,7 +59,7 @@ $(PKG_TAR): $(PKG_FILES)
5859
@$(call E, making dist dir)
5960
$(Q)rm -Rf dist
6061
$(Q)mkdir -p dist/$(PKG_DIR)
61-
$(Q)tar -c $(PKG_FILES) | tar -x -C dist/$(PKG_DIR)
62+
$(Q)tar -C $(S) -c $(UNROOTED_PKG_FILES) | tar -x -C dist/$(PKG_DIR)
6263
$(Q)tar -czf $(PKG_TAR) -C dist $(PKG_DIR)
6364
$(Q)rm -Rf dist
6465

0 commit comments

Comments
 (0)