summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-16 10:11:26 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-16 10:11:26 +0000
commitcfcf2c267b2dbb1a7fbbfdd82610330b45ead734 (patch)
tree94761b9a8a27aecdb0664a1e2d6f85395b95b5ca
parentb02e50be3e853e6a67c9ed986b994fbeebb0f0a5 (diff)
Clean all subdirs on 'make clean'
-rw-r--r--libc/stdlib/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/stdlib/Makefile b/libc/stdlib/Makefile
index 52d00f876..06d87c674 100644
--- a/libc/stdlib/Makefile
+++ b/libc/stdlib/Makefile
@@ -25,6 +25,7 @@ include $(TOPDIR)Rules.mak
LIBC=$(TOPDIR)libc.a
DIRS = $(MALLOC)
+ALL_SUBDIRS = $(shell find * -type d -prune -name [a-z]\*)
MSRC=strto_l.c
MOBJ=strtol.o strtoul.o strto_l.o
@@ -72,12 +73,12 @@ $(COBJS): %.o : %.c
$(OBJ): Makefile
subdirs: $(patsubst %, _dir_%, $(DIRS))
-subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
+subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
$(patsubst %, _dir_%, $(DIRS)) : dummy
$(MAKE) -C $(patsubst _dir_%, %, $@)
-$(patsubst %, _dirclean_%, $(DIRS)) : dummy
+$(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
clean: subdirs_clean