wmii/mk/dir.mk
2009-10-26 16:35:43 -04:00

34 lines
648 B
Makefile

MKSUBDIR = \
set -e; \
targ=$@; targ=$${targ\#d}; \
for i in $$dirs; do \
export $(SUBMAKE_EXPORT); \
export BASE=$(BASE)$$i/; \
if [ ! -d $$i ]; then \
echo Skipping nonexistent directory: $$i 1>&2; \
else \
echo MAKE $$targ $$BASE; \
(cd $$i && $(MAKE) $$targ) || exit $?; \
fi; \
done
dall:
+dirs="$(DIRS)"; $(MKSUBDIR)
dclean:
+dirs="$(DIRS)"; $(MKSUBDIR)
dinstall:
+dirs="$(INSTDIRS)"; $(MKSUBDIR)
duninstall:
+dirs="$(INSTDIRS)"; $(MKSUBDIR)
ddepend:
+dirs="$(DIRS)"; $(MKSUBDIR)
all: dall
clean: dclean
install: dinstall
uninstall: duninstall
depend: ddepend
INSTDIRS = $(DIRS)