From 529f40fc3f0f5f4cc7726be8f59e28e0da161e49 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 12 Nov 2009 17:16:22 -0500 Subject: Improve PGO build a bit. --- Makefile.am | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 4746c81..0328b10 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,17 +28,19 @@ EXTRA_DIST = autogen.sh if PGO all-recursive: - cd $(top_builddir)/libdimension && $(MAKE) $(AM_MAKEFLAGS) libdimension-pgo.la - cd $(top_builddir)/tests/libdimension && $(MAKE) check - @for gcda in $(top_builddir)/tests/libdimension/pgo/.libs/*_pgo*.gcda; do \ - mv $$gcda $${gcda/_pgo/}; \ - done + @if ! ls $(top_builddir)/tests/libdimension/pgo/.libs/*.gcda >/dev/null; then \ + (cd $(top_builddir)/libdimension && $(MAKE) $(AM_MAKEFLAGS) libdimension-pgo.la) && \ + (cd $(top_builddir)/tests/libdimension && $(MAKE) check) && \ + for gcda in $$(ls $(top_builddir)/tests/libdimension/pgo/.libs/*_pgo*.gcda); do \ + mv $$gcda $${gcda/_pgo/}; \ + done \ + fi cd $(top_builddir)/libdimension && $(MAKE) $(AM_MAKEFLAGS) libdimension.la cd $(top_builddir)/dimension && $(MAKE) $(AM_MAKEFLAGS) all cd $(top_builddir)/doc && $(MAKE) $(AM_MAKEFLAGS) all endif -bench: all-recursive +bench: all cd bench && $(MAKE) $(AM_MAKEFLAGS) bench .PHONY: bench -- cgit v1.2.3