Make Makefile slightly more readable

This commit is contained in:
Ultracoolguy 2020-11-30 16:32:51 -04:00 committed by Eyal Sawady
parent 6ff83c2761
commit e69c479dd5
No known key found for this signature in database
GPG Key ID: 604D3459E53A9952
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
.POSIX:
all:
$(CC) -o among-sus $(CFLAGS) $$(git rev-parse --short HEAD >/dev/null 2>/dev/null && printf -- '-DVERSION="%s"' "$$(git rev-parse --short HEAD)" || printf -- '-DVERSION="unknown"') main.c $(LDFLAGS)
$(CC) -o among-sus $(CFLAGS) \
$$(git rev-parse --short HEAD &>/dev/null && \
printf -- '-DVERSION="%s"' "$$(git rev-parse --short HEAD)" || \
printf -- '-DVERSION="unknown"') main.c $(LDFLAGS)
clean:
rm -f among-sus