Fix handling of multiple deps
authorSiraaj Khandkar <siraaj@khandkar.net>
Thu, 5 Sep 2019 03:47:55 +0000 (23:47 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Thu, 5 Sep 2019 03:47:55 +0000 (23:47 -0400)
Makefile

index 31d0fdf..c3b5f06 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
 MAKEFLAGS := --no-builtin-rules
 
-.PHONY: home pkgs_deb_install pkgs_deb_purge pkgs deps
+DEPS := $(wildcard deps/*)
+
+.PHONY: home pkgs_deb_install pkgs_deb_purge pkgs deps $(DEPS)
 
 home:
        @cp  -Rp  home/bin           $(HOME)/
@@ -33,5 +35,11 @@ pkgs_snap_classic: list pkgs-snap-classic.list
 pkg_snap_classic_%:
        sudo snap install --classic $*
 
-deps:
-       @$(foreach d,$(wildcard deps/*),cd $(d) && make)
+deps: $(DEPS)
+
+define GEN_DEP_RULE
+$(1):
+       cd $1 && make
+endef
+
+$(foreach d,$(DEPS),$(eval $(call GEN_DEP_RULE,$(d))))
This page took 0.024742 seconds and 4 git commands to generate.