lobase

Linux port of OpenBSDs userland.
Log | Files | Refs | README

commit 2be5a2a18f2bd36fbf2675fb81329bedd5a07168
parent 33d564391976f25bdfec00052ac62001c19222a2
Author: Duncaen <mail@duncano.de>
Date:   Mon,  6 Mar 2017 20:42:56 +0100

mk/bsd.subdir.mk: behave more like the original

Diffstat:
bin/Makefile | 2+-
mk/bsd.subdir.mk | 27+++++++++++++++++++--------
regress/Makefile | 2+-
regress/bin/Makefile | 2+-
regress/sbin/Makefile | 2+-
regress/usr.bin/Makefile | 2+-
regress/usr.sbin/Makefile | 2+-
usr.bin/Makefile | 2+-
8 files changed, 26 insertions(+), 15 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -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 @@ -1,3 +1,3 @@ SUBDIR = -BROKEN = +SKIPDIR = include bsd.subdir.mk diff --git 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 @@ -1,3 +1,3 @@ SUBDIR = -BROKEN = +SKIPDIR = include bsd.subdir.mk diff --git 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