Browse Source

Move Rack SDK outside of Docker image to allow updating Rack SDK without rebuilding Docker image.

arch-based-toolchain
Christoph Scholtes 1 year ago
parent
commit
e9b220d65d
4 changed files with 26 additions and 11 deletions
  1. +1
    -1
      .gitignore
  2. +0
    -5
      Dockerfile
  3. +12
    -5
      Makefile
  4. +13
    -0
      README.md

+ 1
- 1
.gitignore View File

@@ -1,5 +1,5 @@
MacOSX*.sdk.tar.*
local/
plugin-build/
Rack-SDK/
Rack-SDK-*/
osxcross/

+ 0
- 5
Dockerfile View File

@@ -32,9 +32,4 @@ RUN JOBS=$JOBS make toolchain-mac
RUN JOBS=$JOBS make toolchain-win
RUN JOBS=$JOBS make toolchain-lin

# Install Rack SDK
RUN make -j $JOBS rack-sdk-mac
RUN make -j $JOBS rack-sdk-win
RUN make -j $JOBS rack-sdk-lin

RUN rm MacOSX11.1.sdk.tar.*

+ 12
- 5
Makefile View File

@@ -17,10 +17,10 @@ export JOBS_CT_NG :=
endif

RACK_SDK_VERSION := 2.1.2
DOCKER_IMAGE_VERSION := 3

all: toolchain-all


# Toolchain build


@@ -114,8 +114,12 @@ $(rack-sdk-lin):
rm Rack-SDK-$(RACK_SDK_VERSION)-lin.zip
RACK_DIR_LIN := $(PWD)/$(rack-sdk-lin)

rack-sdk-clean:
rm -rf $(PWD)/Rack-SDK-mac $(PWD)/Rack-SDK-win $(PWD)/Rack-SDK-lin

rack-sdk-all: rack-sdk-mac rack-sdk-win rack-sdk-lin

toolchain-all: toolchain-lin toolchain-win toolchain-mac rack-sdk-mac rack-sdk-win rack-sdk-lin
toolchain-all: toolchain-lin toolchain-win toolchain-mac rack-sdk-all


toolchain-clean:
@@ -223,15 +227,18 @@ dep-arch-linux:
help2man


docker-build:
docker build --build-arg JOBS=$(JOBS) --tag rack-plugin-toolchain:2 .
docker-build: rack-sdk-all
docker build --build-arg JOBS=$(JOBS) --tag rack-plugin-toolchain:$(DOCKER_IMAGE_VERSION) .


DOCKER_RUN := docker run --rm --interactive --tty \
--volume=$(PLUGIN_DIR):/home/build/plugin-src \
--volume=$(PWD)/$(PLUGIN_BUILD_DIR):/home/build/rack-plugin-toolchain/$(PLUGIN_BUILD_DIR) \
--volume=$(PWD)/Rack-SDK-mac:/home/build/rack-plugin-toolchain/Rack-SDK-mac \
--volume=$(PWD)/Rack-SDK-win:/home/build/rack-plugin-toolchain/Rack-SDK-win \
--volume=$(PWD)/Rack-SDK-lin:/home/build/rack-plugin-toolchain/Rack-SDK-lin \
--env PLUGIN_DIR=/home/build/plugin-src \
rack-plugin-toolchain:2 \
rack-plugin-toolchain:$(DOCKER_IMAGE_VERSION) \
/bin/bash

docker-run:


+ 13
- 0
README.md View File

@@ -68,6 +68,19 @@ You may replace 8 with your desired number of parallel jobs, such as your number

Built plugin packages are placed in the `plugin-build/` directory.

### Rack SDK management

The latest Rack SDKs for all supported platforms are downloaded during the toolchain build.

The SDKs can be updated to the latest version (defined in the `Makefile`) as follows:

```
make rack-sdk-clean
make rack-sdk-all
```

This is especially convenient for the Docker-based toolchain, because it does not require to rebuild the entire toolchain to update to the latest SDK.

## Acknowledgments

Thanks to @cschol for help with crosstool-ng, Ubuntu, Docker, and testing.

Loading…
Cancel
Save