REDO-IFCREATE(1)

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

SYNOPSIS
redo-ifcreate target [target]...

DESCRIPTION
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.

EXAMPLES

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

all.do
    #!/bin/sh
    redo-ifchange b

b.do
    #!/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.

HISTORY
redo-ifcreate was designed by D. J. Bernstein and implemented by Ælla Chiana Moskopp.

AUTHOR
redo-ifcreate
    and this man page were written by Ælla Chiana Moskopp.

COPYRIGHT
Copyright © 2014-2016 Ælla Chiana 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.

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

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