@@ -1,8 +1,8 @@ #!/bin/sh # -# Copyright (c) 2008-2021 Jonathan Schleifer +# Copyright (c) 2008-2022 Jonathan Schleifer # # All rights reserved. # # This file is part of ObjFW. It may be distributed under the terms of the # Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -293,19 +293,19 @@ fi ;; esac objs="$objs $obj" build="no" - deps=$($OBJC -E -M $CPPFLAGS $OBJCFLAGS $i | - sed 's/.*: //' | sed 's/\\//g') - if test -f "$obj"; then + if test ! -f "$obj" -o "$i" -nt "$obj"; then + build="yes" + else + deps=$($OBJC -E -M $CPPFLAGS $OBJCFLAGS $i | + sed 's/.*: //' | sed 's/\\//g') for dep in $deps; do test "$dep" -nt $obj && build="yes" done - else - build="yes" fi if test x"$build" = x"yes"; then link="yes" status_compiling $i