William A. Rowe, Jr. wrote:
Michael Clark wrote:
William A. Rowe, Jr. wrote:
I'd go for a subdir option (xattrs/solaris.c, xattrs/freebsd.c, etc)
where the parent apr_xattrs.c in the unix directory just sucks in
the correct implementation by ifdef tests...
I went for this approach (as it was Davi's initial suggestion for
this directory structure also).
It works. Only (minor) issue is the build-outputs.mk sources
dependencies for the files in the file_io/unix/xattr subdirectory
don't get generated.
I'm confused, if file_io/unix/apr_xattr.c does
#ifdef SOLARIS
#include "xattr/solaris.c"
#endif
for example, how didn't it pick up the dependencies? Are the defines
broken at that phase?
gen-build.py only appears to generate source dependencies for
MODULE/ARCH/*.c and I have them in file_io/unix/xattr/SUBARCH.c
eg contents of build-output.mk:
file_io/unix/xattr.lo: file_io/unix/xattr.c .make.dirs include/apr.h
include/apr_general.h include/apr_errno.h include/apr_inherit.h
include/apr_file_info.h include/apr_user.h include/apr_file_io.h
include/apr_allocator.h include/apr_want.h include/apr_thread_mutex.h
include/apr_pools.h include/apr_time.h include/apr_file_xattr.h
include/apr_tables.h
OBJECTS_file_io_unix = file_io/unix/filepath.lo file_io/unix/seek.lo
file_io/unix/buffer.lo file_io/unix/dir.lo file_io/unix/filepath_util.lo
file_io/unix/copy.lo file_io/unix/tempdir.lo file_io/unix/mktemp.lo
file_io/unix/filedup.lo file_io/unix/pipe.lo file_io/unix/flock.lo
file_io/unix/filestat.lo file_io/unix/xattr.lo file_io/unix/readwrite.lo
file_io/unix/fileacc.lo file_io/unix/fullrw.lo file_io/unix/open.lo
is missing file_io/unix/xattr/solaris.c, file_io/unix/xattr/linux.c, etc
So modifying an implementation doesn't trigger a rebuild of xattr.lo