[hackers] [sbase] align redirections in Makefile for readability || Evan Gates

From: <git_AT_suckless.org>
Date: Sat, 21 Feb 2015 10:33:31 +0100 (CET)

commit 6a6824f5f94198ebbe6baf93837fbdda2e15da07
Author: Evan Gates <evan.gates_AT_gmail.com>
Date: Fri Feb 20 13:55:45 2015 -0800

    align redirections in Makefile for readability

diff --git a/Makefile b/Makefile
index 1339299..527de2a 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -200,19 +200,19 @@ sbase-box: $(LIB) $(SRC)
         mkdir -p build
         cp $(HDR) build
         for f in $(SRC); do sed "s/^main(/$${f%.c}_&/" < $$f > build/$$f; done
- echo '#include <libgen.h>' > build/$_AT_.c
- echo '#include <stdio.h>' >> build/$_AT_.c
- echo '#include <stdlib.h>' >> build/$_AT_.c
- echo '#include <string.h>' >> build/$_AT_.c
- echo '#include "util.h"' >> build/$_AT_.c
- for f in $(SRC); do echo "int $${f%.c}_main(int, char **);" >> build/$_AT_.c; done
- 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/$_AT_.c
- echo "else if (!strcmp(s, \"[\")) return test_main(argc, argv);" >> build/$_AT_.c
- for f in $(SRC); do echo "else if(!strcmp(s, \"$${f%.c}\")) return $${f%.c}_main(argc, argv);" >> build/$_AT_.c; done
- echo 'else {' >> build/$_AT_.c
- echo "fputs(\"[ \", stdout);" >> build/$_AT_.c
- for f in $(SRC); do echo "fputs(\"$${f%.c} \", stdout);" >> build/$_AT_.c; done
- echo "putchar(0xa); }; return 0; }" >> build/$_AT_.c
+ echo '#include <libgen.h>' > build/$_AT_.c
+ echo '#include <stdio.h>' >> build/$_AT_.c
+ echo '#include <stdlib.h>' >> build/$_AT_.c
+ echo '#include <string.h>' >> build/$_AT_.c
+ echo '#include "util.h"' >> build/$_AT_.c
+ for f in $(SRC); do echo "int $${f%.c}_main(int, char **);"; done >> build/$_AT_.c
+ echo 'int main(int argc, char *argv[]) { char *s = basename(argv[0]);' >> build/$_AT_.c
+ echo 'if(!strcmp(s,"sbase-box")) { argc--; argv++; s = basename(argv[0]); } if(0) ;' >> build/$_AT_.c
+ echo "else if (!strcmp(s, \"[\")) return test_main(argc, argv);" >> build/$_AT_.c
+ for f in $(SRC); do echo "else if(!strcmp(s, \"$${f%.c}\")) return $${f%.c}_main(argc, argv);"; done >> build/$_AT_.c
+ echo 'else { fputs("[ ", stdout);' >> build/$_AT_.c
+ for f in $(SRC); do echo "fputs(\"$${f%.c} \", stdout);"; done >> build/$_AT_.c
+ echo 'putchar(0xa); }; return 0; }' >> build/$_AT_.c
         $(LD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $_AT_ build/*.c $(LIB)
         rm -r build
 
Received on Sat Feb 21 2015 - 10:33:31 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 21 2015 - 10:36:35 CET