mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-23 00:54:26 +01:00
makefile: Ensure imagefiles are available in build image context
This commit is contained in:
parent
593d6a5c07
commit
191d773e01
4
.gitignore
vendored
4
.gitignore
vendored
@ -2,5 +2,5 @@ bin
|
|||||||
dockcross
|
dockcross
|
||||||
*/test/
|
*/test/
|
||||||
Dockerfile
|
Dockerfile
|
||||||
*/install-openssl.sh
|
*/imagefiles/*
|
||||||
!imagefiles/install-openssl.sh
|
!imagefiles/*
|
||||||
|
14
Makefile
14
Makefile
@ -39,7 +39,9 @@ test: base.test $(addsuffix .test,$(IMAGES))
|
|||||||
#
|
#
|
||||||
# browser-asmjs
|
# 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/
|
cp -r test browser-asmjs/
|
||||||
$(DOCKER) build -t $(ORG)/browser-asmjs \
|
$(DOCKER) build -t $(ORG)/browser-asmjs \
|
||||||
--build-arg IMAGE=$(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"` \
|
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||||
browser-asmjs
|
browser-asmjs
|
||||||
rm -rf browser-asmjs/test
|
rm -rf browser-asmjs/test
|
||||||
|
rm -rf $@/imagefiles
|
||||||
|
|
||||||
browser-asmjs.test: browser-asmjs
|
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
|
$(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"
|
$(BIN)/dockcross-browser-asmjs python test/run.py --exe-suffix ".js"
|
||||||
|
rm -rf browser-asmjs/test
|
||||||
|
|
||||||
#
|
#
|
||||||
# manylinux-x64
|
# 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
|
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
|
manylinux-x64: manylinux-x64/Dockerfile
|
||||||
|
mkdir -p $@/imagefiles && cp -r imagefiles $@/
|
||||||
$(DOCKER) build -t $(ORG)/manylinux-x64 \
|
$(DOCKER) build -t $(ORG)/manylinux-x64 \
|
||||||
--build-arg IMAGE=$(ORG)/manylinux-x64 \
|
--build-arg IMAGE=$(ORG)/manylinux-x64 \
|
||||||
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
||||||
--build-arg VCS_URL=`git config --get remote.origin.url` \
|
--build-arg VCS_URL=`git config --get remote.origin.url` \
|
||||||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||||
-f manylinux-x64/Dockerfile .
|
-f manylinux-x64/Dockerfile .
|
||||||
|
rm -rf $@/imagefiles
|
||||||
|
|
||||||
manylinux-x64.test: manylinux-x64
|
manylinux-x64.test: manylinux-x64
|
||||||
$(DOCKER) run --rm dockcross/manylinux-x64 > $(BIN)/dockcross-manylinux-x64 && chmod +x $(BIN)/dockcross-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
|
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
|
manylinux-x86: manylinux-x86/Dockerfile
|
||||||
|
mkdir -p $@/imagefiles && cp -r imagefiles $@/
|
||||||
$(DOCKER) build -t $(ORG)/manylinux-x86 \
|
$(DOCKER) build -t $(ORG)/manylinux-x86 \
|
||||||
--build-arg IMAGE=$(ORG)/manylinux-x86 \
|
--build-arg IMAGE=$(ORG)/manylinux-x86 \
|
||||||
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
||||||
--build-arg VCS_URL=`git config --get remote.origin.url` \
|
--build-arg VCS_URL=`git config --get remote.origin.url` \
|
||||||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||||
-f manylinux-x86/Dockerfile .
|
-f manylinux-x86/Dockerfile .
|
||||||
|
rm -rf $@/imagefiles
|
||||||
|
|
||||||
manylinux-x86.test: manylinux-x86
|
manylinux-x86.test: manylinux-x86
|
||||||
$(DOCKER) run --rm dockcross/manylinux-x86 > $(BIN)/dockcross-manylinux-x86 && chmod +x $(BIN)/dockcross-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
|
# build implicit rule
|
||||||
#
|
#
|
||||||
$(STANDARD_IMAGES): base
|
$(STANDARD_IMAGES): base
|
||||||
cp imagefiles/install-openssl.sh $@/
|
mkdir -p $@/imagefiles && cp -r imagefiles $@/
|
||||||
$(DOCKER) build -t $(ORG)/$@ \
|
$(DOCKER) build -t $(ORG)/$@ \
|
||||||
--build-arg IMAGE=$(ORG)/$@ \
|
--build-arg IMAGE=$(ORG)/$@ \
|
||||||
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
||||||
--build-arg VCS_URL=`git config --get remote.origin.url` \
|
--build-arg VCS_URL=`git config --get remote.origin.url` \
|
||||||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||||
$@
|
$@
|
||||||
|
rm -rf $@/imagefiles
|
||||||
|
|
||||||
#
|
#
|
||||||
# testing implicit rule
|
# testing implicit rule
|
||||||
|
@ -34,7 +34,7 @@ ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \
|
|||||||
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++
|
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++
|
||||||
|
|
||||||
|
|
||||||
COPY install-openssl.sh /dockcross/
|
COPY imagefiles/install-openssl.sh /dockcross/
|
||||||
RUN \
|
RUN \
|
||||||
/dockcross/install-openssl.sh -32 && \
|
/dockcross/install-openssl.sh -32 && \
|
||||||
rm /dockcross/install-openssl.sh
|
rm /dockcross/install-openssl.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user