mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 23:40:10 +01:00
Quotes are important to make sure the argument to test -n really is the empty string, but that requires stringifying PROGRAM_DIRS. Signed-off-by: Brian Paul <brianp@vmware.com>
36 lines
546 B
Makefile
36 lines
546 B
Makefile
# progs/Makefile
|
|
|
|
TOP = ..
|
|
|
|
include $(TOP)/configs/current
|
|
|
|
SUBDIRS = "$(strip "$(PROGRAM_DIRS)")"
|
|
|
|
|
|
default: message subdirs
|
|
|
|
|
|
message:
|
|
@echo "Making programs for" $(CONFIG_NAME)
|
|
|
|
|
|
subdirs:
|
|
@if test -n "$(SUBDIRS)" ; then \
|
|
for dir in $(SUBDIRS) ; do \
|
|
if [ -d $$dir ] ; then \
|
|
(cd $$dir && $(MAKE)) || exit 1 ; \
|
|
fi \
|
|
done \
|
|
fi
|
|
|
|
# Dummy install target
|
|
install:
|
|
|
|
clean:
|
|
-@if test -n "$(SUBDIRS)" ; then \
|
|
for dir in $(SUBDIRS) tests ; do \
|
|
if [ -d $$dir ] ; then \
|
|
(cd $$dir && $(MAKE) clean) ; \
|
|
fi \
|
|
done \
|
|
fi
|