From e390f03e0afebcd5e717ad857463387031ed6f98 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 17 Sep 2012 12:30:49 +0000 Subject: [PATCH] build: add a common.am include file and a "make lolcheck" target that does nothing for now except ensure that every makefile includes common.am. --- Makefile.am | 6 +++--- build/Makefile.am | 6 +++++- build/autotools/common.am | 17 +++++++++++++++++ src/Makefile.am | 2 ++ src/data/Makefile.am | 2 ++ src/data/font/Makefile.am | 2 ++ test/Makefile.am | 2 ++ test/math/Makefile.am | 2 ++ test/sandbox/Makefile.am | 2 ++ test/xolotl/Makefile.am | 2 ++ tools/Makefile.am | 2 ++ tutorial/Makefile.am | 2 ++ 12 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 build/autotools/common.am diff --git a/Makefile.am b/Makefile.am index 0eb1ff57..cf26ff37 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,6 @@ +include $(top_srcdir)/build/autotools/common.am + # Put "people" at the end because they're more likely to break builds. SUBDIRS = build src tutorial test tools games people DIST_SUBDIRS = $(SUBDIRS) binaries @@ -6,9 +8,7 @@ DIST_SUBDIRS = $(SUBDIRS) binaries EXTRA_DIST = bootstrap TODO AUTOMAKE_OPTIONS = dist-bzip2 -bench: - cd test && $(MAKE) $(AM_MAKEFLAGS) $@ -.PHONY: bench +check: lolcheck dist: lolunit-$(LOLUNIT_VERSION).tar.gz dist: lolremez-$(LOLREMEZ_VERSION).tar.gz diff --git a/build/Makefile.am b/build/Makefile.am index 4dbadf25..020515c0 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -1,8 +1,12 @@ +include $(top_srcdir)/build/autotools/common.am + EXTRA_DIST = lol-build \ check-source.sh \ build-linux build-mingw build-mingw64 build-ps3 \ - build-nacl32 build-nacl64 + build-nacl32 build-nacl64 \ + \ + autotools/common.am TESTS = check-source.sh diff --git a/build/autotools/common.am b/build/autotools/common.am new file mode 100644 index 00000000..e7366720 --- /dev/null +++ b/build/autotools/common.am @@ -0,0 +1,17 @@ + +bench: bench-recursive +bench-recursive: + @if test -n "$(SUBDIRS)"; then for subdir in $(SUBDIRS); do \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) bench) || exit 1; \ + done; \ + fi + +lolcheck: lolcheck-recursive +lolcheck-recursive: + @if test -n "$(SUBDIRS)"; then for subdir in $(SUBDIRS); do \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) lolcheck) || exit 1; \ + done; \ + fi + +.PHONY: lolcheck bench + diff --git a/src/Makefile.am b/src/Makefile.am index 1a9f4730..c1fbd357 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,6 @@ +include $(top_srcdir)/build/autotools/common.am + SUBDIRS = data noinst_LIBRARIES = liblol.a diff --git a/src/data/Makefile.am b/src/data/Makefile.am index f71b1b6c..4d328c1c 100644 --- a/src/data/Makefile.am +++ b/src/data/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/build/autotools/common.am + SUBDIRS = font diff --git a/src/data/font/Makefile.am b/src/data/font/Makefile.am index 71f26878..448b3280 100644 --- a/src/data/font/Makefile.am +++ b/src/data/font/Makefile.am @@ -1,4 +1,6 @@ +include $(top_srcdir)/build/autotools/common.am + if USE_CACA all: ascii.png diff --git a/test/Makefile.am b/test/Makefile.am index 000a8dfe..40716147 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,4 +1,6 @@ +include $(top_srcdir)/build/autotools/common.am + SUBDIRS = math sandbox xolotl AM_CPPFLAGS = -I$(top_srcdir)/src diff --git a/test/math/Makefile.am b/test/math/Makefile.am index b43192ee..5361b581 100644 --- a/test/math/Makefile.am +++ b/test/math/Makefile.am @@ -1,4 +1,6 @@ +include $(top_srcdir)/build/autotools/common.am + AM_CPPFLAGS = -I$(top_srcdir)/src all-local: $(PROGRAMS) $(noinst_PROGRAMS) diff --git a/test/sandbox/Makefile.am b/test/sandbox/Makefile.am index 2e2e9330..77fc4836 100644 --- a/test/sandbox/Makefile.am +++ b/test/sandbox/Makefile.am @@ -1,4 +1,6 @@ +include $(top_srcdir)/build/autotools/common.am + AM_CPPFLAGS = -I$(top_srcdir)/src all-local: $(noinst_PROGRAMS) diff --git a/test/xolotl/Makefile.am b/test/xolotl/Makefile.am index e186fdbe..3f4127ef 100644 --- a/test/xolotl/Makefile.am +++ b/test/xolotl/Makefile.am @@ -1,4 +1,6 @@ +include $(top_srcdir)/build/autotools/common.am + AM_CPPFLAGS = -I$(top_srcdir)/src all-local: $(noinst_PROGRAMS) diff --git a/tools/Makefile.am b/tools/Makefile.am index ddf06958..d3b483ff 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,4 +1,6 @@ +include $(top_srcdir)/build/autotools/common.am + SUBDIRS = SUBDIRS += neercs diff --git a/tutorial/Makefile.am b/tutorial/Makefile.am index 539ce0d4..52d06cb4 100644 --- a/tutorial/Makefile.am +++ b/tutorial/Makefile.am @@ -1,4 +1,6 @@ +include $(top_srcdir)/build/autotools/common.am + AM_CPPFLAGS = -I$(top_srcdir)/src all-local: $(PROGRAMS) $(noinst_PROGRAMS)