From 927f709819e4389b4d18bc17766beb1fd2111282 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Tue, 29 Jun 2021 19:10:34 +0200 Subject: [PATCH] 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 --- Makefile | 24 ++++++++++--------- .../common-manylinux.crosstool | 4 ++-- common.crosstool => common/common.crosstool | 4 ++-- common.debian => common/common.debian | 0 common.dockcross => common/common.dockcross | 0 common.docker => common/common.docker | 0 .../common.label-and-env | 0 common.manylinux => common/common.manylinux | 0 common.windows => common/common.windows | 0 .../Fix-error-with-bash-5-and-up.patch | 0 .../crosstool-ng}/crosstool-ng-expat.patch | 0 11 files changed, 17 insertions(+), 15 deletions(-) rename common-manylinux.crosstool => common/common-manylinux.crosstool (94%) rename common.crosstool => common/common.crosstool (93%) rename common.debian => common/common.debian (100%) rename common.dockcross => common/common.dockcross (100%) rename common.docker => common/common.docker (100%) rename common.label-and-env => common/common.label-and-env (100%) rename common.manylinux => common/common.manylinux (100%) rename common.windows => common/common.windows (100%) rename imagefiles/{ => patch/crosstool-ng}/Fix-error-with-bash-5-and-up.patch (100%) rename imagefiles/{ => patch/crosstool-ng}/crosstool-ng-expat.patch (100%) diff --git a/Makefile b/Makefile index 2b0e99b..478fce6 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/common-manylinux.crosstool b/common/common-manylinux.crosstool similarity index 94% rename from common-manylinux.crosstool rename to common/common-manylinux.crosstool index e4f14d3..34bb485 100644 --- a/common-manylinux.crosstool +++ b/common/common-manylinux.crosstool @@ -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/ diff --git a/common.crosstool b/common/common.crosstool similarity index 93% rename from common.crosstool rename to common/common.crosstool index 15c8efd..5434ade 100644 --- a/common.crosstool +++ b/common/common.crosstool @@ -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/ diff --git a/common.debian b/common/common.debian similarity index 100% rename from common.debian rename to common/common.debian diff --git a/common.dockcross b/common/common.dockcross similarity index 100% rename from common.dockcross rename to common/common.dockcross diff --git a/common.docker b/common/common.docker similarity index 100% rename from common.docker rename to common/common.docker diff --git a/common.label-and-env b/common/common.label-and-env similarity index 100% rename from common.label-and-env rename to common/common.label-and-env diff --git a/common.manylinux b/common/common.manylinux similarity index 100% rename from common.manylinux rename to common/common.manylinux diff --git a/common.windows b/common/common.windows similarity index 100% rename from common.windows rename to common/common.windows diff --git a/imagefiles/Fix-error-with-bash-5-and-up.patch b/imagefiles/patch/crosstool-ng/Fix-error-with-bash-5-and-up.patch similarity index 100% rename from imagefiles/Fix-error-with-bash-5-and-up.patch rename to imagefiles/patch/crosstool-ng/Fix-error-with-bash-5-and-up.patch diff --git a/imagefiles/crosstool-ng-expat.patch b/imagefiles/patch/crosstool-ng/crosstool-ng-expat.patch similarity index 100% rename from imagefiles/crosstool-ng-expat.patch rename to imagefiles/patch/crosstool-ng/crosstool-ng-expat.patch