diff --git a/.gitignore b/.gitignore index c5ab058..5d65b6d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ bin dockcross */test/ Dockerfile -*/install-openssl.sh -!imagefiles/install-openssl.sh +*/imagefiles/* +!imagefiles/* diff --git a/Makefile b/Makefile index 42582a3..fd38ee2 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,9 @@ test: base.test $(addsuffix .test,$(IMAGES)) # # browser-asmjs # -browser-asmjs: base +browser-asmjs: base browser-asmjs/Dockerfile.in common.docker + sed '/common.docker/ r common.docker' $@/Dockerfile.in > $@/Dockerfile + mkdir -p $@/imagefiles && cp -r imagefiles $@/ cp -r test browser-asmjs/ $(DOCKER) build -t $(ORG)/browser-asmjs \ --build-arg IMAGE=$(ORG)/browser-asmjs \ @@ -48,10 +50,13 @@ browser-asmjs: base --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ browser-asmjs rm -rf browser-asmjs/test + rm -rf $@/imagefiles browser-asmjs.test: browser-asmjs + cp -r test browser-asmjs/ $(DOCKER) run --rm dockcross/browser-asmjs > $(BIN)/dockcross-browser-asmjs && chmod +x $(BIN)/dockcross-browser-asmjs $(BIN)/dockcross-browser-asmjs python test/run.py --exe-suffix ".js" + rm -rf browser-asmjs/test # # manylinux-x64 @@ -60,12 +65,14 @@ manylinux-x64/Dockerfile: manylinux-x64/Dockerfile.in common.docker common.manyl sed -e '/common.docker/ r common.docker' -e '/common.manylinux/ r common.manylinux' manylinux-x64/Dockerfile.in > manylinux-x64/Dockerfile manylinux-x64: manylinux-x64/Dockerfile + mkdir -p $@/imagefiles && cp -r imagefiles $@/ $(DOCKER) build -t $(ORG)/manylinux-x64 \ --build-arg IMAGE=$(ORG)/manylinux-x64 \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg VCS_URL=`git config --get remote.origin.url` \ --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ -f manylinux-x64/Dockerfile . + rm -rf $@/imagefiles manylinux-x64.test: manylinux-x64 $(DOCKER) run --rm dockcross/manylinux-x64 > $(BIN)/dockcross-manylinux-x64 && chmod +x $(BIN)/dockcross-manylinux-x64 @@ -78,12 +85,14 @@ manylinux-x86/Dockerfile: manylinux-x86/Dockerfile.in common.docker common.manyl sed -e '/common.docker/ r common.docker' -e '/common.manylinux/ r common.manylinux' manylinux-x86/Dockerfile.in > manylinux-x86/Dockerfile manylinux-x86: manylinux-x86/Dockerfile + mkdir -p $@/imagefiles && cp -r imagefiles $@/ $(DOCKER) build -t $(ORG)/manylinux-x86 \ --build-arg IMAGE=$(ORG)/manylinux-x86 \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg VCS_URL=`git config --get remote.origin.url` \ --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ -f manylinux-x86/Dockerfile . + rm -rf $@/imagefiles manylinux-x86.test: manylinux-x86 $(DOCKER) run --rm dockcross/manylinux-x86 > $(BIN)/dockcross-manylinux-x86 && chmod +x $(BIN)/dockcross-manylinux-x86 @@ -116,13 +125,14 @@ $(VERBOSE).SILENT: display_images # build implicit rule # $(STANDARD_IMAGES): base - cp imagefiles/install-openssl.sh $@/ + mkdir -p $@/imagefiles && cp -r imagefiles $@/ $(DOCKER) build -t $(ORG)/$@ \ --build-arg IMAGE=$(ORG)/$@ \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg VCS_URL=`git config --get remote.origin.url` \ --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ $@ + rm -rf $@/imagefiles # # testing implicit rule diff --git a/linux-x86/Dockerfile b/linux-x86/Dockerfile index b3754c8..62fa062 100644 --- a/linux-x86/Dockerfile +++ b/linux-x86/Dockerfile @@ -34,7 +34,7 @@ ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \ CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ -COPY install-openssl.sh /dockcross/ +COPY imagefiles/install-openssl.sh /dockcross/ RUN \ /dockcross/install-openssl.sh -32 && \ rm /dockcross/install-openssl.sh