diff options
author | John Ankarstrom <john@ankarstrom.se> | 2021-07-06 22:30:38 +0200 |
---|---|---|
committer | John Ankarstrom <john@ankarstrom.se> | 2021-07-06 22:30:38 +0200 |
commit | 90bb66e1f1cee7d63ac0d011e06662920431c718 (patch) | |
tree | d996fa9d2d385294968c4fcc6c6f4febdadb699e /build.c | |
parent | 8e0ab5d255876e48282d62443976d3d611089b15 (diff) | |
download | build-90bb66e1f1cee7d63ac0d011e06662920431c718.tar.gz |
Execute commands in the same shell process
Diffstat (limited to 'build.c')
-rw-r--r-- | build.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -155,10 +155,13 @@ uptodate: build: /* run commands */ + buf[0] = 0; for (j = 0; j < icmd; j++) { fprintf(stderr, "%s: %s\n", argv[i], cmd[j]); - system(cmd[j]); + strncat(buf, cmd[j], sizeof(buf)-1); + strncat(buf, "\n", sizeof(buf)-1); } + system(buf); done: fclose(fp); |