diff options
-rw-r--r-- | bin/Makefile | 2 | ||||
-rw-r--r-- | mk/bsd.subdir.mk | 27 | ||||
-rw-r--r-- | regress/Makefile | 2 | ||||
-rw-r--r-- | regress/bin/Makefile | 2 | ||||
-rw-r--r-- | regress/sbin/Makefile | 2 | ||||
-rw-r--r-- | regress/usr.bin/Makefile | 2 | ||||
-rw-r--r-- | regress/usr.sbin/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/Makefile | 2 |
8 files changed, 26 insertions, 15 deletions
diff --git a/bin/Makefile b/bin/Makefile index babf096..a691a27 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -1,4 +1,4 @@ SUBDIR = cat chmod cp date dd df domainname echo ed expr hostname kill ln ls \ md5 mkdir mv pax pwd rm rmdir sleep stty sync test -BROKEN = df +SKIPDIR = df include bsd.subdir.mk diff --git a/mk/bsd.subdir.mk b/mk/bsd.subdir.mk index 9c9f3b7..1ce7b9f 100644 --- a/mk/bsd.subdir.mk +++ b/mk/bsd.subdir.mk @@ -1,12 +1,23 @@ -SUBDIR_TARGETS = all clean install depend regress +SUBDIR_MFLAGS = -I$(TOPDIR) -I$(TOPDIR)/mk +SUBDIR_TARGETS = all clean cleandir includes depend obj tags manlint +SKIPDIR ?= -$(SUBDIR_TARGETS): $(SUBDIR) +$(SUBDIR_TARGETS): _SUBDIRUSE -$(SUBDIR): - @cd $@ && $(MAKE) -I$(TOPDIR) -I$(TOPDIR)/mk \ - $(filter-out $@,$(MAKECMDGOALS)) +_SUBDIRUSE: +ifneq (,$(SUBDIR)) + @for d in $(SUBDIR); do \ + skip=; for s in $(SKIPDIR); do \ + [ "$$s" = "$$d" ] && skip=1; \ + done; \ + [ "$$skip" ] && echo "($$d skipped)" && continue; \ + echo "===> $$d"; \ + $(MAKE) $(SUBDIR_MFLAGS) -C $$d $(MAKECMDGOALS) || exit 1; \ + done -$(BROKEN): - @echo "skipping $@" +$(SUBDIR): + @echo "===> $@"; \ + $(MAKE) $(SUBDIR_MFLAGS) -C $@ all || exit 1 +endif -.PHONY: all clean install $(SUBDIR) +.PHONY: _SUBDIRUSE $(SUBDIR_TARGETS) $(SUBDIR) diff --git a/regress/Makefile b/regress/Makefile index f0e9d84..0e97ac7 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -1,5 +1,5 @@ SUBDIR = bin sbin usr.bin usr.sbin -BROKEN = +SKIPDIR = depend: .PHONY: depend include bsd.subdir.mk diff --git a/regress/bin/Makefile b/regress/bin/Makefile index 624b166..0a62629 100644 --- a/regress/bin/Makefile +++ b/regress/bin/Makefile @@ -1,3 +1,3 @@ SUBDIR = cat chmod ln md5 pax test -BROKEN = +SKIPDIR = include bsd.subdir.mk diff --git a/regress/sbin/Makefile b/regress/sbin/Makefile index 39f21ba..b0b29da 100644 --- a/regress/sbin/Makefile +++ b/regress/sbin/Makefile @@ -1,3 +1,3 @@ SUBDIR = -BROKEN = +SKIPDIR = include bsd.subdir.mk diff --git a/regress/usr.bin/Makefile b/regress/usr.bin/Makefile index 5c0a007..a481799 100644 --- a/regress/usr.bin/Makefile +++ b/regress/usr.bin/Makefile @@ -1,4 +1,4 @@ SUBDIR = bc calendar colrm column cut dc diff diff3 dirname file \ fmt fold grep jot tail tsort ul wc xargs -BROKEN = grep bc calendar diff3 +SKIPDIR = grep bc calendar diff3 include bsd.subdir.mk diff --git a/regress/usr.sbin/Makefile b/regress/usr.sbin/Makefile index 39f21ba..b0b29da 100644 --- a/regress/usr.sbin/Makefile +++ b/regress/usr.sbin/Makefile @@ -1,3 +1,3 @@ SUBDIR = -BROKEN = +SKIPDIR = include bsd.subdir.mk diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 7d31275..49db8d5 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -5,5 +5,5 @@ SUBDIR = apply awk basename dc bc biff cal calendar cmp colrm col column comm \ nl nohup paste patch printenv printf readlink renice rev rs sed shar \ sort split stat tee time touch tr true tsort tty uname unexpand uniq unvis \ uudecode uuencode vis wc what which xinstall hexdump cu newsyslog -BROKEN = sed file cu +SKIPDIR = sed file cu include bsd.subdir.mk |