REDO-IFCREATE(1) General Commands Manual REDO-IFCREATE(1)

redo-ifcreate - rebuild target files when source files are created

redo-ifcreate target [target]...

redo(1) is a tool for building files and for rebuilding them if any of their dependencies have changed. redo-ifcreate, when invoked from a dofile, adds non-existence dependencies of the current redo(1) target on all files given as arguments. This means that the current target will be rebuilt on invocation of redo(1) if any of the files given as arguments to redo-ifcreate exist. If an argument to redo-ifcreate exists, it exits with a status code indicating failure.

Consider the following two files all.do and b.do:


#!/bin/sh
redo-ifchange b

#!/bin/sh
if [ ! -e c ]; then
redo-ifcreate c
fi
date +%s

Invoking redo(1) in a directory with these files that does not contain a file named c will build a file named b containing a timestamp. The next time redo(1) is invoked, it will only rebuild b if a file named c was created since the last build. This can be verified by invoking redo(1) repeatedly and examining the timestamp b after each invocation, then creating a file named c, invoking redo(1) again and examining the timestamp again.

redo-ifcreate was designed by D. J. Bernstein and implemented by Nils Dagsson Moskopp.

redo-ifcreate and this man page were written by Nils Dagsson Moskopp.

Copyright © 2014-2016 Nils Dagsson Moskopp. License AGPLv3+: GNU Affero GPL version 3 or later http://www.gnu.org/licenses/agpl-3.0.html. This is free software: you are free to create and redistribute it. There is NO WARRANTY, to the extent permitted by law.

redo(1), redo-always(1), redo-dot(1), redo-ifchange(1), redo-ood(1), redo-sources(1), redo-stamp(1), redo-targets(1)

redo-ifcreate may break if a source filename contains a tab or newline character.