The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/conf/kern.fwd.mk

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 # Create forwarding headers for ${SYSDIR}/cpu/${MACHINE_ARCH}/*.h in
    2 # ${_MACHINE_FWD}/include/machine and share the directory among module build
    3 # directories.
    4 # Define _MACHINE_FWD before inclusion of this file.
    5 .if !defined(_MACHINE_FWD)
    6 .error you must define _MACHINE_FWD in which to generate forwarding headers.
    7 .endif
    8 
    9 # _FWDHDRS fills in missing <machine/BLAH.h> headers from <cpu/BLAH.h>,
   10 # allowing us to omit forwarding-only header files in each platform
   11 # architecture's machine/ directory.
   12 #
   13 _cpu_hdrs!=     echo ${SYSDIR}/cpu/${MACHINE_ARCH}/include/*.h
   14 _FWDHDRS=
   15 .for _h in ${_cpu_hdrs}
   16 _fwd:=  ${_MACHINE_FWD}/include/machine/${_h:T}
   17 _FWDHDRS:=      ${_FWDHDRS} ${_fwd}
   18 ${_fwd}: ${_h}
   19 .endfor
   20 
   21 # _LHDRS mimics _LHDRS from /usr/src/include/Makefile, directly linking
   22 # sys/BLAH.h as <BLAH.h> for certain header files.  These are used to
   23 # mimic a standard user include topology.  Only the virtual kernel
   24 # build uses these.  e.g. in order for #include <fcntl.h> to work.
   25 #
   26 _lhdrs= aio.h errno.h fcntl.h linker_set.h poll.h syslog.h \
   27         termios.h ucontext.h
   28 _LHDRS=
   29 .for _h in ${_lhdrs}
   30 _fwd:=  ${_MACHINE_FWD}/include/${_h}
   31 _LHDRS:=        ${_LHDRS} ${_fwd}
   32 ${_fwd}: ${SYSDIR}/sys/${_h}
   33 .endfor
   34 
   35 .ORDER: ${_MACHINE_FWD}/include/machine ${_FWDHDRS} ${_LHDRS}
   36 
   37 ${_MACHINE_FWD} ${_MACHINE_FWD}/include/machine:
   38         @mkdir -p ${.TARGET}
   39 
   40 FORWARD_HEADERS_COOKIE= ${_MACHINE_FWD}/.done
   41 ${FORWARD_HEADERS_COOKIE}: ${_MACHINE_FWD}/include/machine ${_FWDHDRS} ${_LHDRS}
   42         @touch ${.TARGET}
   43 
   44 ${_FWDHDRS}:
   45         @(echo "creating machine/ forwarding header ${.TARGET}" 1>&2; \
   46         echo "/*" ; \
   47         echo " * CONFIG-GENERATED FILE, DO NOT EDIT" ; \
   48         echo " */" ; \
   49         echo ; \
   50         echo "#ifndef _MACHINE_${.TARGET:T:S/./_/g:tu}_" ; \
   51         echo "#define _MACHINE_${.TARGET:T:S/./_/g:tu}_" ; \
   52         echo "#include <cpu/${.TARGET:T}>" ; \
   53         echo "#endif" ; \
   54         echo) > ${.TARGET}
   55 
   56 ${_LHDRS}:
   57         @(echo "creating sys/ forwarding header ${.TARGET}" 1>&2; \
   58         echo "/*" ; \
   59         echo " * CONFIG-GENERATED FILE, DO NOT EDIT" ; \
   60         echo " */" ; \
   61         echo ; \
   62         echo "#ifndef _${.TARGET:T:S/./_/g:tu}_" ; \
   63         echo "#define _${.TARGET:T:S/./_/g:tu}_" ; \
   64         echo "#include <sys/${.TARGET:T}>" ; \
   65         echo "#endif" ; \
   66         echo) > ${.TARGET}

Cache object: 91f787bd10a1476f481771ccc0a5eed9


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.