From 3a25af8b179bfd923a7c1d7b451912bdeaa7ff0e Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 11 Feb 2024 15:43:04 -0500 Subject: [PATCH] [libc/posix] limit header files path if disabled --- components/libc/posix/io/epoll/SConscript | 8 ++------ components/libc/posix/io/eventfd/SConscript | 7 ++----- components/libc/posix/io/signalfd/SConscript | 8 ++------ components/libc/posix/io/timerfd/SConscript | 8 ++------ 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/components/libc/posix/io/epoll/SConscript b/components/libc/posix/io/epoll/SConscript index cef3fff8a0..c1b6166874 100644 --- a/components/libc/posix/io/epoll/SConscript +++ b/components/libc/posix/io/epoll/SConscript @@ -3,12 +3,8 @@ from building import * cwd = GetCurrentDir() -src = [] -CPPPATH = [cwd] +src = ['epoll.c'] -if GetDepend('RT_USING_POSIX_EPOLL'): - src += ['epoll.c'] - -group = DefineGroup('POSIX', src, depend = [''], CPPPATH = CPPPATH) +group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX_EPOLL']) Return('group') diff --git a/components/libc/posix/io/eventfd/SConscript b/components/libc/posix/io/eventfd/SConscript index b4becfce4b..84275acdbb 100644 --- a/components/libc/posix/io/eventfd/SConscript +++ b/components/libc/posix/io/eventfd/SConscript @@ -3,12 +3,9 @@ from building import * cwd = GetCurrentDir() -src = [] +src = ['eventfd.c'] CPPPATH = [cwd] -if GetDepend('RT_USING_POSIX_EVENTFD'): - src += ['eventfd.c'] - -group = DefineGroup('POSIX', src, depend = [''], CPPPATH = CPPPATH) +group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX_EVENTFD'], CPPPATH = CPPPATH) Return('group') diff --git a/components/libc/posix/io/signalfd/SConscript b/components/libc/posix/io/signalfd/SConscript index 724453b099..7803331b15 100644 --- a/components/libc/posix/io/signalfd/SConscript +++ b/components/libc/posix/io/signalfd/SConscript @@ -3,12 +3,8 @@ from building import * cwd = GetCurrentDir() -src = [] -CPPPATH = [cwd] +src = ['signalfd.c'] -if GetDepend('RT_USING_POSIX_SIGNALFD'): - src += ['signalfd.c'] - -group = DefineGroup('POSIX', src, depend = ['RT_USING_SMART','RT_USING_POSIX_SIGNALFD'], CPPPATH = CPPPATH) +group = DefineGroup('POSIX', src, depend = ['RT_USING_SMART','RT_USING_POSIX_SIGNALFD']) Return('group') diff --git a/components/libc/posix/io/timerfd/SConscript b/components/libc/posix/io/timerfd/SConscript index 561d00c13c..be123dfdff 100644 --- a/components/libc/posix/io/timerfd/SConscript +++ b/components/libc/posix/io/timerfd/SConscript @@ -3,12 +3,8 @@ from building import * cwd = GetCurrentDir() -src = [] -CPPPATH = [cwd] +src = ['timerfd.c'] -if GetDepend('RT_USING_DFS'): - src += ['timerfd.c'] - -group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX_TIMERFD'], CPPPATH = CPPPATH) +group = DefineGroup('POSIX', src, depend = ['RT_USING_DFS', 'RT_USING_POSIX_TIMERFD']) Return('group')