[hackers] [sbase] return exit status of command in sbase-box || Evan Gates
commit 5cf965ffbf043e2132ec1788bf7fd3c165a937f0
Author: Evan Gates <evan.gates_AT_gmail.com>
Date: Fri Nov 7 14:12:13 2014 -0800
return exit status of command in sbase-box
diff --git a/Makefile b/Makefile
index 31b111d..dd05f52 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -171,7 +171,7 @@ sbase-box: $(SRC) util.a
_AT_echo '#include "util.h"' >> build/$@.c
_AT_for f in $(SRC); do echo "int `basename $$f .c`_main(int, char **);" >> build/$@.c; done
_AT_echo 'int main(int argc, char *argv[]) { char *s = basename(argv[0]); if(!strcmp(s,"sbase-box")) { argc--; argv++; s = basename(argv[0]); } if(0) ;' >> build/$@.c
- _AT_for f in $(SRC); do echo "else if(!strcmp(s, \"`basename $$f .c`\")) `basename $$f .c`_main(argc, argv);" >> build/$@.c; done
+ _AT_for f in $(SRC); do echo "else if(!strcmp(s, \"`basename $$f .c`\")) return `basename $$f .c`_main(argc, argv);" >> build/$@.c; done
_AT_echo 'else {' >> build/$@.c
_AT_for f in $(SRC); do echo "printf(\"`basename $$f .c`\"); putchar(' ');" >> build/$@.c; done
_AT_echo "putchar(0xa); }; return 0; }" >> build/$@.c
Received on Sat Nov 08 2014 - 14:51:01 CET
This archive was generated by hypermail 2.3.0
: Sat Nov 08 2014 - 15:00:22 CET