-MISSING_DIRS:= $(filter-out $(wildcard $(SUBDIRS)),$(SUBDIRS))
-dirs:
-ifneq ($(words $(MISSING_DIRS)),0)
- @mkdir $(MISSING_DIRS)
+dirs:
+ $(MAKE) -C $(SRCDIR) -f Makefile $@
+ifeq ($(HAVE_STATVFS),yes)
+ @rm -f include/statvfs.h > /dev/null 2>&1
+else
+ @cp -p $(SRCDIR)/buildlib/statvfs.h.in include/statvfs.h
+ ln -sf . include/sys
+endif
+ifeq ($(NEED_SOCKLEN_T_DEFINE),yes)
+ @cp -p $(SRCDIR)/buildlib/netdb.h.in include/netdb.h