Skip to content

Commit

Permalink
deps/tools: [msys2] Fix tar file creation
Browse files Browse the repository at this point in the history
Add CREATE_TAR_FLAGS to avoid symbolic links under Windows build OS.
  • Loading branch information
stahta01 committed Mar 12, 2023
1 parent 441c570 commit 386ee94
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion deps/tools/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,18 @@ reinstall-$(strip $1):
+$$(MAKE) stage-$(strip $1)
+$$(MAKE) install-$(strip $1)

ifeq ($(BUILD_OS),WINNT)
# MSys2 has issues with symbolic links
CREATE_TAR_FLAGS := --dereference -cf
else
CREATE_TAR_FLAGS := -cf
endif

$$(build_staging)/$2.tar: $$(BUILDDIR)/$2/build-compiled
rm -rf $$(build_staging)/$2
mkdir -p $$(build_staging)/$2$$(build_prefix)
$(call $3,$$(BUILDDIR)/$2,$$(build_staging)/$2,$4)
cd $$(build_staging)/$2$$(build_prefix) && $$(TAR) -cf $$@.tmp .
cd $$(build_staging)/$2$$(build_prefix) && $$(TAR) $$(CREATE_TAR_FLAGS) $$@.tmp .
rm -rf $$(build_staging)/$2
mv $$@.tmp $$@

Expand Down

0 comments on commit 386ee94

Please sign in to comment.