Changeset 9b8be79 in mainline for uspace/lib/posix/Makefile


Ignore:
Timestamp:
2018-09-18T14:50:22Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
460ea7e
Parents:
7570a95f
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-09-14 17:49:49)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-09-18 14:50:22)
Message:

libposix: Change header organization and remove passthrough headers

Posix headers now function like an overlay. The system include directories
are searched after posix directories. The headers don't need to be patched
for export now. libposix files now include headers using bracket notation
instead of quoted notation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/Makefile

    r7570a95f r9b8be79  
    3131LIBRARY = libposix
    3232
    33 EXTRA_CFLAGS = -Iinclude/
    34 
    35 INCLUDE_LIBC = ./include/libc
     33EXTRA_CFLAGS = -Iinclude/posix
    3634
    3735EXPORT_FILES = \
     
    7775
    7876EXPORT_CPPFLAGS = \
    79         -isystem $$(HELENOS_EXPORT_ROOT)/include \
     77        -isystem $$(HELENOS_EXPORT_ROOT)/include/posix \
     78        -isystem $$(HELENOS_EXPORT_ROOT)/include/libc \
     79        -idirafter $$(HELENOS_EXPORT_ROOT)/include \
    8080        $(COMMON_CPPFLAGS)
    8181
     
    9292
    9393include $(USPACE_PREFIX)/Makefile.common
    94 
    95 $(INCLUDE_LIBC): $(shell find ../c/include -name '*.h')
    96         cp -r -L --remove-destination -T ../c/include $@
    97         find ../c/include -type f -and -not -name '*.h' -delete
    9894
    9995export: $(EXPORT_DIR)/config.mk $(EXPORT_DIR)/config.rc
     
    122118        mkdir -p $(EXPORT_DIR)/include
    123119        rm -rf $(EXPORT_DIR)/include.new
    124         cp -r -L -T ./include/posix $(EXPORT_DIR)/include.new
    125         cp -r -L -T ./include/libc $(EXPORT_DIR)/include.new/libc
    126         cp -r -L ../c/arch/$(UARCH)/include/* $(EXPORT_DIR)/include.new/libc
     120        cp -r -L -T ./include $(EXPORT_DIR)/include.new
     121        cp -r -L ../c/arch/$(UARCH)/include/libarch $(EXPORT_DIR)/include.new/libc
    127122        cp -r -L $(ROOT_PATH)/abi/include/* $(EXPORT_DIR)/include.new
    128123        mkdir -p $(EXPORT_DIR)/include.new/libclui
    129124        cp -L ../clui/tinput.h $(EXPORT_DIR)/include.new/libclui
    130 
    131         find "$(EXPORT_DIR)/include.new/libc" "$(EXPORT_DIR)/include.new/libclui" -name '*.h' -exec sed \
    132                 -e 's:#include <:#include <libc/:' \
    133                 -e 's:#include <libc/abi/:#include <abi/:' \
    134                 -e 's:#include <libc/_bits/:#include <_bits/:' \
    135                 -e 's:#include <libc/libc/:#include <libc/:' \
    136                 -i {} \;
    137         find "$(EXPORT_DIR)/include.new" -name '*.h' -exec sed \
    138                 -e 's:#include "posix/:#include ":' \
    139                 -e 's:#include <posix/:#include <:' \
    140                 -i {} \;
    141 
    142125        rm -rf $(EXPORT_DIR)/include
    143126        mv $(EXPORT_DIR)/include.new $(EXPORT_DIR)/include
Note: See TracChangeset for help on using the changeset viewer.