aboutsummaryrefslogtreecommitdiff
path: root/build.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-11 13:11:53 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-11 13:11:53 +0200
commit68cd2dc506e7440baf1fa5467b84212a8a6a4913 (patch)
tree30a454f36c0c66e45ed1dbbbb6ec25b537b10ebb /build.c
parent0596b07e2470d9e0444df5ea1a08997367202c18 (diff)
downloadbuild-68cd2dc506e7440baf1fa5467b84212a8a6a4913.tar.gz
Support "-o " targets
Diffstat (limited to 'build.c')
-rw-r--r--build.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/build.c b/build.c
index 16b53e2..267f674 100644
--- a/build.c
+++ b/build.c
@@ -100,10 +100,13 @@ main(int argc, char *argv[])
/* Find target inside command. */
for(b = b+3; *b; b++){
- if(!(*b+1)) continue;
- if(*b != '>') continue;
- strncpy(tgt, b+1, MAXTGT-1);
-
+ if(*(b+1) && *(b+2) && *(b+3)
+ && strncmp(b, "-o ", 3) == 0)
+ strncpy(tgt, b+3,
+ MAXTGT-1);
+ else if(*(b+1) && *b == '>')
+ strncpy(tgt, b+1,
+ MAXTGT-1);
}
ddd("%s: command line '%s'\n",