diff options
| author | Michael Forney <mforney@mforney.org> | 2016-07-10 12:37:55 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-07-10 12:37:55 -0700 |
| commit | 8d37aa716d4c4232343509ca9aae47bd249a750e (patch) | |
| tree | 7a40b86d8f6819934b6814ef8140d4e30b35170b /ninja.rc | |
| parent | 064f02c45807259d435082c93cd9dae4b1ea4621 (diff) | |
Delete sub and go back to subninja
Using a pipe allows us to specify the file name only once, but also runs in a
subshell, so we lose the list of dependent sources.
So, just go back to subninja, and make it slightly cleaner by assuming $dir.
Diffstat (limited to 'ninja.rc')
| -rw-r--r-- | ninja.rc | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -16,18 +16,16 @@ fn with { } fn subninja { - echo subninja $* + file=$1 + if(! ~ $file '$'*) + file='$dir'/$file + echo subninja $file } fn include { echo include $* } -fn sub { - cat >$1 - subninja '$dir'/$1 -} - fn rule { name=$1 { shift |
