clean up benchmark and example rules.
authorGustavo Sverzut Barbieri <barbieri@gmail.com>
Sat, 12 Jan 2013 07:38:26 +0000 (07:38 +0000)
committerGustavo Sverzut Barbieri <barbieri@gmail.com>
Sat, 12 Jan 2013 07:38:26 +0000 (07:38 +0000)
 - they have no 'all' rule, keep out of SUBDIRS

 - they depend on 'all-am', the non-recursive target that builds everything.

 - they do not need a directory on its own to declare nothing.x

SVN revision: 82689

configure.ac
src/Makefile.am
src/benchmarks/Makefile.am [deleted file]
src/examples/Makefile.am [deleted file]

index a8c6c96..ec27616 100644 (file)
@@ -3471,10 +3471,8 @@ data/Makefile
 doc/Makefile
 doc/Doxyfile
 src/Makefile
-src/benchmarks/Makefile
 src/benchmarks/eina/Makefile
 src/benchmarks/eo/Makefile
-src/examples/Makefile
 src/examples/eina/Makefile
 src/examples/eet/Makefile
 src/examples/eo/Makefile
index 5ad8b97..bc218e0 100644 (file)
@@ -3,7 +3,8 @@ AUTOMAKE_OPTIONS = subdir-objects
 MAINTAINERCLEANFILES = Makefile.in
 BUILT_SOURCES =
 
-SUBDIRS = . benchmarks examples
+DIST_SUBDIRS =
+SUBDIRS =
 
 lib_LTLIBRARIES =
 bin_PROGRAMS =
@@ -47,16 +48,46 @@ include Makefile_Ethumb.am
 
 .PHONY: benchmark examples
 
-benchmark:
-       @$(MAKE) $(AM_MAKEFLAGS)
-       @$(MAKE) $(AM_MAKEFLAGS) -C benchmarks benchmark
+BENCHMARK_SUBDIRS = \
+benchmarks/eina \
+benchmarks/eo
+DIST_SUBDIRS += $(BENCHMARK_SUBDIRS)
 
-examples: $(lib_LTLIBRARIES) $(bin_PROGRAMS)
-       @make
-       @$(MAKE) $(AM_MAKEFLAGS) -C examples examples
+benchmark: all-am
+       @for d in $(BENCHMARK_SUBDIRS); do \
+          echo "Making benchmark in $$d"; \
+          $(MAKE) $(AM_MAKEFLAGS) -C $$d benchmark; \
+       done
+
+EXAMPLES_SUBDIRS = \
+examples/eina \
+examples/eo \
+examples/eet \
+examples/evas \
+examples/ecore \
+examples/eio \
+examples/edbus \
+examples/ephysics \
+examples/edje \
+examples/emotion \
+examples/ethumb
+if ALWAYS_BUILD_EXAMPLES
+SUBDIRS += $(EXAMPLES_SUBDIRS)
+else
+DIST_SUBDIRS += $(EXAMPLES_SUBDIRS)
+endif
+
+examples: all-am
+       @for d in $(EXAMPLES_SUBDIRS); do \
+          echo "Making examples in $$d"; \
+          $(MAKE) $(AM_MAKEFLAGS) -C $$d examples; \
+       done
 
 install-examples:
-       @$(MAKE) $(AM_MAKEFLAGS) -C examples install-examples
+       @for d in $(EXAMPLES_SUBDIRS); do \
+          echo "Making install-examples in $$d"; \
+          $(MAKE) $(AM_MAKEFLAGS) -C $$d install-examples; \
+       done
 
 clean-local:
        rm -rf bin/eet/*.gcno
diff --git a/src/benchmarks/Makefile.am b/src/benchmarks/Makefile.am
deleted file mode 100644 (file)
index b57b13e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-SUBDIRS = eina eo
-
-.PHONY: benchmark
-
-benchmark:
-       @$(MAKE) $(AM_MAKEFLAGS) -C eina benchmark
-       @$(MAKE) $(AM_MAKEFLAGS) -C eo benchmark
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
deleted file mode 100644 (file)
index dc4d9e6..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-SUBDIRS = eina eo eet evas ecore eio edbus ephysics edje emotion ethumb
-
-.PHONY: examples install-examples
-
-examples:
-       @for d in $(SUBDIRS); do \
-               $(MAKE) $(AM_MAKEFLAGS) -C "$$d" examples || exit 0; \
-       done
-
-install-examples:
-       @for d in $(SUBDIRS); do \
-               $(MAKE) $(AM_MAKEFLAGS) -C "$$d" install-examples || exit 0; \
-       done