commit: aab5a31a14a2245622b2d567dc96c591ae50b393
parent: 7ab485dcaac600033dd8e251b15679040e425caa
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Wed, 10 May 2017 16:59:17 +0200
make.sh: make it more POSIX and readable
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/make.sh b/make.sh
@@ -5,7 +5,7 @@ CC=${CC:-cc}
CFLAGS=${CFLAGS:--Wall}
PREFIX=${PREFIX:-/usr/local}
BINDIR=${BINDIR:-${PREFIX}/bin}
-LIBDIR=${LIBDIR:-${PREFIX}/lib}
+#LIBDIR=${LIBDIR:-${PREFIX}/lib}
DOCDIR=${DOCDIR:-${PREFIX}/share/doc/lanodan-utils}
usage() {
@@ -14,15 +14,15 @@ install uses PREFIX, LIBDIR, BINDIR, DOCDIR, environment variables"
}
all() {
- for i in src/*.c; do
- ${CC} ${CFLAGS} $i -o $(sed -r 's/src(.*).c/bin\1/'<<<$i)
+ for i in $(ls src | grep '\.c$'); do
+ ${CC} ${CFLAGS} -o bin/${i%.c} src/${i}
done
}
install() {
mkdir -p ${BINDIR} && cp bin/* ${BINDIR};
mkdir -p ${DOCDIR} && cp doc/* ${DOCDIR};
- mkdir -p ${LIBDIR} && cp lib/* ${LIBDIR};
+ #mkdir -p ${LIBDIR} && cp lib/* ${LIBDIR};
}
clean() {