* build-aux/extra-recursive-targets.mk: New.
--- ChangeLog | 6 ++++ build-aux/extra-recursive-targets.mk | 46 ++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 0 deletions(-) create mode 100644 build-aux/extra-recursive-targets.mk
diff --git a/ChangeLog b/ChangeLog index ab8d657..4c8240a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-06-08 Roland Levillain roland@lrde.epita.fr
+ Introduce an Automake helper to factor extra recursive targets. + + * build-aux/extra-recursive-targets.mk: New. + +2009-06-08 Roland Levillain roland@lrde.epita.fr + * configure.ac: Configure scribo/tests/unit_test/Makefile.
2009-06-08 Roland Levillain roland@lrde.epita.fr diff --git a/build-aux/extra-recursive-targets.mk b/build-aux/extra-recursive-targets.mk new file mode 100644 index 0000000..7c1ef1e --- /dev/null +++ b/build-aux/extra-recursive-targets.mk @@ -0,0 +1,46 @@ +# extra-recursive-targets.mk -*- Automake -*- +# Factor the installation of additional recursive targets. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +EXTRA_RECURSIVE_TARGETS = + +# Copied from a generated Makefile.in (rule `$(RECURSIVE_TARGETS)'). +# (Automake does not allow us to interact with the code it generates +# in Makefile.in.) We might want to propose this as a patch to the +# Automake project. +$(EXTRA_RECURSIVE_TARGETS): + @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; test -z "$$fail" + +.PHONY: $(EXTRA_RECURSIVE_TARGETS)