Skip to content

01 Configuration & extending

Marko Korhonen edited this page Feb 21, 2023 · 2 revisions

Project specific make targets

You can create mk files to folder tools/make/project and they will be included automatically.

Changing target prerequisites

There are some specific command chains which can be altered or replaced.

E.g. make fresh is actually something like make this and-that and-also-this

You can append a target:

DRUPAL_FRESH_TARGETS += my-new-command

Or totally change the order:

DRUPAL_FRESH_TARGETS := up build sync my-new-command post-install

Currently there are following chains:

BUILD_TARGETS
CLEAN_FOLDERS
DRUPAL_FRESH_TARGETS
DRUPAL_NEW_TARGETS
DRUPAL_POST_INSTALL_TARGETS
SYNC_TARGETS
LINT_PHP_TARGETS
FIX_TARGETS
TEST_TARGETS
SF_FRESH_TARGETS
WP_FRESH_TARGETS
WP_POST_INSTALL_TARGETS

Override variables

You can do override variables without touching core files by editing tools/make/override.mk. This file exists only in your project.

Example where we change variables about CLI service:

# Docker CLI container
CLI_SERVICE=myapp
CLI_USER=myuser
CLI_SHELL=bash
Clone this wiki locally