Index: objfw-config.in ================================================================== --- objfw-config.in +++ objfw-config.in @@ -54,12 +54,24 @@ while test x"$1" != "x"; do case "$1" in *.m) obj="${1%.m}.o" objs="$objs $obj" + build="no" + deps=$($OBJC -E -M $CPPFLAGS $ENV_CPPFLAGS $1 |\ + sed 's/.*: //' | sed 's/\\//g') + + if test -f "$obj"; then + for dep in $deps; do + test "$dep" -nt $obj && \ + build="yes" + done + else + build="yes" + fi - if test ! -f "$obj" -o "$1" -nt "$obj"; then + if test x"$build" = x"yes"; then link="yes" echo "Compiling $1..." $OBJC $CPPFLAGS $OBJCFLAGS \ $ENV_CPPFLAGS $ENV_OBJCFLAGS \ -c -o $obj $1 || exit $?