source: mainline/Makefile@ 77578e8

Last change on this file since 77578e8 was 8624d1f, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago

Update some files that use shell-style comments

  • Property mode set to 100644
File size: 1.6 KB
Line 
1#
2# SPDX-FileCopyrightText: 2006 Martin Decky
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7CSCOPE = cscope
8FORMAT = clang-format
9
10ERRNO_HEADER = abi/include/abi/errno.h
11ERRNO_INPUT = abi/include/abi/errno.in
12
13.PHONY: nothing cscope cscope_parts format ccheck ccheck-fix space check_errno
14
15nothing:
16
17cscope:
18 find abi kernel boot uspace -type f -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE).out
19
20cscope_parts:
21 find abi -type f -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_abi.out
22 find kernel -type f -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_kernel.out
23 find boot -type f -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_boot.out
24 find uspace -type f -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_uspace.out
25
26format:
27 find abi kernel boot uspace -type f -regex '^.*\.[ch]$$' | xargs $(FORMAT) -i -sort-includes -style=file
28
29ccheck:
30 cd tools && ./build-ccheck.sh
31 tools/ccheck.sh
32
33ccheck-fix:
34 cd tools && ./build-ccheck.sh
35 tools/ccheck.sh --fix
36
37space:
38 tools/srepl '[ \t]\+$$' ''
39
40# `sed` pulls a list of "compatibility-only" error codes from `errno.in`,
41# the following grep finds instances of those error codes in HelenOS code.
42check_errno:
43 @ ! cat abi/include/abi/errno.in | \
44 sed -n -e '1,/COMPAT_START/d' -e 's/__errno_entry(\([A-Z0-9]\+\).*/\\b\1\\b/p' | \
45 git grep -n -f - -- ':(exclude)abi' ':(exclude)uspace/lib/posix'
46
47$(ERRNO_HEADER): $(ERRNO_INPUT)
48 echo '/* Generated file. Edit errno.in instead. */' > $@.new
49 sed 's/__errno_entry(\([^,]*\),\([^,]*\),.*/#define \1 __errno_t(\2)/' < $< >> $@.new
50 mv $@.new $@
Note: See TracBrowser for help on using the repository browser.