diff options
author | Ayush Agarwal <ayushnix@fastmail.com> | 2023-03-22 18:06:39 +0530 |
---|---|---|
committer | Ayush Agarwal <ayushnix@fastmail.com> | 2023-03-22 18:06:39 +0530 |
commit | f7620a119f7dbcadc07d1e29ca187a3eccea73e0 (patch) | |
tree | 9c77537cb3ed098e748313f71fd9859979e7652f | |
parent | 8249a6a5e69e100b5b8f2bfda9291f07b862b7fc (diff) |
make: use parentheses instead of braces
I find parenthese better to look at than braces. Yeah, I know, it might
be a lame reason.
'?=' was replaced with ':=' because the former is unnecessary. In cases
when a variable isn't expanded and a static assignment is made, there's
no need to use anything besides a simple '='.
The comment at the top indicates that this is a GNU Makefile because
we've used '$^' which is exclusive to GNU Make.
-rw-r--r-- | Makefile | 60 |
1 files changed, 31 insertions, 29 deletions
@@ -1,51 +1,53 @@ -DESTDIR ?= -PREFIX ?= /usr -BINDIR ?= ${PREFIX}/bin -DATAROOTDIR ?= ${PREFIX}/share -MANDIR ?= ${DATAROOTDIR}/man -BASHCOMPDIR ?= ${DATAROOTDIR}/bash-completion/completions -FISHCOMPDIR ?= ${DATAROOTDIR}/fish/vendor_completions.d -PROG ?= tessen - -SCDOC := scdoc -INSTALL := install +# tessen: GNU Makefile + +DESTDIR = +PREFIX = /usr +BINDIR := $(PREFIX)/bin +DATAROOTDIR := $(PREFIX)/share +MANDIR := $(DATAROOTDIR)/man +BASHCOMPDIR := $(DATAROOTDIR)/bash-completion/completions +FISHCOMPDIR := $(DATAROOTDIR)/fish/vendor_completions.d +PROG = tessen + +SCDOC = scdoc +INSTALL = install .PHONY: all install minimal bashcomp fishcomp clean uninstall all: - @echo "${PROG} is a shell script and doesn't need to be compiled" + @echo "$(PROG) is a shell script and doesn't need to be compiled" @echo "To install it, enter \"make install\"" install: man bashcomp fishcomp - ${INSTALL} -Dm 0755 ${PROG} -t ${DESTDIR}${BINDIR} + $(INSTALL) -Dm 0755 $(PROG) -t $(DESTDIR)$(BINDIR) @echo "" - @echo "${PROG} has been installed succesfully" + @echo "$(PROG) has been installed succesfully" minimal: - ${INSTALL} -Dm 0755 ${PROG} -t ${DESTDIR}${BINDIR} + $(INSTALL) -Dm 0755 $(PROG) -t $(DESTDIR)$(BINDIR) @echo "" - @echo "${PROG} has been installed succesfully" + @echo "$(PROG) has been installed succesfully" -man: man/${PROG}.1 man/${PROG}.5 - ${INSTALL} -Dm 0644 man/${PROG}.1 -t ${DESTDIR}${MANDIR}/man1 - ${INSTALL} -Dm 0644 man/${PROG}.5 -t ${DESTDIR}${MANDIR}/man5 +man: man/$(PROG).1 man/$(PROG).5 + $(INSTALL) -Dm 0644 man/$(PROG).1 -t $(DESTDIR)$(MANDIR)/man1 + $(INSTALL) -Dm 0644 man/$(PROG).5 -t $(DESTDIR)$(MANDIR)/man5 man/%: man/%.scd - ${SCDOC} < $^ > $@ + $(SCDOC) < $^ > $@ bashcomp: - ${INSTALL} -Dm 0644 completion/${PROG}.bash-completion ${DESTDIR}${BASHCOMPDIR}/${PROG} + $(INSTALL) -Dm 0644 completion/$(PROG).bash-completion $(DESTDIR)$(BASHCOMPDIR)/$(PROG) fishcomp: - ${INSTALL} -Dm 0644 completion/${PROG}.fish-completion ${DESTDIR}${FISHCOMPDIR}/${PROG}.fish + $(INSTALL) -Dm 0644 completion/$(PROG).fish-completion $(DESTDIR)$(FISHCOMPDIR)/$(PROG).fish clean: - rm -f man/${PROG}.1 - rm -f man/${PROG}.5 + rm -f man/$(PROG).1 + rm -f man/$(PROG).5 uninstall: - rm -f "${DESTDIR}${BINDIR}/${PROG}" - rm -f "${DESTDIR}${MANDIR}/man1/${PROG}.1" - rm -f "${DESTDIR}${MANDIR}/man5/${PROG}.5" - rm -f "${DESTDIR}${BASHCOMPDIR}/${PROG}" - rm -f "${DESTDIR}${FISHCOMPDIR}/${PROG}.fish" + rm -f "$(DESTDIR)$(BINDIR)/$(PROG)" + rm -f "$(DESTDIR)$(MANDIR)/man1/$(PROG).1" + rm -f "$(DESTDIR)$(MANDIR)/man5/$(PROG).5" + rm -f "$(DESTDIR)$(BASHCOMPDIR)/$(PROG)" + rm -f "$(DESTDIR)$(FISHCOMPDIR)/$(PROG).fish" |