Introduction
Introduction Statistics Contact Development Disclaimer Help
improve Makefile: be verbose - lsw - lists window titles of X clients to stdout
git clone git://git.suckless.org/lsw
Log
Files
Refs
README
LICENSE
---
commit b3a8bc86130458152e7700ffe690ef64bca98288
parent 8d5beffdb4522df02fc5b80003de94a248b20e70
Author: Hiltjo Posthuma <[email protected]>
Date: Sat, 25 Jun 2022 10:19:41 +0200
improve Makefile: be verbose
Using @ to hide output makes debugging slightly harder.
Do not abstract it away from the user.
Diffstat:
M Makefile | 48 +++++++++++------------------…
1 file changed, 17 insertions(+), 31 deletions(-)
---
diff --git a/Makefile b/Makefile
@@ -6,48 +6,34 @@ include config.mk
SRC = lsw.c
OBJ = ${SRC:.c=.o}
-all: options lsw
-
-options:
- @echo lsw build options:
- @echo "CFLAGS = ${CFLAGS}"
- @echo "LDFLAGS = ${LDFLAGS}"
- @echo "CC = ${CC}"
+all: lsw
.c.o:
- @echo CC -c $<
- @${CC} -c ${CFLAGS} $<
+ ${CC} -c ${CFLAGS} $<
lsw: ${OBJ}
- @echo CC -o $@
- @${CC} -o $@ ${OBJ} ${LDFLAGS}
+ ${CC} -o $@ ${OBJ} ${LDFLAGS}
clean:
- @echo cleaning
- @rm -f lsw ${OBJ} lsw-${VERSION}.tar.gz
+ rm -f lsw ${OBJ} lsw-${VERSION}.tar.gz
dist: clean
- @echo creating dist tarball
- @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}
+ 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
- @echo installing executable file to ${DESTDIR}${PREFIX}/bin
- @mkdir -p ${DESTDIR}${PREFIX}/bin
- @cp -f lsw ${DESTDIR}${PREFIX}/bin
- @chmod 755 ${DESTDIR}${PREFIX}/bin/lsw
- @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1/lsw.1
- @mkdir -p ${DESTDIR}${MANPREFIX}/man1
- @sed "s/VERSION/${VERSION}/g" < lsw.1 > ${DESTDIR}${MANPREFIX}/man1/ls…
- @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…
+ chmod 644 ${DESTDIR}${MANPREFIX}/man1/lsw.1
uninstall:
- @echo removing executable file from ${DESTDIR}${PREFIX}/bin
- @rm -f ${DESTDIR}${PREFIX}/bin/lsw
- @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
- @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
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.