mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
29 lines
1.1 KiB
Makefile
29 lines
1.1 KiB
Makefile
|
|
FIND_SUBDIRS := $(filter-out . .. nomake CVS $(IGNORE_SUBDIRS),\
|
||
|
|
$(patsubst ./%,%,$(patsubst %/,%,$(dir $(shell $(FIND) . -maxdepth 2 -mindepth 2 -a \( -iname Makefile -o -iname GNUmakefile \))))))
|
||
|
|
SUBDIRS_TO_ITERATE = $(filter-out $(IGNORE_SUBDIRS),$(SUBDIRS))
|
||
|
|
|
||
|
|
ALLOWED_SUBDIR_TARGETS ?= all install clean distclean test link-in
|
||
|
|
|
||
|
|
SUBDIRS ?= $(ORDERED_SUBDIRS) $(filter-out $(ORDERED_SUBDIRS),$(FIND_SUBDIRS))
|
||
|
|
#SUBDIRS ?= $(filter-out $(ORDERED_SUBDIRS),$(FIND_SUBDIRS))
|
||
|
|
#SUBDIRS ?= $(FIND_SUBDIRS)
|
||
|
|
|
||
|
|
ifneq ($(DONT_CHECK_PREREQ_DONE),true)
|
||
|
|
ifndef PREREQ
|
||
|
|
PREREQ := $(call proj_query,pkg-requires --no-version --no-subpackages --subsections=jw --delimiter=' ' build $(PROJECT))
|
||
|
|
endif
|
||
|
|
ifndef PREREQ_DIRS
|
||
|
|
PREREQ_DIRS := $(call proj_query,proj-dir $(PREREQ))
|
||
|
|
endif
|
||
|
|
PREREQ_DIRS_DONE := $(addsuffix /dirs-all.done,$(filter-out $(TOPDIR) /opt/%,$(PREREQ_DIRS)))
|
||
|
|
endif
|
||
|
|
|
||
|
|
ifneq ($(SUBDIRS_TO_ITERATE),)
|
||
|
|
|
||
|
|
ifeq ($(MAKECMDGOALS),)
|
||
|
|
SUBDIR_TARGETS = all
|
||
|
|
else
|
||
|
|
SUBDIR_TARGETS = $(filter $(ALLOWED_SUBDIR_TARGETS),$(MAKECMDGOALS))
|
||
|
|
endif
|
||
|
|
|
||
|
|
endif
|