Clean repos and fix clean rule

Move common files to common folder
Move patch files to patch folder
Fix clean rule in Makefile (Remove /Dockerfile in path, he is already there)

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2021-06-29 19:10:34 +02:00
parent 12a662e05c
commit 927f709819
11 changed files with 17 additions and 15 deletions

View File

@ -23,7 +23,10 @@ GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES))
# These images are expected to have explicit rules for *both* build and testing
NON_STANDARD_IMAGES = web-wasm manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64
# Docker composite files
DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows common-manylinux.crosstool common.dockcross common.label-and-env
DOCKER_COMPOSITE_FOLDER_PATH = common/
DOCKER_COMPOSITE_PATH = $(addprefix $(DOCKER_COMPOSITE_FOLDER_PATH),$(DOCKER_COMPOSITE_SOURCES))
# This list all available images
IMAGES = $(STANDARD_IMAGES) $(NON_STANDARD_IMAGES)
@ -61,16 +64,16 @@ test: base.test $(addsuffix .test,$(IMAGES))
# Generic Targets (can specialize later).
#
$(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOSITE_SOURCES)
$(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOSITE_PATH)
sed \
-e '/common.docker/ r common.docker' \
-e '/common.debian/ r common.debian' \
-e '/common.manylinux/ r common.manylinux' \
-e '/common.crosstool/ r common.crosstool' \
-e '/common-manylinux.crosstool/ r common-manylinux.crosstool' \
-e '/common.windows/ r common.windows' \
-e '/common.dockcross/ r common.dockcross' \
-e '/common.label-and-env/ r common.label-and-env' \
-e '/common.docker/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.docker' \
-e '/common.debian/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.debian' \
-e '/common.manylinux/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.manylinux' \
-e '/common.crosstool/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.crosstool' \
-e '/common-manylinux.crosstool/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common-manylinux.crosstool' \
-e '/common.windows/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.windows' \
-e '/common.dockcross/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.dockcross' \
-e '/common.label-and-env/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.label-and-env' \
$< > $@
#
@ -239,7 +242,6 @@ base: Dockerfile imagefiles/
base.test: base
$(DOCKER) run $(RM) $(ORG)/base > $(BIN)/dockcross-base && chmod +x $(BIN)/dockcross-base
#
# display
#
display_images:
@ -264,7 +266,7 @@ $(STANDARD_IMAGES): %: %/Dockerfile base
clean:
for d in $(STANDARD_IMAGES) ; do rm -rf $$d/imagefiles ; done
for d in $(GEN_IMAGE_DOCKERFILES) ; do rm -f $$d/Dockerfile ; done
for d in $(GEN_IMAGE_DOCKERFILES) ; do rm -f $$d ; done
rm -f Dockerfile
purge: clean

View File

@ -47,8 +47,8 @@ ENV XCC_PREFIX=/usr/xcc
# for users.
COPY \
imagefiles/install-crosstool-ng-toolchain.sh \
imagefiles/crosstool-ng-expat.patch \
imagefiles/Fix-error-with-bash-5-and-up.patch \
imagefiles/patch/crosstool-ng/crosstool-ng-expat.patch \
imagefiles/patch/crosstool-ng/Fix-error-with-bash-5-and-up.patch \
manylinux2014-aarch64/crosstool-ng.config \
/dockcross/

View File

@ -38,8 +38,8 @@ ENV XCC_PREFIX=/usr/xcc
# for users.
COPY \
imagefiles/install-crosstool-ng-toolchain.sh \
imagefiles/crosstool-ng-expat.patch \
imagefiles/Fix-error-with-bash-5-and-up.patch \
imagefiles/patch/crosstool-ng/crosstool-ng-expat.patch \
imagefiles/patch/crosstool-ng/Fix-error-with-bash-5-and-up.patch \
crosstool-ng.config \
/dockcross/