Simplify hackery added to fix AIX build.
Borrow an idiom from the GNU build system which can handle `for' loops over empty lists.
This commit is contained in:
parent
d8da270a2b
commit
b9f4a0bd2b
|
@ -4,7 +4,7 @@ TOP = ..
|
|||
|
||||
include $(TOP)/configs/current
|
||||
|
||||
SUBDIRS = "$(strip "$(PROGRAM_DIRS)")"
|
||||
SUBDIRS = $(PROGRAM_DIRS)
|
||||
|
||||
|
||||
default: message subdirs
|
||||
|
@ -15,22 +15,18 @@ message:
|
|||
|
||||
|
||||
subdirs:
|
||||
@if test -n "$(SUBDIRS)" ; then \
|
||||
for dir in $(SUBDIRS) ; do \
|
||||
@list='$(SUBDIRS)'; for dir in $$list ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE)) || exit 1 ; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
done
|
||||
|
||||
# Dummy install target
|
||||
install:
|
||||
|
||||
clean:
|
||||
-@if test -n "$(SUBDIRS)" ; then \
|
||||
for dir in $(SUBDIRS) tests ; do \
|
||||
@list='$(SUBDIRS)'; for dir in $$list tests ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE) clean) ; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue