source: mainline/Makefile@ 2483f28

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 2483f28 was 2670afc, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 6 years ago

Remove some replaced stuff from Makefile

  • Property mode set to 100644
File size: 3.3 KB
Line 
1#
2# Copyright (c) 2006 Martin Decky
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8#
9# - Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# - Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14# - The name of the author may not be used to endorse or promote products
15# derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28
29CCHECK = tools/sycek/ccheck
30CSCOPE = cscope
31FORMAT = clang-format
32CHECK = tools/check.sh
33
34ERRNO_HEADER = abi/include/abi/errno.h
35ERRNO_INPUT = abi/include/abi/errno.in
36
37.PHONY: all cscope cscope_parts format ccheck ccheck-fix space doxy check check_errno releasefile release
38
39all:
40
41cscope:
42 find abi kernel boot uspace -type f -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE).out
43
44cscope_parts:
45 find abi -type f -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_abi.out
46 find kernel -type f -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_kernel.out
47 find boot -type f -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_boot.out
48 find uspace -type f -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_uspace.out
49
50format:
51 find abi kernel boot uspace -type f -regex '^.*\.[ch]$$' | xargs $(FORMAT) -i -sort-includes -style=file
52
53ccheck: $(CCHECK)
54 cd tools && ./build-ccheck.sh
55 tools/ccheck.sh
56
57ccheck-fix: $(CCHECK)
58 cd tools && ./build-ccheck.sh
59 tools/ccheck.sh --fix
60
61space:
62 tools/srepl '[ \t]\+$$' ''
63
64doxy: $(BUILD_DIR)/build.ninja
65 ninja -C $(BUILD_DIR) doxygen
66
67# Pre-integration build check
68check: ccheck $(CHECK)
69ifdef JOBS
70 $(CHECK) -j $(JOBS)
71else
72 $(CHECK) -j $(shell nproc)
73endif
74
75# `sed` pulls a list of "compatibility-only" error codes from `errno.in`,
76# the following grep finds instances of those error codes in HelenOS code.
77check_errno:
78 @ ! cat abi/include/abi/errno.in | \
79 sed -n -e '1,/COMPAT_START/d' -e 's/__errno_entry(\([A-Z0-9]\+\).*/\\b\1\\b/p' | \
80 git grep -n -f - -- ':(exclude)abi' ':(exclude)uspace/lib/posix'
81
82# Release files
83
84releasefile: all
85 $(MAKE) -r -C release releasefile
86
87release:
88 $(MAKE) -r -C release release
89
90$(ERRNO_HEADER): $(ERRNO_INPUT)
91 echo '/* Generated file. Edit errno.in instead. */' > $@.new
92 sed 's/__errno_entry(\([^,]*\),\([^,]*\),.*/#define \1 __errno_t(\2)/' < $< >> $@.new
93 mv $@.new $@
Note: See TracBrowser for help on using the repository browser.