Skip to content

Commit 0abf4c4

Browse files
committed
make: Allow local overrides
- add Makefile.local support - document how to override the docker-compose file
1 parent dd8a04a commit 0abf4c4

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

Makefile

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License & terms of use: http://www.unicode.org/copyright.html
33

44
DIRS=tmp src tmp/.ccache dist
5-
5+
DOCKER_COMPOSE=docker-compose
66
ICU_REPO=http://source.icu-project.org/repos/icu/trunk
77
BINPATH=/src/bin/
88
DISTROS=$(shell cd dockerfiles;ls)
@@ -20,42 +20,42 @@ dirs:
2020
chmod -R o+rX src
2121

2222
dbuild: docker-compose.yml
23-
docker-compose build
23+
$(DOCKER_COMPOSE) build
2424

2525
build-all: all
2626
for distro in $(DISTROS); do \
2727
echo $$distro ; \
28-
( docker-compose run $$distro bash $(BINPATH)/build.sh || exit 1); \
28+
( $(DOCKER_COMPOSE) run $$distro bash $(BINPATH)/build.sh || exit 1); \
2929
done
3030
echo all OK
3131

3232
check-all: all
3333
for distro in $(DISTROS); do \
3434
echo $$distro ; \
3535
rm -f $$distro.fail ; \
36-
( docker-compose run $$distro bash $(BINPATH)/check.sh || (>$$distro.fail; exit 1)) >&1 | tee $$distro.out; \
36+
( $(DOCKER_COMPOSE) run $$distro bash $(BINPATH)/check.sh || (>$$distro.fail; exit 1)) >&1 | tee $$distro.out; \
3737
done
3838
echo all OK
3939

4040
check-some: all
4141
for distro in $(DISTROS_SMALL); do \
4242
echo $$distro ; \
4343
rm -f $$distro.fail ; \
44-
( docker-compose run $$distro bash $(BINPATH)/check.sh || (>$$distro.fail; exit 1)) >&1 | tee $$distro.out; \
44+
( $(DOCKER_COMPOSE) run $$distro bash $(BINPATH)/check.sh || (>$$distro.fail; exit 1)) >&1 | tee $$distro.out; \
4545
done
4646
echo all OK
4747

4848
dist-all: all
4949
for distro in $(DISTROS); do \
5050
echo $$distro ; \
51-
( docker-compose run $$distro env REV=$(REV) WHAT=$$distro $(BINPATH)/makedist.sh $$distro || exit 1); \
51+
( $(DOCKER_COMPOSE) run $$distro env REV=$(REV) WHAT=$$distro $(BINPATH)/makedist.sh $$distro || exit 1); \
5252
done
5353
echo all OK
5454

5555
dist-some: all
5656
for distro in $(DISTROS_SMALL); do \
5757
echo $$distro ; \
58-
( docker-compose run $$distro env REV=$(REV) WHAT=$$distro $(BINPATH)/makedist.sh $$distro || exit 1); \
58+
( $(DOCKER_COMPOSE) run $$distro env REV=$(REV) WHAT=$$distro $(BINPATH)/makedist.sh $$distro || exit 1); \
5959
done
6060
echo all OK
6161

@@ -64,14 +64,14 @@ dist: sdist dist-some
6464
sdist: all
6565
for distro in $(firstword $(DISTROS_SMALL)); do \
6666
echo $$distro ; \
67-
( docker-compose run $$distro env REV=$(REV) WHAT=$$distro $(BINPATH)/makesdoc.sh $$distro || exit 1); \
67+
( $(DOCKER_COMPOSE) run $$distro env REV=$(REV) WHAT=$$distro $(BINPATH)/makesdoc.sh $$distro || exit 1); \
6868
done
6969
echo all OK
7070

7171
perf-all: all
7272
for distro in $(DISTROS); do \
7373
echo $$distro ; \
74-
( docker-compose run $$distro bash $(BINPATH)/perf.sh $$distro || exit 1); \
74+
( $(DOCKER_COMPOSE) run $$distro bash $(BINPATH)/perf.sh $$distro || exit 1); \
7575
done
7676
echo all OK
7777

@@ -80,8 +80,6 @@ perf-all: all
8080
pretest-run.pl:
8181
wget http://git.savannah.gnu.org/cgit/pretest.git/plain/pretest-run.pl
8282

83-
84-
8583
-include Makefile.local
8684

8785

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
This is a set of dockerfiles and a Makefile to develop with ICU (against Ubuntu, Fedora, anything else you can run from docker).
66
It sets up `ccache` to share cached compiler output in `./tmp/.ccache` and expects an ICU source directory under `./src/icu`
77

8+
## Customization
9+
10+
You can create a `Makefile.local` that can point to a different docker-compose.yaml:
11+
12+
```
13+
# Makefile.local
14+
DOCKER_COMPOSE=docker-compose -f local-docker-compose.yml
15+
```
816

917
## Usage
1018

0 commit comments

Comments
 (0)