Changes in Makefile [7f345cd0:2660ee3] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r7f345cd0 r2660ee3  
    3030.NOTPARALLEL:
    3131
     32CCHECK = tools/sycek/ccheck
    3233CSCOPE = cscope
    3334FORMAT = clang-format
     
    4445CONFIG_MAKEFILE = Makefile.config
    4546CONFIG_HEADER = config.h
     47ERRNO_HEADER = abi/include/abi/errno.h
     48ERRNO_INPUT = abi/include/abi/errno.in
    4649
    47 .PHONY: all precheck cscope cscope_parts autotool config_auto config_default config distclean clean check releasefile release common boot kernel uspace
     50.PHONY: all precheck cscope cscope_parts autotool config_auto config_default config distclean clean check releasefile release common boot kernel uspace export-posix
    4851
    4952all: kernel uspace
    5053        $(MAKE) -r -C boot PRECHECK=$(PRECHECK)
    5154
    52 common: $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER)
     55common: $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(ERRNO_HEADER)
    5356
    5457kernel: common
     
    5760uspace: common
    5861        $(MAKE) -r -C uspace PRECHECK=$(PRECHECK)
     62
     63export-posix: common
     64ifndef EXPORT_DIR
     65        @echo ERROR: Variable EXPORT_DIR is not defined. && false
     66else
     67        $(MAKE) -r -C uspace export EXPORT_DIR=$(abspath $(EXPORT_DIR))
     68endif
    5969
    6070precheck: clean
     
    7383        find abi kernel boot uspace -type f -regex '^.*\.[ch]$$' | xargs $(FORMAT) -i -sort-includes -style=file
    7484
     85ccheck: $(CCHECK)
     86        tools/ccheck.sh
     87
     88ccheck-fix: $(CCHECK)
     89        tools/ccheck.sh --fix
     90
     91$(CCHECK):
     92        cd tools && ./build-ccheck.sh
     93
    7594doxy:
    7695        $(MAKE) -r -C doxygen
     
    83102        $(CHECK)
    84103endif
     104
     105# `sed` pulls a list of "compatibility-only" error codes from `errno.in`,
     106# the following grep finds instances of those error codes in HelenOS code.
     107check_errno:
     108        @ ! cat abi/include/abi/errno.in | \
     109        sed -n -e '1,/COMPAT_START/d' -e 's/__errno_entry(\([A-Z0-9]\+\).*/\\b\1\\b/p' | \
     110        git grep -n -f - -- ':(exclude)abi' ':(exclude)uspace/lib/posix'
    85111
    86112# Autotool (detects compiler features)
     
    125151        $(MAKE) -r -C doxygen clean
    126152
     153$(ERRNO_HEADER): $(ERRNO_INPUT)
     154        echo '/* Generated file. Edit errno.in instead. */' > $@.new
     155        sed 's/__errno_entry(\([^,]*\),\([^,]*\),.*/#define \1 __errno_t(\2)/' < $< >> $@.new
     156        mv $@.new $@
     157
    127158-include Makefile.local
Note: See TracChangeset for help on using the changeset viewer.