Allow sbase-box to be called as sbase-box tool args...
This commit is contained in:
parent
576a5ce55e
commit
cabbf6141e
2
Makefile
2
Makefile
|
@ -156,7 +156,7 @@ sbase-box: $(SRC) util.a
|
||||||
@echo '#include <string.h>' >> build/$@.c
|
@echo '#include <string.h>' >> build/$@.c
|
||||||
@echo '#include "util.h"' >> build/$@.c
|
@echo '#include "util.h"' >> build/$@.c
|
||||||
@for f in $(SRC); do echo "int `basename $$f .c`_main(int, char **);" >> build/$@.c; done
|
@for f in $(SRC); do echo "int `basename $$f .c`_main(int, char **);" >> build/$@.c; done
|
||||||
@echo 'int main(int argc, char *argv[]) { char *s = basename(argv[0]); if(0) ;' >> build/$@.c
|
@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
|
||||||
@for f in $(SRC); do echo "else if(!strcmp(s, \"`basename $$f .c`\")) `basename $$f .c`_main(argc, argv);" >> build/$@.c; done
|
@for f in $(SRC); do echo "else if(!strcmp(s, \"`basename $$f .c`\")) `basename $$f .c`_main(argc, argv);" >> build/$@.c; done
|
||||||
@echo 'else {' >> build/$@.c
|
@echo 'else {' >> build/$@.c
|
||||||
@for f in $(SRC); do echo "printf(\"`basename $$f .c`\"); putchar(' ');" >> build/$@.c; done
|
@for f in $(SRC); do echo "printf(\"`basename $$f .c`\"); putchar(' ');" >> build/$@.c; done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user