]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
even better handling of build failures
authorMichael Jerris <mike@jerris.com>
Thu, 17 Dec 2009 19:14:47 +0000 (19:14 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 17 Dec 2009 19:14:47 +0000 (19:14 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15988 d0543943-73ff-0310-b7d9-9358b9ac24b2

Makefile.am

index 2f7f68bbe53bd99068eef28ea2d73222568bef70..a63d8ab6a03e94d478d509b2e467a7cd30c0a2ec 100644 (file)
@@ -1,5 +1,5 @@
 EXTRA_DIST =
-SUBDIRS = . src build
+SUBDIRS = . src
 AUTOMAKE_OPTS = foreign
 NAME=freeswitch
 PREFIX=$(prefix)
@@ -127,15 +127,40 @@ libs/libnatpmp/getgateway.c
 
 $(top_builddir)/libfreeswitch_la-switch_console.lo: src/include/switch_version.h
 
-MY_RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-dvi-recursive install-exec-recursive \
-       install-html-recursive install-info-recursive \
-       install-pdf-recursive install-ps-recursive install-recursive \
-       installcheck-recursive installdirs-recursive pdf-recursive \
-       ps-recursive uninstall-recursive
 
-$(MY_RECURSIVE_TARGETS): $(bin_PROGRAMS) $(lib_LTLIBRARIES)
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS): $(bin_PROGRAMS) $(lib_LTLIBRARIES)
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; \
+       if test -z "$$fail" ; then \
+          cd $(top_builddir)/build && $(MAKE) $(AM_MAKEFLAGS) $$target || exit 1; \
+       fi ;
 
 if ENABLE_CPP
 libfreeswitch_la_SOURCES += src/switch_cpp.cpp