blob: f1b275978b62f386ea54ee7f6b59684baa757cf6 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# build docker compose images:
# $ make -f Makefile.docker build-cpp
# To run the test suite
# $ make -f Makefile.docker cpp
LANGUAGES = cpp cpp-alpine cpp-cmake32 c_glib go java js python python-alpine rust r r-sanitizer
MISC = lint iwyu clang-format docs pandas-master
TESTS = dask hdfs-integration spark-integration python-nopandas
# declare images dependencies
DEPENDS_ON_CPP = build-c_glib build-python build-r
DEPENDS_ON_CPP_ALPINE = build-python-alpine
DEPENDS_ON_PYTHON = build-lint build-docs build-dask build-hdfs-integration \
build-spark-integration build-python-nopandas \
build-turbodbc-integration
DEPENDS_ON_LINT = build-iwyu build-clang-format
SERVICES = $(LANGUAGES) $(MISC) $(TESTS)
.PHONY: clean build-% run-% $(SERVICES)
DC := docker-compose
clean:
$(DC) down -v
# Default build target if no dependencies
build-%:
$(DC) build $*
# The following targets create the dependencies of the form `build-X: build-Y`
$(DEPENDS_ON_CPP): build-%: build-cpp
$(DC) build $*
$(DEPENDS_ON_CPP_ALPINE): build-%: build-cpp-alpine
$(DC) build $*
$(DEPENDS_ON_PYTHON): build-%: build-python
$(DC) build $*
# The dependents of lint image don't build anything
$(DEPENDS_ON_LINT): build-%: build-lint
# panda master is a special case due to --no-cache
build-pandas-master: build-python
$(DC) build --no-cache pandas-master
run-%: build-%
$(DC) run --rm $*
# Trick to get `service` expand to `run-service`
$(SERVICES): % : run-%