dotfiles/makefile
James Patrick d26d20d8d6 Simplified base level make to recursive make command.
It will look for all first level child `makefile`, and run assigned target. This
is equivalent to running:

```shell
for i in */makefile; do
  make -C $i $target
done
```
2019-04-27 18:15:45 -04:00

28 lines
484 B
Makefile

SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
include lib/shared.mk
define recursive_make
for i in */makefile; do; \
echo "`dirname $$i` " ; \
$(MAKE) -C $(SRC_DIR)/`dirname $$i` $1 ; \
echo "" ; \
done
endef
install:
$(info Initalizing)
$(call recursive_make,install)
init:
$(info Initalizing)
$(call recursive_make,init)
update:
$(info Updating)
$(call recursive_make,update)
remove:
$(info Removing)
$(call recursive_make,remove)