summaryrefslogtreecommitdiff
path: root/core/git
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-11-19 18:11:12 -0800
committerMichael Forney <mforney@mforney.org>2016-11-20 16:14:20 -0800
commitde4e4c63378c6fd0dc2504ddce5a13ee1e62504a (patch)
tree996c7ca19cea166be6b0f1cb2fa364c4e96d3e69 /core/git
parentcd820c03fc5b00354fa5a444216726fc46a22a5d (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/git')
-rw-r--r--core/git/gen.rc17
1 files changed, 7 insertions, 10 deletions
diff --git a/core/git/gen.rc b/core/git/gen.rc
index 3fa499da..c85010e9 100644
--- a/core/git/gen.rc
+++ b/core/git/gen.rc
@@ -10,17 +10,14 @@ cflags\
rule cmdlist 'oldcwd=$$PWD && cd $srcdir && ./generate-cmdlist.sh $$oldcwd/$in >$$oldcwd/$out.tmp && mv $$oldcwd/$out.tmp $$oldcwd/$out'
build '$outdir'/common-cmds.h cmdlist '$srcdir'/command-list.txt '|' '$srcdir'/Documentation/`{grep -v '^#' commands.txt}
-deps=(\
- phony/core/^(curl libressl zlib)^/headers\
- '$outdir'/common-cmds.h\
-)
+phony deps '$outdir'/common-cmds.h core/^(curl libressl zlib)^/headers
-cc exec_cmd.c '||' $deps ; with cflags '$cflags ''-DPREFIX=""'''
-cc common-main.c '||' $deps
-cc compat/regex/regex.c '||' $deps ; with cflags '$cflags -DGAWK -DNO_MBSUPPORT'
+cc exec_cmd.c '||' '$dir'/deps ; with cflags '$cflags ''-DPREFIX=""'''
+cc common-main.c '||' '$dir'/deps
+cc compat/regex/regex.c '||' '$dir'/deps ; with cflags '$cflags -DGAWK -DNO_MBSUPPORT'
# src/Makefile:/^LIB_OBJS.\+=
-lib libgit.a -d $"deps\
+lib libgit.a -d '$dir'/deps\
abspath.c\
advice.c\
alias.c\
@@ -200,7 +197,7 @@ lib libxdiff.a xdiff/^(\
)
# src/Makefile:/^BUILTIN_OBJS.\+=
-exe git -d $"deps git.c common-main.c.o builtin/^(\
+exe git -d '$dir'/deps git.c common-main.c.o builtin/^(\
add.c\
am.c\
annotate.c\
@@ -312,7 +309,7 @@ fn x {
shift
if(~ $#* 0) srcs=$name.c
if not srcs=$*
- exe git-$name -d $"deps $srcs common-main.c.o libgit.a.d
+ exe git-$name -d '$dir'/deps $srcs common-main.c.o libgit.a.d
file libexec/git-core/git-$name '$outdir'/git-$name 755
}