[hackers] [lsw] improve Makefile: be verbose || Hiltjo Posthuma
commit b3a8bc86130458152e7700ffe690ef64bca98288
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Sat Jun 25 10:19:41 2022 +0200
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Sat Jun 25 10:19:41 2022 +0200
improve Makefile: be verbose
Using _AT_ to hide output makes debugging slightly harder.
Do not abstract it away from the user.
diff --git a/Makefile b/Makefile
index 7a324ef..b37fa64 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -6,48 +6,34 @@ include config.mk
SRC = lsw.c
OBJ = ${SRC:.c=.o}
-all: options lsw
-
-options:
- _AT_echo lsw build options:
- _AT_echo "CFLAGS = ${CFLAGS}"
- _AT_echo "LDFLAGS = ${LDFLAGS}"
- _AT_echo "CC = ${CC}"
+all: lsw
.c.o:
- _AT_echo CC -c $<
- _AT_${CC} -c ${CFLAGS} $<
+ ${CC} -c ${CFLAGS} $<
lsw: ${OBJ}
- _AT_echo CC -o $@
- _AT_${CC} -o $@ ${OBJ} ${LDFLAGS}
+ ${CC} -o $_AT_ ${OBJ} ${LDFLAGS}
clean:
- _AT_echo cleaning
- _AT_rm -f lsw ${OBJ} lsw-${VERSION}.tar.gz
+ rm -f lsw ${OBJ} lsw-${VERSION}.tar.gz
dist: clean
- _AT_echo creating dist tarball
- _AT_mkdir -p lsw-${VERSION}
- _AT_cp -R LICENSE Makefile README config.mk lsw.1 ${SRC} lsw-${VERSION}
- _AT_tar -cf lsw-${VERSION}.tar lsw-${VERSION}
- _AT_gzip lsw-${VERSION}.tar
- _AT_rm -rf lsw-${VERSION}
+ mkdir -p lsw-${VERSION}
+ cp -R LICENSE Makefile README config.mk lsw.1 ${SRC} lsw-${VERSION}
+ tar -cf lsw-${VERSION}.tar lsw-${VERSION}
+ gzip lsw-${VERSION}.tar
+ rm -rf lsw-${VERSION}
install: all
- _AT_echo installing executable file to ${DESTDIR}${PREFIX}/bin
- _AT_mkdir -p ${DESTDIR}${PREFIX}/bin
- _AT_cp -f lsw ${DESTDIR}${PREFIX}/bin
- _AT_chmod 755 ${DESTDIR}${PREFIX}/bin/lsw
- _AT_echo installing manual page to ${DESTDIR}${MANPREFIX}/man1/lsw.1
- _AT_mkdir -p ${DESTDIR}${MANPREFIX}/man1
- _AT_sed "s/VERSION/${VERSION}/g" < lsw.1 > ${DESTDIR}${MANPREFIX}/man1/lsw.1
- _AT_chmod 644 ${DESTDIR}${MANPREFIX}/man1/lsw.1
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ cp -f lsw ${DESTDIR}${PREFIX}/bin
+ chmod 755 ${DESTDIR}${PREFIX}/bin/lsw
+ mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ sed "s/VERSION/${VERSION}/g" < lsw.1 > ${DESTDIR}${MANPREFIX}/man1/lsw.1
+ chmod 644 ${DESTDIR}${MANPREFIX}/man1/lsw.1
uninstall:
- _AT_echo removing executable file from ${DESTDIR}${PREFIX}/bin
- _AT_rm -f ${DESTDIR}${PREFIX}/bin/lsw
- _AT_echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
- _AT_rm -f ${DESTDIR}${MANPREFIX}/man1/lsw.1
+ rm -f ${DESTDIR}${PREFIX}/bin/lsw
+ rm -f ${DESTDIR}${MANPREFIX}/man1/lsw.1
.PHONY: all options clean dist install uninstall
Received on Sat Jun 25 2022 - 10:21:08 CEST
This archive was generated by hypermail 2.3.0
: Sat Jun 25 2022 - 10:24:31 CEST