File: Makefile.format

package info (click to toggle)
crust-firmware 0.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,900 kB
  • sloc: ansic: 19,341; yacc: 596; lex: 479; makefile: 334; asm: 215; sh: 136; python: 42
file content (18 lines) | stat: -rw-r--r-- 579 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
# Copyright © 2017-2022 The Crust Firmware Authors.
# SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only
#

find_files	 = $(sort $(wildcard $(foreach X,$2,$(1:%=$(SRC)/%/$X))))

format_dirs	:= arch/* common drivers/* include/* lib platform/* tools
format_globs	:= *.c */*.c *.h */*.h */*/*.h
format_files	:= $(call find_files,$(format_dirs),$(format_globs))

check-format: $(format_files)
	$(Q) uncrustify -c $(SRC)/.uncrustify -l C -q --check $^

format: $(format_files)
	$(Q) uncrustify -c $(SRC)/.uncrustify -l C -q --no-backup --replace $^

.PHONY: check-format format