summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2005-01-19 08:49:59 +0000
committerPeter Kjellerstedt <peter.kjellerstedt@axis.com>2005-01-19 08:49:59 +0000
commit7b735a37585a73e8ec60a03ff52e24fe98f10cec (patch)
tree6af29e9f0842cc85f2ea1c4e5024b7984ffeabc2 /libpthread
parente1f0882b43c0fe44185c3c3c95de4e6f873b1efa (diff)
Use Makefile if statements rather than their shell counterparts.
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/Makefile83
1 files changed, 39 insertions, 44 deletions
diff --git a/libpthread/Makefile b/libpthread/Makefile
index 9d701c8d8..81979feb9 100644
--- a/libpthread/Makefile
+++ b/libpthread/Makefile
@@ -65,20 +65,18 @@ ALL_SUBDIRS = linuxthreads linuxthreads_db
all: $(LIBPTHREAD) $(LIBTHREAD_DB)
$(LIBPTHREAD): subdirs
- @if [ -f $(LIBPTHREAD) ] ; then \
- set -e; \
- $(INSTALL) -d $(TOPDIR)lib; \
- $(RM) $(TOPDIR)lib/$(LIBPTHREAD); \
- $(INSTALL) -m 644 $(LIBPTHREAD) $(TOPDIR)lib; \
- fi;
+ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
+ $(INSTALL) -d $(TOPDIR)lib
+ $(RM) $(TOPDIR)lib/$(LIBPTHREAD)
+ $(INSTALL) -m 644 $(LIBPTHREAD) $(TOPDIR)lib
+endif
$(LIBTHREAD_DB): subdirs
- @if [ -f $(LIBTHREAD_DB) ] ; then \
- set -e; \
- $(INSTALL) -d $(TOPDIR)lib; \
- $(RM) $(TOPDIR)lib/$(LIBTHREAD_DB); \
- $(INSTALL) -m 644 $(LIBTHREAD_DB) $(TOPDIR)lib; \
- fi;
+ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
+ $(INSTALL) -d $(TOPDIR)lib
+ $(RM) $(TOPDIR)lib/$(LIBTHREAD_DB)
+ $(INSTALL) -m 644 $(LIBTHREAD_DB) $(TOPDIR)lib
+endif
$(OBJS): %.o : %.c
@@ -88,38 +86,35 @@ $(OBJS): %.o : %.c
$(OBJ): Makefile
shared: all
- if [ -f $(LIBPTHREAD) ] ; then \
- set -e; \
- $(LD) $(LDFLAGS_THREAD) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \
- -o $(LIBPTHREAD_SHARED_FULLNAME) $(SHARED_START_FILES) --whole-archive $(LIBPTHREAD) \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC) \
- $(SHARED_END_FILES); \
- $(INSTALL) -d $(TOPDIR)lib; \
- $(RM) $(TOPDIR)lib/$(LIBPTHREAD_SHARED_FULLNAME) \
- $(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(MAJOR_VERSION); \
- $(INSTALL) -m 644 $(LIBPTHREAD_SHARED_FULLNAME) $(TOPDIR)lib; \
- $(LN) -sf $(LIBPTHREAD_SHARED_FULLNAME) \
- $(TOPDIR)lib/$(LIBPTHREAD_SHARED); \
- $(LN) -sf $(LIBPTHREAD_SHARED_FULLNAME) \
- $(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(MAJOR_VERSION); \
- fi;
- if [ -f $(LIBTHREAD_DB) ] ; then \
- set -e; \
- $(LD) $(LDFLAGS_THREAD_DB) -soname=$(LIBTHREAD_DB_SHARED).1 \
- -o $(LIBTHREAD_DB_SHARED_FULLNAME) --whole-archive $(LIBTHREAD_DB) \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC) \
- ; \
- $(INSTALL) -d $(TOPDIR)lib; \
- $(RM) $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED_FULLNAME) \
- $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED).1; \
- $(INSTALL) -m 644 $(LIBTHREAD_DB_SHARED_FULLNAME) $(TOPDIR)lib; \
- $(LN) -sf $(LIBTHREAD_DB_SHARED_FULLNAME) \
- $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED); \
- $(LN) -sf $(LIBTHREAD_DB_SHARED_FULLNAME) \
- $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED).1; \
- fi;
+ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
+ $(LD) $(LDFLAGS_THREAD) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \
+ -o $(LIBPTHREAD_SHARED_FULLNAME) $(SHARED_START_FILES) --whole-archive $(LIBPTHREAD) \
+ --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
+ -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC) \
+ $(SHARED_END_FILES)
+ $(INSTALL) -d $(TOPDIR)lib
+ $(RM) $(TOPDIR)lib/$(LIBPTHREAD_SHARED_FULLNAME) \
+ $(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(MAJOR_VERSION)
+ $(INSTALL) -m 644 $(LIBPTHREAD_SHARED_FULLNAME) $(TOPDIR)lib
+ $(LN) -sf $(LIBPTHREAD_SHARED_FULLNAME) \
+ $(TOPDIR)lib/$(LIBPTHREAD_SHARED)
+ $(LN) -sf $(LIBPTHREAD_SHARED_FULLNAME) \
+ $(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(MAJOR_VERSION)
+endif
+ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
+ $(LD) $(LDFLAGS_THREAD_DB) -soname=$(LIBTHREAD_DB_SHARED).1 \
+ -o $(LIBTHREAD_DB_SHARED_FULLNAME) --whole-archive $(LIBTHREAD_DB) \
+ --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
+ -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
+ $(INSTALL) -d $(TOPDIR)lib
+ $(RM) $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED_FULLNAME) \
+ $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED).1
+ $(INSTALL) -m 644 $(LIBTHREAD_DB_SHARED_FULLNAME) $(TOPDIR)lib
+ $(LN) -sf $(LIBTHREAD_DB_SHARED_FULLNAME) \
+ $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED)
+ $(LN) -sf $(LIBTHREAD_DB_SHARED_FULLNAME) \
+ $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED).1
+endif
tags:
ctags -R