diff options
| author | Michael Forney <mforney@mforney.org> | 2016-04-17 16:24:23 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-04-17 16:34:03 -0700 |
| commit | 20002f8d8cee6c6d30c7aa7fbbbad79e4cb82664 (patch) | |
| tree | e3ebb6a9075a4e9d88cad9dea014c860919d6203 /ninja.rc | |
| parent | e2be6f64fab1c78f1dac6edd4df52edff722e441 (diff) | |
Use phony targets for order-only dependencies
Diffstat (limited to 'ninja.rc')
| -rw-r--r-- | ninja.rc | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -43,8 +43,15 @@ fn build { # higher-level rules -fn stamp { - build '$outdir/stamp' stamp '$outdir'/$* +fn phony { + name=$1 deps=() { + shift + for(dep) { + if(! ~ $dep '$'* phony/*) dep='$outdir'/$dep + deps=($deps $dep) + } + build phony/'$dir'/$name phony $deps + } } fn cflags { |
