@@ -37,6 +37,7 @@ include $(libc_DIR)/inet/Makefile.in
include $(libc_DIR)/signal/Makefile.in
include $(libc_DIR)/stdlib/Makefile.in
include $(libc_DIR)/unistd/Makefile.in
+include $(libc_DIR)/spawn/Makefile.in
ifeq ($(DOPIC),y)
libc-a-y = $(libc-y:.o=.os) $(libc-static-y:.o=.os)
new file mode 100644
@@ -0,0 +1,13 @@
+# Makefile for uClibc
+#
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+#
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+#
+
+top_srcdir=../../
+top_builddir=../../
+all: objs
+include $(top_builddir)Rules.mak
+include Makefile.in
+include $(top_srcdir)Makerules
new file mode 100644
@@ -0,0 +1,25 @@
+# Makefile for uClibc
+#
+# Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
+#
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+#
+
+subdirs += libc/spawn
+
+CSRC-y :=
+CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) := spawn.c spawn_faction_addclose.c \
+ spawn_faction_adddup2.c spawn_faction_addopen.c spawn_faction_init.c
+
+SPAWN_DIR := $(top_srcdir)libc/spawn
+SPAWN_OUT := $(top_builddir)libc/spawn
+
+SPAWN_SRC := $(patsubst %.c,$(SPAWN_DIR)/%.c,$(CSRC-y))
+SPAWN_OBJ := $(patsubst %.c,$(SPAWN_OUT)/%.o,$(CSRC-y))
+
+libc-y += $(SPAWN_OBJ)
+
+objclean-y += CLEAN_libc/spawn
+
+CLEAN_libc/spawn:
+ $(do_rm) $(addprefix $(SPAWN_OUT)/*., o os)
similarity index 100%
rename from librt/spawn.c
rename to libc/spawn/spawn.c
similarity index 100%
rename from librt/spawn_faction_addclose.c
rename to libc/spawn/spawn_faction_addclose.c
similarity index 100%
rename from librt/spawn_faction_adddup2.c
rename to libc/spawn/spawn_faction_adddup2.c
similarity index 100%
rename from librt/spawn_faction_addopen.c
rename to libc/spawn/spawn_faction_addopen.c
similarity index 100%
rename from librt/spawn_faction_init.c
rename to libc/spawn/spawn_faction_init.c
similarity index 100%
rename from librt/spawn_int.h
rename to libc/spawn/spawn_int.h
@@ -35,13 +35,6 @@ librt_filter_SRC += clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c
librt_SSRC :=
endif
-librt_filter_SRC += $(if $(UCLIBC_HAS_ADVANCED_REALTIME),, \
- spawn.c \
- spawn_faction_addclose.c \
- spawn_faction_adddup2.c \
- spawn_faction_addopen.c \
- spawn_faction_init.c)
-
librt_SRC := $(filter-out $(librt_filter_SRC),$(librt_SRC))
librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC))
This makes uClibc compatible with glibc, and allows gnulib autoconf macros to correctly detect posix_spawn support. Cc: Ismael Luceno <ismael.luceno@gmail.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> --- libc/Makefile.in | 1 + libc/spawn/Makefile | 13 +++++++++++++ libc/spawn/Makefile.in | 25 +++++++++++++++++++++++++ {librt => libc/spawn}/spawn.c | 0 {librt => libc/spawn}/spawn_faction_addclose.c | 0 {librt => libc/spawn}/spawn_faction_adddup2.c | 0 {librt => libc/spawn}/spawn_faction_addopen.c | 0 {librt => libc/spawn}/spawn_faction_init.c | 0 {librt => libc/spawn}/spawn_int.h | 0 librt/Makefile.in | 7 ------- 10 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 libc/spawn/Makefile create mode 100644 libc/spawn/Makefile.in rename {librt => libc/spawn}/spawn.c (100%) rename {librt => libc/spawn}/spawn_faction_addclose.c (100%) rename {librt => libc/spawn}/spawn_faction_adddup2.c (100%) rename {librt => libc/spawn}/spawn_faction_addopen.c (100%) rename {librt => libc/spawn}/spawn_faction_init.c (100%) rename {librt => libc/spawn}/spawn_int.h (100%)