aboutsummaryrefslogtreecommitdiffstats
path: root/src/redo-ifcreate.c
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2014-08-16 01:07:03 +0200
committerTharre <tharre3@gmail.com>2014-08-16 01:17:51 +0200
commit89e687de8bc635ff73b002b2ab494b0d88e13f10 (patch)
tree44a22030a6f30547eb40e303d4f39b0f308f4f57 /src/redo-ifcreate.c
parent1d7b303de42dd4763165c46f0b2f8bad2c3a407f (diff)
downloadredo-89e687de8bc635ff73b002b2ab494b0d88e13f10.tar.gz
redo-89e687de8bc635ff73b002b2ab494b0d88e13f10.tar.xz
redo-89e687de8bc635ff73b002b2ab494b0d88e13f10.zip
Add redo-ifcreate (and add redo-always properly)
Diffstat (limited to 'src/redo-ifcreate.c')
-rw-r--r--src/redo-ifcreate.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/redo-ifcreate.c b/src/redo-ifcreate.c
new file mode 100644
index 0000000..71c9a22
--- /dev/null
+++ b/src/redo-ifcreate.c
@@ -0,0 +1,17 @@
+/* redo-ifcreate.c
+ *
+ * Copyright (c) 2014 Tharre
+ *
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+#include "build.h"
+
+int main(int argc, char *argv[]) {
+ for (int i = 1; i < argc; ++i) {
+ if (has_changed(argv[i], 'e', false))
+ build_target(argv[i]);
+ add_dep(argv[i], 'e');
+ }
+}