From: pbonzini@redhat.com (Paolo Bonzini)
Subject: [ltt-dev] [PATCH 02/12] use autoconf symbolic linking
Date: Mon, 15 Feb 2010 20:04:35 +0100 [thread overview]
Message-ID: <1266260686-17588-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1266260686-17588-1-git-send-email-pbonzini@redhat.com>
Instead of copying. This is less error-prone while developing and
lets Automake handle more stuff.
Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
Makefile.am | 13 -------------
configure.ac | 15 +++++++++++++--
tests/Makefile.am | 12 ------------
3 files changed, 13 insertions(+), 27 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4f915e1..2ede9e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,16 +38,3 @@ liburcu_signal_la_CFLAGS = -DRCU_SIGNAL
liburcu_bp_la_SOURCES = urcu-bp.c urcu-pointer.c $(COMPAT)
liburcu_defer_la_SOURCES = urcu-defer.c $(COMPAT)
-
-$(top_srcdir)/*.h $(top_srcdir)/*.c: urcu/arch.h urcu/uatomic_arch.h
-
-urcu/arch.h: $(top_srcdir)/urcu/arch_ at ARCHTYPE@.h
- $(mkdir_p) $(top_builddir)/urcu
- cp -f $(top_srcdir)/urcu/arch_ at ARCHTYPE@.h $(top_builddir)/urcu/arch.h
-
-urcu/uatomic_arch.h: $(top_srcdir)/urcu/uatomic_arch_ at ARCHTYPE@.h
- $(mkdir_p) $(top_builddir)/urcu
- cp -f $(top_srcdir)/urcu/uatomic_arch_ at ARCHTYPE@.h $(top_builddir)/urcu/uatomic_arch.h
-
-clean-local:
- rm -f urcu/arch.h urcu/uatomic_arch.h
diff --git a/configure.ac b/configure.ac
index c797831..ab6f3a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,14 @@ esac
if test "$ARCHTYPE" = "unknown"; then
AC_MSG_ERROR([Unable to detect the architecture.])
fi
+UATOMICSRC=urcu/uatomic_arch_$ARCHTYPE.h
+ARCHSRC=urcu/arch_$ARCHTYPE.h
+if test "x$ARCHTYPE" != xx86 -a "x$ARCHTYPE" != xppc; then
+ APISRC=tests/api_gcc.h
+else
+ APISRC=tests/api_$ARCHTYPE.h
+fi
+
AC_SUBST(ARCHTYPE)
AC_SUBST(SUBARCHTYPE)
@@ -95,8 +103,6 @@ AC_TRY_COMPILE(
AM_CONDITIONAL([COMPAT_FUTEX], [ test "x$compat_futex_test" = "x1" ])
-AM_CONDITIONAL([GCC_API], [test "x$ARCHTYPE" != xx86 -a "x$ARCHTYPE" != xppc])
-
AM_CONDITIONAL([COMPAT_ARCH], [test "x$SUBARCHTYPE" = xx86compat ])
[
@@ -204,6 +210,11 @@ AC_CHECK_FUNCS(
CFLAGS=$saved_CFLAGS
+AC_CONFIG_LINKS([
+ urcu/arch.h:$ARCHSRC
+ urcu/uatomic_arch.h:$UATOMICSRC
+ tests/api.h:$APISRC
+])
AC_CONFIG_FILES([
Makefile
tests/Makefile
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 02e0583..17b89db 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -40,12 +40,6 @@ URCU_MB_LIB=$(top_builddir)/liburcu-mb.la
URCU_SIGNAL_LIB=$(top_builddir)/liburcu-signal.la
URCU_BP_LIB=$(top_builddir)/liburcu-bp.la
-if GCC_API
-APIHEADER=api_gcc.h
-else
-APIHEADER=api_ at ARCHTYPE@.h
-endif
-
EXTRA_DIST = $(top_srcdir)/tests/api_*.h
@@ -156,9 +150,3 @@ test_urcu_bp_dynamic_link_SOURCES = test_urcu_bp.c $(URCU_BP)
test_urcu_bp_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
urcutorture.c: api.h
-
-api.h: $(APIHEADER)
- cp -f $(srcdir)/$(APIHEADER) api.h
-
-clean-local:
- rm -f api.h
--
1.6.6
next prev parent reply other threads:[~2010-02-15 19:04 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-15 19:04 [ltt-dev] [PATCH 00/12] provide default definition of uatomic builtins Paolo Bonzini
2010-02-15 19:04 ` [ltt-dev] [PATCH 01/12] use kernel style makefile output Paolo Bonzini
2010-02-15 19:04 ` Paolo Bonzini [this message]
2010-02-15 19:04 ` [ltt-dev] [PATCH 03/12] add urcu/arch_defaults.h Paolo Bonzini
2010-02-18 2:57 ` Mathieu Desnoyers
2010-02-15 19:04 ` [ltt-dev] [PATCH 04/12] define sync_core for x86 PIC Paolo Bonzini
2010-02-15 19:04 ` [ltt-dev] [PATCH 05/12] remove compat_uatomic_cmpxchg #define from non-x86 Paolo Bonzini
2010-02-15 19:04 ` [ltt-dev] [PATCH 06/12] add uatomic_defaults.h, use it for default definitions Paolo Bonzini
2010-02-18 3:10 ` Mathieu Desnoyers
2010-02-15 19:04 ` [ltt-dev] [PATCH 07/12] use uatomic_defaults.h for common fallback implementations Paolo Bonzini
2010-02-15 19:04 ` [ltt-dev] [PATCH 08/12] move whether atomic byte/short exists to uatomic_arch_*.h Paolo Bonzini
2010-02-18 3:12 ` Mathieu Desnoyers
2010-02-15 19:04 ` [ltt-dev] [PATCH 09/12] add Alpha support Paolo Bonzini
2010-02-18 3:21 ` Mathieu Desnoyers
2010-02-15 19:04 ` [ltt-dev] [PATCH 10/12] support compiling on unknown architectures Paolo Bonzini
2010-02-18 3:22 ` Mathieu Desnoyers
2010-02-15 19:04 ` [ltt-dev] [PATCH 11/12] avoid multiple evaluation of STORE_SHARED argument Paolo Bonzini
2010-02-18 3:28 ` Mathieu Desnoyers
2010-02-18 8:45 ` Paolo Bonzini
2010-02-15 19:04 ` [ltt-dev] [PATCH 12/12] centralize definition of BITS_PER_LONG Paolo Bonzini
2010-02-18 3:25 ` Mathieu Desnoyers
2010-02-18 8:45 ` Paolo Bonzini
2010-02-18 13:46 ` Mathieu Desnoyers
2010-02-18 15:27 ` Paolo Bonzini
2010-02-18 16:09 ` Mathieu Desnoyers
2010-02-19 19:25 ` [ltt-dev] lock-free data structures (was Re: [PATCH 12/12] centralize definition of BITS_PER_LONG) Paolo Bonzini
2010-02-19 23:51 ` Paul E. McKenney
2010-02-20 0:10 ` Paolo Bonzini
2010-02-20 0:44 ` Paul E. McKenney
2010-02-15 19:04 ` [ltt-dev] [PATCH 13/12] test uatomic_defaults.h Paolo Bonzini
2010-02-19 19:22 [ltt-dev] [PATCH 00/12] provide generic version of uatomic and other per-arch defs Paolo Bonzini
2010-02-19 19:22 ` [ltt-dev] [PATCH 02/12] use autoconf symbolic linking Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1266260686-17588-3-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox