makefile: add format target
Runs clang-format over all source files and headers.
This commit is contained in:
parent
8fc9002195
commit
93c8ec4e25
1 changed files with 7 additions and 1 deletions
8
Makefile
8
Makefile
|
@ -5,6 +5,8 @@ MANPREFIX = ${PREFIX}/man
|
|||
|
||||
LUADIR = external/lua
|
||||
|
||||
CLANG_FORMAT = clang-format
|
||||
|
||||
CC = ${_CC}
|
||||
CFLAGS = ${_CFLAGS} -Iexternal -pedantic -Wall -Wextra
|
||||
CPPFLAGS = -D_DEFAULT_SOURCE ${_CPPFLAGS}
|
||||
|
@ -66,6 +68,10 @@ clean:
|
|||
doc:
|
||||
ldoc -s . -q . >/dev/null
|
||||
|
||||
format:
|
||||
find . -maxdepth 1 -iname '*.c' -o -iname '*.h' \
|
||||
| xargs ${CLANG_FORMAT} -i
|
||||
|
||||
install:
|
||||
mkdir -p "${DESTDIR}${PREFIX}"/bin
|
||||
mkdir -p "${DESTDIR}${PREFIX}"/include/callisto
|
||||
|
@ -76,4 +82,4 @@ install:
|
|||
cp -f libcallisto.a "${DESTDIR}${PREFIX}"/lib/
|
||||
cp -f man/csto.1 "${DESTDIR}${PREFIX}"/share/man/man1/
|
||||
|
||||
.PHONY: all clean doc install
|
||||
.PHONY: all clean doc format install
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue