summaryrefslogtreecommitdiffstats
path: root/progs/Makefile
diff options
context:
space:
mode:
authorTom Fogal <[email protected]>2009-11-24 16:46:31 -0700
committerIan Romanick <[email protected]>2009-12-01 10:27:27 -0800
commitb9f4a0bd2b0104ce5f15dcd7d1698db710330418 (patch)
tree1e91b687c4bc8f39bbfa2270c4cbf8f1d2e1befd /progs/Makefile
parentd8da270a2be18849eee8a168d1c1528e96677b41 (diff)
Simplify hackery added to fix AIX build.
Borrow an idiom from the GNU build system which can handle `for' loops over empty lists.
Diffstat (limited to 'progs/Makefile')
-rw-r--r--progs/Makefile26
1 files changed, 11 insertions, 15 deletions
diff --git a/progs/Makefile b/progs/Makefile
index d5852fa416c..5bc444e9524 100644
--- a/progs/Makefile
+++ b/progs/Makefile
@@ -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 \
- if [ -d $$dir ] ; then \
- (cd $$dir && $(MAKE)) || exit 1 ; \
- fi \
- done \
- fi
+ @list='$(SUBDIRS)'; for dir in $$list ; do \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE)) || exit 1 ; \
+ fi \
+ done
# 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
+ @list='$(SUBDIRS)'; for dir in $$list tests ; do \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE) clean) ; \
+ fi \
+ done