fix: handle EINTR correctly in get_cpu_mask_from_sysfs
[urcu.git] / doc / examples / Makefile.am
index 7687098187d6474395812f8b73fe018c6d915131..81691692ed5a77aac6132058bd72f7347642ad55 100644 (file)
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2023 EfficiOS Inc.
+#
+# SPDX-License-Identifier: MIT
+
 doc_examplesdir = ${docdir}/examples
 
 doc_examples_urcu_flavorsdir = ${doc_examplesdir}/urcu-flavors
@@ -7,12 +11,10 @@ dist_doc_examples_urcu_flavors_DATA = \
        urcu-flavors/Makefile.qsbr \
        urcu-flavors/Makefile.mb \
        urcu-flavors/Makefile.membarrier \
-       urcu-flavors/Makefile.signal \
        urcu-flavors/Makefile.bp \
        urcu-flavors/qsbr.c \
        urcu-flavors/mb.c \
        urcu-flavors/membarrier.c \
-       urcu-flavors/signal.c \
        urcu-flavors/bp.c
 
 dist_doc_examples_DATA = \
@@ -111,32 +113,43 @@ dist_doc_examples_rculfhash_DATA = \
        rculfhash/cds_lfht_lookup.c \
        rculfhash/cds_lfht_for_each_entry_duplicate.c
 
-if NO_SHARED
-# Don't build examples if shared libraries support was explicitly
-# disabled.
-else
+# Building the examples requires the shared libraries to be enabled
+if ENABLE_EXAMPLES
 
 SUBDIRS_PROXY = hlist list urcu-flavors wfcqueue rculfqueue \
        wfstack lfstack rculfhash
 
 # Copies are for VPATH build support.
 all-local:
-       @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
-               cp -fR $(srcdir)/dist-files $(builddir); \
-               cp -f $(srcdir)/Makefile.examples.template $(builddir); \
+       $(AM_V_at)if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+               cp -pfR $(srcdir)/dist-files $(builddir); \
+               chmod -R u+w $(builddir)/dist-files; \
+               cp -pf $(srcdir)/Makefile.examples.template $(builddir); \
+               chmod u+w $(builddir)/Makefile.examples.template; \
                for subdir in $(SUBDIRS_PROXY); do \
-                       cp -fR $(srcdir)/$$subdir $(builddir); \
+                       cp -pfR $(srcdir)/$$subdir $(builddir); \
+                       chmod -R u+w $(builddir)/$$subdir; \
                done; \
-       fi
-       $(MAKE) -f dist-files/Makefile AM_CPPFLAGS="$(CPPFLAGS) -I../../../urcu/ -I../../../" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../.libs/ -Wl,-rpath="$(PWD)/../../.libs/"' $(AM_MAKEFLAGS) all
+       fi; \
+       if [ x"$(shell echo "$(top_srcdir)" | $(GREP) "^/" | wc -l)" = x"1" ]; then \
+               rel_src_subdir=""; \
+       else \
+               rel_src_subdir="../"; \
+       fi; \
+       if [ x"$(shell echo "$(top_builddir)" | $(GREP) "^/" | wc -l)" = x"1" ]; then \
+               rel_build_subdir=""; \
+       else \
+               rel_build_subdir="../"; \
+       fi; \
+       $(MAKE) -f dist-files/Makefile CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" AM_CPPFLAGS="$(AM_CPPFLAGS) -I"$${rel_src_subdir}/$(top_srcdir)/include/" -I"$${rel_src_subdir}/$(top_srcdir)/src/" -I"$${rel_build_subdir}$(top_builddir)/include/" -I"$${rel_build_subdir}$(top_builddir)/include/src/"" CFLAGS="$(CFLAGS)" AM_CFLAGS="$(AM_CFLAGS)" LDFLAGS="$(LDFLAGS)" AM_LDFLAGS="$(AM_LDFLAGS) -L../../../src/.libs/ -Wl,-rpath "$(PWD)/../../src/.libs/"" AM_V_P="$(AM_V_P)" AM_V_at="$(AM_V_at)" $(AM_MAKEFLAGS) all;
 
 clean-local:
-       $(MAKE) -f dist-files/Makefile $(AM_MAKEFLAGS) clean
-       @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+       $(AM_V_at)$(MAKE) -f dist-files/Makefile $(AM_MAKEFLAGS) clean; \
+       if [ x"$(srcdir)" != x"$(builddir)" ]; then \
                for subdir in $(SUBDIRS_PROXY); do \
                        rm -rf $(builddir)/$$subdir; \
                done; \
                rm -f $(builddir)/Makefile.examples.template; \
                rm -rf $(builddir)/dist-files; \
-       fi
+       fi;
 endif
This page took 0.023658 seconds and 4 git commands to generate.