mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-05 04:02:28 +00:00
Strongly link glob() into system() and popen()
This commit is contained in:
parent
4e9566cd33
commit
cafdb456ed
24 changed files with 216 additions and 59 deletions
|
@ -73,18 +73,6 @@ o/$(MODE)/test/libc/proc/posix_spawn_test.dbg: \
|
|||
$(APE_NO_MODIFY_SELF)
|
||||
@$(APELINK)
|
||||
|
||||
o/$(MODE)/test/libc/proc/system_test.dbg: \
|
||||
$(TEST_LIBC_PROC_DEPS) \
|
||||
o/$(MODE)/test/libc/proc/system_test.o \
|
||||
o/$(MODE)/test/libc/proc/proc.pkg \
|
||||
o/$(MODE)/tool/build/echo.zip.o \
|
||||
o/$(MODE)/tool/build/cocmd.zip.o \
|
||||
o/$(MODE)/tool/build/false.zip.o \
|
||||
$(LIBC_TESTMAIN) \
|
||||
$(CRT) \
|
||||
$(APE_NO_MODIFY_SELF)
|
||||
@$(APELINK)
|
||||
|
||||
o/$(MODE)/test/libc/proc/execve_test.dbg: \
|
||||
$(TEST_LIBC_PROC_DEPS) \
|
||||
o/$(MODE)/test/libc/proc/execve_test.o \
|
||||
|
|
|
@ -28,26 +28,27 @@ TEST_LIBC_STDIO_DIRECTDEPS = \
|
|||
LIBC_CALLS \
|
||||
LIBC_FMT \
|
||||
LIBC_INTRIN \
|
||||
LIBC_LOG \
|
||||
LIBC_MEM \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_PROC \
|
||||
LIBC_RUNTIME \
|
||||
LIBC_STDIO \
|
||||
LIBC_STR \
|
||||
LIBC_SYSTEM \
|
||||
LIBC_SYSV \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_THREAD \
|
||||
LIBC_LOG \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_X \
|
||||
THIRD_PARTY_COMPILER_RT \
|
||||
THIRD_PARTY_GDTOA \
|
||||
THIRD_PARTY_MBEDTLS \
|
||||
THIRD_PARTY_MUSL \
|
||||
THIRD_PARTY_NSYNC \
|
||||
THIRD_PARTY_TZ \
|
||||
THIRD_PARTY_ZLIB \
|
||||
THIRD_PARTY_ZLIB_GZ \
|
||||
THIRD_PARTY_TZ
|
||||
|
||||
TEST_LIBC_STDIO_DEPS := \
|
||||
$(call uniq,$(foreach x,$(TEST_LIBC_STDIO_DIRECTDEPS),$($(x))))
|
||||
|
@ -66,16 +67,6 @@ o/$(MODE)/test/libc/stdio/%.dbg: \
|
|||
$(APE_NO_MODIFY_SELF)
|
||||
@$(APELINK)
|
||||
|
||||
o/$(MODE)/test/libc/stdio/popen_test.dbg: \
|
||||
$(TEST_LIBC_STDIO_DEPS) \
|
||||
o/$(MODE)/test/libc/stdio/popen_test.o \
|
||||
o/$(MODE)/test/libc/stdio/stdio.pkg \
|
||||
o/$(MODE)/tool/build/echo.zip.o \
|
||||
$(LIBC_TESTMAIN) \
|
||||
$(CRT) \
|
||||
$(APE_NO_MODIFY_SELF)
|
||||
@$(APELINK)
|
||||
|
||||
$(TEST_LIBC_STDIO_OBJS): private \
|
||||
DEFAULT_CCFLAGS += \
|
||||
-fno-builtin
|
||||
|
|
88
test/libc/system/BUILD.mk
Normal file
88
test/libc/system/BUILD.mk
Normal file
|
@ -0,0 +1,88 @@
|
|||
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
|
||||
#── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
|
||||
|
||||
PKGS += TEST_LIBC_SYSTEM
|
||||
|
||||
TEST_LIBC_SYSTEM_FILES := $(wildcard test/libc/system/*)
|
||||
TEST_LIBC_SYSTEM_SRCS = $(filter %.c,$(TEST_LIBC_SYSTEM_FILES))
|
||||
TEST_LIBC_SYSTEM_INCS = $(filter %.inc,$(TEST_LIBC_SYSTEM_FILES))
|
||||
TEST_LIBC_SYSTEM_SRCS_TEST = $(filter %_test.c,$(TEST_LIBC_SYSTEM_SRCS))
|
||||
|
||||
TEST_LIBC_SYSTEM_OBJS = \
|
||||
$(TEST_LIBC_SYSTEM_SRCS:%.c=o/$(MODE)/%.o)
|
||||
|
||||
TEST_LIBC_SYSTEM_COMS = \
|
||||
$(TEST_LIBC_SYSTEM_SRCS:%.c=o/$(MODE)/%)
|
||||
|
||||
TEST_LIBC_SYSTEM_BINS = \
|
||||
$(TEST_LIBC_SYSTEM_COMS) \
|
||||
$(TEST_LIBC_SYSTEM_COMS:%=%.dbg)
|
||||
|
||||
TEST_LIBC_SYSTEM_TESTS = \
|
||||
$(TEST_LIBC_SYSTEM_SRCS_TEST:%.c=o/$(MODE)/%.ok)
|
||||
|
||||
TEST_LIBC_SYSTEM_CHECKS = \
|
||||
$(TEST_LIBC_SYSTEM_SRCS_TEST:%.c=o/$(MODE)/%.runs)
|
||||
|
||||
TEST_LIBC_SYSTEM_DIRECTDEPS = \
|
||||
LIBC_CALLS \
|
||||
LIBC_INTRIN \
|
||||
LIBC_LOG \
|
||||
LIBC_MEM \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_RUNTIME \
|
||||
LIBC_STDIO \
|
||||
LIBC_STDIO \
|
||||
LIBC_SYSTEM \
|
||||
LIBC_SYSV \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_THREAD \
|
||||
LIBC_X \
|
||||
THIRD_PARTY_MUSL \
|
||||
THIRD_PARTY_TR \
|
||||
|
||||
TEST_LIBC_SYSTEM_DEPS := \
|
||||
$(call uniq,$(foreach x,$(TEST_LIBC_SYSTEM_DIRECTDEPS),$($(x))))
|
||||
|
||||
o/$(MODE)/test/libc/system/system.pkg: \
|
||||
$(TEST_LIBC_SYSTEM_OBJS) \
|
||||
$(foreach x,$(TEST_LIBC_SYSTEM_DIRECTDEPS),$($(x)_A).pkg)
|
||||
|
||||
o/$(MODE)/test/libc/system/%.dbg: \
|
||||
$(TEST_LIBC_SYSTEM_DEPS) \
|
||||
o/$(MODE)/test/libc/system/%.o \
|
||||
o/$(MODE)/test/libc/system/system.pkg \
|
||||
o/$(MODE)/tool/build/echo.zip.o \
|
||||
$(LIBC_TESTMAIN) \
|
||||
$(CRT) \
|
||||
$(APE_NO_MODIFY_SELF)
|
||||
@$(APELINK)
|
||||
|
||||
o/$(MODE)/test/libc/system/popen_test.dbg: \
|
||||
$(TEST_LIBC_SYSTEM_DEPS) \
|
||||
o/$(MODE)/test/libc/system/popen_test.o \
|
||||
o/$(MODE)/test/libc/system/system.pkg \
|
||||
o/$(MODE)/tool/build/echo.zip.o \
|
||||
$(LIBC_TESTMAIN) \
|
||||
$(CRT) \
|
||||
$(APE_NO_MODIFY_SELF)
|
||||
@$(APELINK)
|
||||
|
||||
o/$(MODE)/test/libc/system/system_test.dbg: \
|
||||
$(TEST_LIBC_SYSTEM_DEPS) \
|
||||
o/$(MODE)/test/libc/system/system_test.o \
|
||||
o/$(MODE)/test/libc/system/system.pkg \
|
||||
o/$(MODE)/tool/build/echo.zip.o \
|
||||
o/$(MODE)/tool/build/cocmd.zip.o \
|
||||
o/$(MODE)/tool/build/false.zip.o \
|
||||
$(LIBC_TESTMAIN) \
|
||||
$(CRT) \
|
||||
$(APE_NO_MODIFY_SELF)
|
||||
@$(APELINK)
|
||||
|
||||
$(TEST_LIBC_SYSTEM_OBJS): test/libc/system/BUILD.mk
|
||||
|
||||
.PHONY: o/$(MODE)/test/libc/system
|
||||
o/$(MODE)/test/libc/system: \
|
||||
$(TEST_LIBC_SYSTEM_BINS) \
|
||||
$(TEST_LIBC_SYSTEM_CHECKS)
|
|
@ -41,6 +41,7 @@ TEST_LIBC_THREAD_DIRECTDEPS = \
|
|||
LIBC_SOCK \
|
||||
LIBC_STDIO \
|
||||
LIBC_STR \
|
||||
LIBC_SYSTEM \
|
||||
LIBC_SYSV \
|
||||
LIBC_SYSV_CALLS \
|
||||
LIBC_TESTLIB \
|
||||
|
@ -49,7 +50,7 @@ TEST_LIBC_THREAD_DIRECTDEPS = \
|
|||
THIRD_PARTY_LIBCXXABI \
|
||||
THIRD_PARTY_NSYNC \
|
||||
THIRD_PARTY_NSYNC_MEM \
|
||||
THIRD_PARTY_TZ
|
||||
THIRD_PARTY_TZ \
|
||||
|
||||
TEST_LIBC_THREAD_DEPS := \
|
||||
$(call uniq,$(foreach x,$(TEST_LIBC_THREAD_DIRECTDEPS),$($(x))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue