Ignore:
Timestamp:
Dec 23, 2017, 7:18:56 AM (4 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
5, master
Children:
d8de6b9
Parents:
9704efb4
git-author:
Chris Johns <chrisj@…> (12/23/17 07:18:56)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/25/18 07:45:26)
Message:

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc64/usiii/Makefile.am

    r9704efb4 r2afb22b  
    55include $(top_srcdir)/../../bsp.am
    66
    7 include_bspdir = $(includedir)/bsp
    8 
    9 dist_project_lib_DATA = bsp_specs
    10 
    11 include_HEADERS = include/bsp.h
    12 include_HEADERS += include/tm27.h
    13 include_HEADERS += ../shared/include/asm.h
    14 include_HEADERS += ../shared/include/traptable.h
     7dist_project_lib_DATA = startup/bsp_specs
    158
    169## these are the include files used by the boot process from HelenOS Sparc64
    17 include_bootdir = $(includedir)/boot
    18 include_boot_HEADERS = \
    19   ../shared/helenos/boot/include/align.h \
    20   ../shared/helenos/boot/include/balloc.h \
    21   ../shared/helenos/boot/include/gentypes.h \
    22   ../shared/helenos/boot/include/main.h \
    23   ../shared/helenos/boot/include/ofwarch.h \
    24   ../shared/helenos/boot/include/ofw.h \
    25   ../shared/helenos/boot/include/ofw_tree.h \
    26   ../shared/helenos/boot/include/register.h \
    27   ../shared/helenos/boot/include/stack.h \
    28   ../shared/helenos/boot/include/types.h
    29 
    3010## These include files mimic the HelenOS kernel include layout, which
    3111## in HelenOS-0.4.2 is more complicated than the boot include dirs.
     
    3313# assumed by the HelenOS sources to be in the root includedir. We place them
    3414# in a kernel include directory.
    35 include_kerneldir = $(includedir)/kernel
    36 include_kernel_HEADERS = \
    37   ../shared/helenos/kernel/generic/include/align.h
    38 
    39 include_archdir = $(includedir)/arch
    40 include_arch_HEADERS = \
    41   ../shared/helenos/kernel/sparc64/include/arch.h \
    42   ../shared/helenos/kernel/sparc64/include/boot.h \
    43   ../shared/helenos/kernel/sparc64/include/regdef.h \
    44   ../shared/helenos/kernel/sparc64/include/stack.h
    45 
    46 include_arch_sun4udir = $(includedir)/arch/sun4u
    47 include_arch_sun4u_HEADERS = \
    48   ../shared/helenos/kernel/sparc64/include/sun4u/arch.h
    49 
    50 include_arch_mmdir = $(includedir)/arch/mm
    51 include_arch_mm_HEADERS = \
    52   ../shared/helenos/kernel/sparc64/include/mm/cache_spec.h \
    53   ../shared/helenos/kernel/sparc64/include/mm/frame.h \
    54   ../shared/helenos/kernel/sparc64/include/mm/mmu.h \
    55   ../shared/helenos/kernel/sparc64/include/mm/page.h \
    56   ../shared/helenos/kernel/sparc64/include/mm/tlb.h \
    57   ../shared/helenos/kernel/sparc64/include/mm/tte.h
    5815
    5916
    60 include_arch_mm_sun4udir = $(includedir)/arch/mm/sun4u
    61 include_arch_mm_sun4u_HEADERS = \
    62   ../shared/helenos/kernel/sparc64/include/mm/sun4u/frame.h \
    63   ../shared/helenos/kernel/sparc64/include/mm/sun4u/mmu.h \
    64   ../shared/helenos/kernel/sparc64/include/mm/sun4u/page.h \
    65   ../shared/helenos/kernel/sparc64/include/mm/sun4u/tlb.h \
    66   ../shared/helenos/kernel/sparc64/include/mm/sun4u/tte.h
    67 
    68 include_genarch_ofwdir = $(includedir)/genarch/ofw
    69 include_genarch_ofw_HEADERS = \
    70   ../shared/helenos/kernel/genarch/include/ofw/ofw_tree.h
    71 
    72 
    73 nodist_include_HEADERS = include/bspopts.h   
    74 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
    7517DISTCLEANFILES = include/bspopts.h
    7618noinst_PROGRAMS =
     
    12870      ../../../libcpu/@RTEMS_CPU@/shared/sparc64-syscall.rel
    12971
    130 include $(srcdir)/preinstall.am
    13172include $(top_srcdir)/../../../../automake/local.am
     73include $(srcdir)/../../../../../../bsps/sparc64/usiii/headers.am
Note: See TracChangeset for help on using the changeset viewer.