summary refs log tree commit diff
path: root/bin/1sh
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-11-21 16:53:03 -0500
committerJune McEnroe <june@causal.agency>2019-11-21 16:53:03 -0500
commit2f4bf3ef8f3e3d1277974d69e18b017c9a74d612 (patch)
treedea30287fea80cc99fcbd727245f346b86875d45 /bin/1sh
parentAdd \? to prompt (diff)
downloadsrc-2f4bf3ef8f3e3d1277974d69e18b017c9a74d612.tar.gz
src-2f4bf3ef8f3e3d1277974d69e18b017c9a74d612.zip
Use braces in 1sh Makefile
Diffstat (limited to 'bin/1sh')
-rw-r--r--bin/1sh/Makefile38
1 files changed, 19 insertions, 19 deletions
diff --git a/bin/1sh/Makefile b/bin/1sh/Makefile
index ad85a46a..547079ad 100644
--- a/bin/1sh/Makefile
+++ b/bin/1sh/Makefile
@@ -1,5 +1,5 @@
 PREFIX = /usr/local
-MANDIR = $(PREFIX)/share/man
+MANDIR = ${PREFIX}/share/man
 
 CFLAGS += -std=c99 -Wall -Wextra -DSHELL -Ilibedit
 LDLIBS = -lcurses
@@ -37,20 +37,20 @@ SRCS += var.c
 GENSRCS = builtins.c nodes.c syntax.c
 GENHDRS = builtins.h nodes.h syntax.h token.h
 
-SRCS += $(GENSRCS)
-OBJS = $(SRCS:.c=.o) libedit/libedit.a
+SRCS += ${GENSRCS}
+OBJS = ${SRCS:.c=.o} libedit/libedit.a
 
-MAN1 = 1sh.1 1sh-kill.1 1sh-printf.1 1sh-test.1
+MANS = 1sh.1 1sh-kill.1 1sh-printf.1 1sh-test.1
 
 all: tags 1sh
 
-1sh: $(OBJS)
-	$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
+1sh: ${OBJS}
+	${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
 
-$(OBJS): $(GENHDRS)
+${OBJS}: ${GENHDRS}
 
 libedit/libedit.a:
-	$(MAKE) -C libedit libedit.a
+	${MAKE} -C libedit libedit.a
 
 builtins.c builtins.h: mkbuiltins builtins.def
 	sh mkbuiltins .
@@ -67,25 +67,25 @@ token.h: mktokens
 tags: *.h *.c
 	ctags -w *.h *.c
 
-depend: $(SRCS) $(GENHDRS)
-	$(CC) $(CFLAGS) -MM $(SRCS) > .depend
+depend: ${SRCS} ${GENHDRS}
+	${CC} ${CFLAGS} -MM ${SRCS} > .depend
 
 -include .depend
 
 clean:
-	rm -f 1sh $(OBJS) mknodes mksyntax $(GENSRCS) $(GENHDRS) tags .depend
+	rm -f 1sh ${OBJS} mknodes mksyntax ${GENSRCS} ${GENHDRS} tags .depend
 
-install: 1sh $(MAN1)
-	install -d $(PREFIX)/bin $(MANDIR)/man1
-	install 1sh $(PREFIX)/bin
-	install -m 644 $(MAN1) $(MANDIR)/man1
+install: 1sh ${MANS}
+	install -d ${PREFIX}/bin ${MANDIR}/man1
+	install 1sh ${PREFIX}/bin
+	install -m 644 ${MANS} ${MANDIR}/man1
 
 uninstall:
-	rm -f $(PREFIX)/bin/1sh $(MAN1:%=$(MANDIR)/man1/%)
+	rm -f ${PREFIX}/bin/1sh ${MANS:%=${MANDIR}/man1/%}
 
 shell:
-	grep -q '^$(PREFIX)/bin/1sh$$' /etc/shells \
-		|| echo '$(PREFIX)/bin/1sh' >> /etc/shells
+	grep -q '^${PREFIX}/bin/1sh$$' /etc/shells \
+		|| echo '${PREFIX}/bin/1sh' >> /etc/shells
 
 unshell:
-	sed -i sed '\;^$(PREFIX)/bin/1sh$$;d' /etc/shells
+	sed -i sed '\;^${PREFIX}/bin/1sh$$;d' /etc/shells