X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=build%2Fredo_scripts%2Fredo-ifchange;h=902ed16d5cef6b58c38d5ee6c306aef65f67c8a6;hb=ea9b56e85af64ae816c5faea045ffdd004d56472;hp=58402bd5c7a9f25d0cb8063d5e79f36aedb90b88;hpb=326fbfe3993b4441f5ccbe97cd9730d3469e9c59;p=plomrogue diff --git a/build/redo_scripts/redo-ifchange b/build/redo_scripts/redo-ifchange index 58402bd..902ed16 100755 --- a/build/redo_scripts/redo-ifchange +++ b/build/redo_scripts/redo-ifchange @@ -128,8 +128,8 @@ _dependencies_uptodate() { _echo_debug_message "$target dependency check:" # If any dependency does not exist, the target is out of date. LANG=C stat -c%Y $(LANG=C cut -f1 "$REDO_DIR/$target".dependencies) > \ - "$REDO_DIR/".dependencies.ctimes 2>&- || return 1 - exec 3< "$REDO_DIR/".dependencies.ctimes + "$REDO_DIR/$target".dependencies.ctimes 2>&- || return 1 + exec 3< "$REDO_DIR/$target".dependencies.ctimes exec 4< "$REDO_DIR/$target".dependencies while read ctime_actual <&3 && read dependency ctime_stored md5sum_stored <&4; do # If a .always file exists, the dependency is out of date. @@ -196,7 +196,9 @@ _do() { [ -e "$target.do" ] || _find_dofile "$target" if [ ! -e "$dofile" ]; then # If .do file does not exist and target exists, it is a source file. - if [ -e "$target" ]; then + if [ -e "$target_abspath" ]; then + _add_dependency "$REDO_TARGET" "$target_abspath" + _add_ctime_md5sum "$target_abspath" return 0 # If .do file does not exist and target does not exist, stop. else @@ -235,7 +237,7 @@ _do() { "$REDO_DIR/$target_abspath".dependencies_ne >&2 fi # Some do files (like all.do) do not usually generate output. - if [ -e "$target" ]; then + if [ -e "$target_abspath" ]; then # Record dependency on parent target. _add_dependency "$REDO_TARGET" "$target_abspath" _add_ctime_md5sum "$target_abspath"