From: Michal Sojka Date: Tue, 12 Nov 2013 17:49:36 +0000 (+0100) Subject: Fix sources_in_subdirectory test X-Git-Url: https://rtime.felk.cvut.cz/gitweb/omk.git/commitdiff_plain/3f1f712689580a78e314f0ec01539450d5e7072d?ds=sidebyside Fix sources_in_subdirectory test Note that handling in source files in subdirectories has changed. See previous commit for details. Now, all tests pass. --- diff --git a/snippets/linux.omk b/snippets/linux.omk index d69497c..77e2856 100644 --- a/snippets/linux.omk +++ b/snippets/linux.omk @@ -227,8 +227,8 @@ TARGET_GEN_SOURCES = $(filter %.c,$($(1)_SERVER_IDL:%.idl=%-skels.c)) \ $(filter %.c,$($(1)_IDL:%.idl=%.c)) TARGET_SOURCES = $($(1)_SOURCES) $(TARGET_GEN_SOURCES) TARGET_SOURCES_ABS = $($(1)_SOURCES:%=$(SOURCES_DIR)/%) $(TARGET_GEN_SOURCES) -TARGET_OBJS = $(sort $(addsuffix .o,$(basename $(TARGET_SOURCES)))) -TARGET_LOBJS = $(sort $(addsuffix .lo,$(basename $(TARGET_SOURCES)))) +TARGET_OBJS = $(sort $(addsuffix .o,$(basename $(notdir $(TARGET_SOURCES))))) +TARGET_LOBJS = $(sort $(addsuffix .lo,$(basename $(notdir $(TARGET_SOURCES))))) TARGET_IDLS = $($(1)_SERVER_IDL) $($(1)_CLIENT_IDL) $($(1)_IDL) LINK_WITH_CXX = $(filter %.cc,$(TARGET_SOURCES))$(filter %.cxx,$(TARGET_SOURCES))$$(filter %.cpp,$(TARGET_SOURCES)) diff --git a/tests/libraries b/tests/libraries index bbe0220..3b7cb34 100755 --- a/tests/libraries +++ b/tests/libraries @@ -34,4 +34,6 @@ test_LIBS = mylib EOF needs_valid_CC WVPASS make -WVPASS test -f _compiled/lib/libmylib.a +case $OMK_RULES in + linux) WVPASS test -f _compiled/lib/libmylib.a ;; +esac diff --git a/tests/sources_in_subdirectory b/tests/sources_in_subdirectory index 439dffb..46bd631 100755 --- a/tests/sources_in_subdirectory +++ b/tests/sources_in_subdirectory @@ -1,6 +1,6 @@ #!/bin/bash -. ./functions.sh +. ./wvtest.sh case $OMK_RULES in linux|sysless) @@ -8,16 +8,18 @@ case $OMK_RULES in *) exit 0 esac -touch config.omk-default +cat > 'Makefile.omk' < a.c - -make CC=cc - -find ../_build -type d -name dir3 || error "dir3 not found" +echo 'int main() { return 0; }' > a.c -exit 0 +WVPASS make diff --git a/tests/sources_in_subdirectory.files b/tests/sources_in_subdirectory.files deleted file mode 100644 index 3962951..0000000 --- a/tests/sources_in_subdirectory.files +++ /dev/null @@ -1,5 +0,0 @@ -cat > 'Makefile.omk' <