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
|
include $(TOP)/configs/current
|
||||||
|
|
||||||
SUBDIRS = "$(strip "$(PROGRAM_DIRS)")"
|
SUBDIRS = $(PROGRAM_DIRS)
|
||||||
|
|
||||||
|
|
||||||
default: message subdirs
|
default: message subdirs
|
||||||
|
@ -15,22 +15,18 @@ message:
|
||||||
|
|
||||||
|
|
||||||
subdirs:
|
subdirs:
|
||||||
@if test -n "$(SUBDIRS)" ; then \
|
@list='$(SUBDIRS)'; for dir in $$list ; do \
|
||||||
for dir in $(SUBDIRS) ; do \
|
if [ -d $$dir ] ; then \
|
||||||
if [ -d $$dir ] ; then \
|
(cd $$dir && $(MAKE)) || exit 1 ; \
|
||||||
(cd $$dir && $(MAKE)) || exit 1 ; \
|
fi \
|
||||||
fi \
|
done
|
||||||
done \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Dummy install target
|
# Dummy install target
|
||||||
install:
|
install:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-@if test -n "$(SUBDIRS)" ; then \
|
@list='$(SUBDIRS)'; for dir in $$list tests ; do \
|
||||||
for dir in $(SUBDIRS) tests ; do \
|
if [ -d $$dir ] ; then \
|
||||||
if [ -d $$dir ] ; then \
|
(cd $$dir && $(MAKE) clean) ; \
|
||||||
(cd $$dir && $(MAKE) clean) ; \
|
fi \
|
||||||
fi \
|
done
|
||||||
done \
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in New Issue