1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-14 15:20:06 +02:00
copilot/Makefile

26 lines
680 B
Makefile
Raw Normal View History

2016-10-14 13:57:26 +03:00
.PHONY: check
check:
@yarn install --prefer-offline
2016-10-27 18:02:10 +03:00
-@./bin/setup
SUBDIRS := $(dir $(wildcard */Makefile))
2016-10-31 19:09:00 +02:00
TARGETS := install clean test test-ci lint lint-ci build push # whatever else, but must not contain '/'
2016-10-24 17:52:46 +03:00
# foo/.all bar/.all foo/.clean bar/.clean
SUBDIRS_TARGETS := \
$(foreach t,$(TARGETS),$(addsuffix $t,$(SUBDIRS)))
.PHONY: $(TARGETS) $(SUBDIRS_TARGETS)
# static pattern rule, expands into:
# all clean: %: foo/.% bar/.%
$(TARGETS): %: $(addsuffix %,$(SUBDIRS))
@echo 'Done "$*" target'
# here, for foo/.all:
# $(@D) is foo
# $(@F) is .all, with leading period
# $(@F:.%=%) is just all
$(SUBDIRS_TARGETS):
$(MAKE) --no-print-directory -C $(@D) $(@F:.%=%)