diff options
| author | Michael Forney <mforney@mforney.org> | 2016-11-19 18:11:12 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-11-20 16:14:20 -0800 |
| commit | de4e4c63378c6fd0dc2504ddce5a13ee1e62504a (patch) | |
| tree | 996c7ca19cea166be6b0f1cb2fa364c4e96d3e69 /core/file | |
| parent | cd820c03fc5b00354fa5a444216726fc46a22a5d (diff) | |
Drop phony/ prefix from phony targets
There is little chance of collision between phony target names and actual
sources checked in $dir. Additionally, it was a bit magical when processing
phony sources because paths starting with $ or phony/ were left alone, while
others were prepended with $outdir/.
Also, where appropriate, use phony targets for dependencies instead of
specifying all of them for every compile action. This makes the resulting ninja
files easier to read, and might be more efficient too.
Diffstat (limited to 'core/file')
| -rw-r--r-- | core/file/gen.rc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/file/gen.rc b/core/file/gen.rc index ea6feb71..706efa8a 100644 --- a/core/file/gen.rc +++ b/core/file/gen.rc @@ -11,7 +11,7 @@ cflags\ build '$outdir'/include/magic.h sed '$srcdir'/src/magic.h.in ; with\ expr s,X.YY,`{echo $version | tr -d .}^, -phony headers include/magic.h +phony headers '$outdir'/include/magic.h build '$outdir'/file.1 sed '$srcdir'/doc/file.man ; exprs=(\ -e s,__CSECTION__,1,g\ @@ -20,7 +20,9 @@ build '$outdir'/file.1 sed '$srcdir'/doc/file.man ; exprs=(\ -e s,__MAGIC__,/share/file/magic,g\ ) with expr $"exprs -lib libmagic.a -d 'phony/$dir/headers phony/core/zlib/headers' src/^(\ +phony deps ('$dir' core/zlib)^/headers + +lib libmagic.a -d '$dir'/deps src/^(\ magic.c\ apprentice.c\ softmagic.c\ @@ -41,7 +43,7 @@ lib libmagic.a -d 'phony/$dir/headers phony/core/zlib/headers' src/^(\ fmtcheck.c\ ) -exe file -d 'phony/$dir/headers' src/file.c libmagic.a '$builddir/core/zlib/libz.a' +exe file -d '$dir'/headers src/file.c libmagic.a '$builddir/core/zlib/libz.a' file bin/file '$outdir'/file 755 file share/man/man1/file.1 '$outdir'/file.1 644 |
