[hackers] [dmenu] Makefile: bikesheddingly replace ${} with $() || Quentin Rameau
commit 0b5748021877b2f214474b034d8bf0122ee88ed2
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Thu Mar 22 11:18:56 2018 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Sun Apr 22 14:09:05 2018 +0200
Makefile: bikesheddingly replace ${} with $()
diff --git a/Makefile b/Makefile
index a7cd04f..daac40b 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -4,71 +4,71 @@
include config.mk
SRC = drw.c dmenu.c stest.c util.c
-OBJ = ${SRC:.c=.o}
+OBJ = $(SRC:.c=.o)
all: options dmenu stest
options:
_AT_echo dmenu build options:
- _AT_echo "CFLAGS = ${CFLAGS}"
- _AT_echo "LDFLAGS = ${LDFLAGS}"
- _AT_echo "CC = ${CC}"
+ _AT_echo "CFLAGS = $(CFLAGS)"
+ _AT_echo "LDFLAGS = $(LDFLAGS)"
+ _AT_echo "CC = $(CC)"
.c.o:
_AT_echo CC $<
- _AT_${CC} -c ${CFLAGS} $<
+ _AT_$(CC) -c $(CFLAGS) $<
config.h:
_AT_echo creating $@ from config.def.h
_AT_cp config.def.h $@
-${OBJ}: arg.h config.h config.mk drw.h
+$(OBJ): arg.h config.h config.mk drw.h
dmenu: dmenu.o drw.o util.o
_AT_echo CC -o $@
- _AT_${CC} -o $@ dmenu.o drw.o util.o ${LDFLAGS}
+ _AT_$(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
stest: stest.o
_AT_echo CC -o $@
- _AT_${CC} -o $@ stest.o ${LDFLAGS}
+ _AT_$(CC) -o $@ stest.o $(LDFLAGS)
clean:
_AT_echo cleaning
- _AT_rm -f dmenu stest ${OBJ} dmenu-${VERSION}.tar.gz
+ _AT_rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz
dist: clean
_AT_echo creating dist tarball
- _AT_mkdir -p dmenu-${VERSION}
+ _AT_mkdir -p dmenu-$(VERSION)
_AT_cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1 \
- drw.h util.h dmenu_path dmenu_run stest.1 ${SRC} \
- dmenu-${VERSION}
- _AT_tar -cf dmenu-${VERSION}.tar dmenu-${VERSION}
- _AT_gzip dmenu-${VERSION}.tar
- _AT_rm -rf dmenu-${VERSION}
+ drw.h util.h dmenu_path dmenu_run stest.1 $(SRC) \
+ dmenu-$(VERSION)
+ _AT_tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION)
+ _AT_gzip dmenu-$(VERSION).tar
+ _AT_rm -rf dmenu-$(VERSION)
install: all
- _AT_echo installing executables to ${DESTDIR}${PREFIX}/bin
- _AT_mkdir -p ${DESTDIR}${PREFIX}/bin
- _AT_cp -f dmenu dmenu_path dmenu_run stest ${DESTDIR}${PREFIX}/bin
- _AT_chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu
- _AT_chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_path
- _AT_chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_run
- _AT_chmod 755 ${DESTDIR}${PREFIX}/bin/stest
- _AT_echo installing manual pages to ${DESTDIR}${MANPREFIX}/man1
- _AT_mkdir -p ${DESTDIR}${MANPREFIX}/man1
- _AT_sed "s/VERSION/${VERSION}/g" < dmenu.1 > ${DESTDIR}${MANPREFIX}/man1/dmenu.1
- _AT_sed "s/VERSION/${VERSION}/g" < stest.1 > ${DESTDIR}${MANPREFIX}/man1/stest.1
- _AT_chmod 644 ${DESTDIR}${MANPREFIX}/man1/dmenu.1
- _AT_chmod 644 ${DESTDIR}${MANPREFIX}/man1/stest.1
+ _AT_echo installing executables to $(DESTDIR)$(PREFIX)/bin
+ _AT_mkdir -p $(DESTDIR)$(PREFIX)/bin
+ _AT_cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin
+ _AT_chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
+ _AT_chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path
+ _AT_chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run
+ _AT_chmod 755 $(DESTDIR)$(PREFIX)/bin/stest
+ _AT_echo installing manual pages to $(DESTDIR)$(MANPREFIX)/man1
+ _AT_mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ _AT_sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
+ _AT_sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1
+ _AT_chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
+ _AT_chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1
uninstall:
- _AT_echo removing executables from ${DESTDIR}${PREFIX}/bin
- _AT_rm -f ${DESTDIR}${PREFIX}/bin/dmenu
- _AT_rm -f ${DESTDIR}${PREFIX}/bin/dmenu_path
- _AT_rm -f ${DESTDIR}${PREFIX}/bin/dmenu_run
- _AT_rm -f ${DESTDIR}${PREFIX}/bin/stest
- _AT_echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
- _AT_rm -f ${DESTDIR}${MANPREFIX}/man1/dmenu.1
- _AT_rm -f ${DESTDIR}${MANPREFIX}/man1/stest.1
+ _AT_echo removing executables from $(DESTDIR)$(PREFIX)/bin
+ _AT_rm -f $(DESTDIR)$(PREFIX)/bin/dmenu
+ _AT_rm -f $(DESTDIR)$(PREFIX)/bin/dmenu_path
+ _AT_rm -f $(DESTDIR)$(PREFIX)/bin/dmenu_run
+ _AT_rm -f $(DESTDIR)$(PREFIX)/bin/stest
+ _AT_echo removing manual page from $(DESTDIR)$(MANPREFIX)/man1
+ _AT_rm -f $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
+ _AT_rm -f $(DESTDIR)$(MANPREFIX)/man1/stest.1
.PHONY: all options clean dist install uninstall
diff --git a/config.mk b/config.mk
index 50fe52c..528704c 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -3,7 +3,7 @@ VERSION = 4.8
# paths
PREFIX = /usr/local
-MANPREFIX = ${PREFIX}/share/man
+MANPREFIX = $(PREFIX)/share/man
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
_AT_@ -16,16 +16,16 @@ XINERAMAFLAGS = -DXINERAMA
FREETYPELIBS = -lfontconfig -lXft
FREETYPEINC = /usr/include/freetype2
# OpenBSD (uncomment)
-#FREETYPEINC = ${X11INC}/freetype2
+#FREETYPEINC = $(X11INC)/freetype2
# includes and libs
-INCS = -I${X11INC} -I${FREETYPEINC}
-LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
+INCS = -I$(X11INC) -I$(FREETYPEINC)
+LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
# flags
-CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
-CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
-LDFLAGS = -s ${LIBS}
+CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
+CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS)
+LDFLAGS = -s $(LIBS)
# compiler and linker
CC = cc
Received on Sun Apr 22 2018 - 14:34:24 CEST
This archive was generated by hypermail 2.3.0
: Sun Apr 22 2018 - 14:36:50 CEST