Fix: preserve example files' timestamps when copying
[lttng-ust.git] / doc / examples / Makefile.am
index 971eec3eb4ab4ee67043ddb9945af2138994f80a..3114e2cc45bc3d4e051775a6f24a1b6cdd0b8c12 100644 (file)
@@ -43,12 +43,16 @@ if NO_SHARED
 # disabled.
 else
 # Copies are for VPATH build support
-SUBDIRS_PROXY = easy-ust demo gen-tp hello-static-lib
+SUBDIRS_PROXY = easy-ust demo hello-static-lib
+
+if BUILD_GEN_TP_EXAMPLES
+SUBDIRS_PROXY += gen-tp
+endif
 
 all-local:
        @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
                for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL); do \
-                       cp -fR $(srcdir)/$$subdir $(builddir); \
+                       cp -pfR $(srcdir)/$$subdir $(builddir); \
                done; \
        fi; \
        if [ x"$(shell echo "$(top_srcdir)" | grep "^/" | wc -l)" = x"1" ]; then \
@@ -66,7 +70,7 @@ all-local:
                rel_build_subdir="../"; \
        fi; \
        for subdir in $(SUBDIRS_PROXY); do \
-               (cd $$subdir && $(MAKE) AM_CC="$(CC)" AM_CPPFLAGS="$(CPPFLAGS) -I$$rel_src_subdir$(top_srcdir)/include/ -I$$rel_build_subdir$(top_builddir)/include/" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../liblttng-ust/.libs/ -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
+               (cd $$subdir && $(MAKE) AM_CC="$(CC)" AM_CPPFLAGS="$(CPPFLAGS) -I$$rel_src_subdir$(top_srcdir)/include/ -I$$rel_build_subdir$(top_builddir)/include/" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../liblttng-ust/.libs -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
        done; \
        if [ x"$(SUBDIRS_JUL)" != x"" ]; then \
                for subdir in $(SUBDIRS_JUL); do \
This page took 0.023783 seconds and 4 git commands to generate.