diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-11 13:11:53 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-11 13:11:53 +0200 |
commit | 68cd2dc506e7440baf1fa5467b84212a8a6a4913 (patch) | |
tree | 30a454f36c0c66e45ed1dbbbb6ec25b537b10ebb /build.c | |
parent | 0596b07e2470d9e0444df5ea1a08997367202c18 (diff) | |
download | build-68cd2dc506e7440baf1fa5467b84212a8a6a4913.tar.gz |
Support "-o " targets
Diffstat (limited to 'build.c')
-rw-r--r-- | build.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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", |