# -*- make -*- export dir_symbol += - USE_ABSOLUTE_TOPDIR ?= 0 ifneq ($(USE_ABSOLUTE_TOPDIR),0) TOPDIR_FOR_SUBDIR=$(shell pwd) endif nullstring := space := $(nullstring) # keep it to assign space subdirs: $(SUBDIRS) $(SUBDIRS): echo $(subst $(space),,$(dir_symbol))'|' $@ $(MAKECMDGOALS) ifeq ($(USE_ABSOLUTE_TOPDIR),0) $(MAKE) -C $@ $(MAKECMDGOALS) else TOPDIR="$(TOPDIR_FOR_SUBDIR)" $(MAKE) -C $@ $(MAKECMDGOALS) endif .PHONY: $(SUBDIRS)