-SUBDIRS = java perl php python ruby tcl
+include ../../config.mak
+include config.mak
-all clean install:
+all clean depend install:
list='$(SUBDIRS)'; \
for subdir in $$list; do \
- if [ -f $$subdir/Makefile -a -f .$$subdir ] ; \
- then $(MAKE) -C $$subdir $@ || exit 1; \
+ if [ -x $$subdir/build -a ! -f .$$subdir -o $@ = clean ] ; \
+ then echo -n Building $$subdir... ; \
+ cd $$subdir && output=`./build $@ 2>&1` ; \
+ if [ $$? -eq 0 ] ; \
+ then echo OK && touch ../.$$subdir ; \
+ else echo $$output && exit 1 ; \
+ fi ; \
+ cd .. ; \
+ if [ -f $$subdir/Makefile -a -f .$$subdir ] ; \
+ then $(MAKE) -C $$subdir $@ || exit 1 ; \
+ fi ; \
+ if [ $@ = clean ] ; \
+ then rm -f .$$subdir ; \
+ fi ; \
fi \
done
-