summaryrefslogtreecommitdiff
path: root/apps/interpreters/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/interpreters/Makefile')
-rw-r--r--apps/interpreters/Makefile24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/interpreters/Makefile b/apps/interpreters/Makefile
index 5901fc830..1eeab585e 100644
--- a/apps/interpreters/Makefile
+++ b/apps/interpreters/Makefile
@@ -50,21 +50,21 @@ $(foreach DIR, $(SUBDIRS), $(eval $(call ADD_DIRECTORY,$(DIR))))
all: nothing
.PHONY: nothing context depend clean distclean
+define SDIR_template
+$(1)_$(2):
+ $(MAKE) -C $(1) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
+endef
+
+$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),depend)))
+$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),clean)))
+$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),disclean)))
+
nothing:
context:
-depend:
- @for dir in $(INSTALLED_DIRS) ; do \
- $(MAKE) -C $$dir depend TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
- done
+depend: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_depend)
-clean:
- @for dir in $(INSTALLED_DIRS) ; do \
- $(MAKE) -C $$dir clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
- done
+clean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_clean)
-distclean: clean
- @for dir in $(INSTALLED_DIRS) ; do \
- $(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
- done
+distclean: clean $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_distclean)