Skip to content

Commit

Permalink
boa: fix compile error when path with space (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
FeelyChau authored Jul 9, 2020
1 parent f1e57e5 commit dbeac3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions packages/boa/pybind11/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ROOT=$(abspath .)
VERSION=2.4.3

BUILD=$(ROOT)/src
DOWNLOAD_DIR=$(ROOT)/downloads
ARCHIVE_DIR=$(DOWNLOAD_DIR)/pybind11-$(VERSION)
TARBALL=$(DOWNLOAD_DIR)/pybind11-v$(VERSION).tgz
BUILD="$(ROOT)/src"
DOWNLOAD_DIR="$(ROOT)/downloads"
ARCHIVE_DIR="$(ROOT)/downloads/pybind11-$(VERSION)"
TARBALL="$(ROOT)/downloads/pybind11-v$(VERSION).tgz"
URL=https://github.com/pybind/pybind11/archive/v$(VERSION).tar.gz

UNAME_S := $(shell uname -s)
Expand All @@ -22,10 +22,10 @@ pybind11: $(BUILD)

$(BUILD):
rm -rf $(BUILD)
mkdir -p $(ROOT)/downloads
mkdir -p $(DOWNLOAD_DIR)
[ -f $(TARBALL) ] || $(DOWNLOAD)
$(MD5CMD)
tar -C $(dir $(ARCHIVE_DIR)) -xf $(TARBALL)
tar -C $(DOWNLOAD_DIR) -xf $(TARBALL)
mv $(ARCHIVE_DIR) $(BUILD)
rm -rf $(DOWNLOAD_DIR)

Expand Down
13 changes: 7 additions & 6 deletions packages/boa/pyodide/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
ROOT=$(abspath .)
VERSION = 0.15.0

BUILD=$(ROOT)/build/$(VERSION)/pyodide-$(VERSION)
TARBALL=$(ROOT)/downloads/pyodide-$(VERSION).tgz
VERSION_DIR="$(ROOT)/build/$(VERSION)"
BUILD="$(VERSION_DIR)/pyodide-$(VERSION)"
TARBALL="$(ROOT)/downloads/pyodide-$(VERSION).tgz"
URL=https://github.com/iodide-project/pyodide/archive/$(VERSION).tar.gz

all: $(BUILD)

$(BUILD): $(TARBALL)
[ -d $(BUILD) ] || (mkdir -p $(dir $(BUILD)); tar -C $(dir $(BUILD)) -xf $(TARBALL))
[ -d $(BUILD) ] || (mkdir -p $(VERSION_DIR); tar -C $(VERSION_DIR) -xf $(TARBALL))
( \
cd $(BUILD) && \
make \
)

$(TARBALL):
[ -d $(ROOT)/downloads ] || mkdir $(ROOT)/downloads
wget -q -O $@ $(URL)
md5sum --quiet --check checksums || (rm $@; false)
[ -d "$(ROOT)/downloads" ] || mkdir "$(ROOT)/downloads"
wget -q -O $(TARBALL) $(URL)
md5sum --quiet --check checksums || (rm $(TARBALL); false)

0 comments on commit dbeac3b

Please sign in to comment.