#3254 closed enhancement (fixed)

Reorganize header files to avoid "make preinstall"

Reported by: Sebastian Huber Owned by:
Priority: normal Milestone: 5.1
Component: build Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description


Change History (83)

comment:1 Changed on Nov 24, 2017 at 5:25:37 AM by Chris Johns

Solving this problem requires:

  1. Capturing the installed headers files with an MD5 checksum so each can be clearly identified in the source tree.
  2. Capturing the preinstall view of the process with the install path and a source tree path.
  3. Defining the include paths in RTEMS and any macros required to reference the header within that tree.

For each preinstall header we need to collate the source headers and determine what overlaps. With the define directories we want to have we can determine the moves we need. I am getting close to having this data.

comment:2 Changed on Nov 27, 2017 at 6:34:35 AM by Sebastian Huber <sebastian.huber@…>

In e58e29f/rtems:

Remove coverhd.h

This header file contained timing overhead values which are hard to
maintain.

Update #3254.

comment:3 Changed on Nov 27, 2017 at 6:34:46 AM by Sebastian Huber <sebastian.huber@…>

In affb282/rtems:

bsps: Remove empty tm27.h variants

Update #3254.

comment:4 Changed on Nov 27, 2017 at 6:34:58 AM by Sebastian Huber <sebastian.huber@…>

In 0d5c795/rtems:

Move Ada includes

Update #3254.

comment:5 Changed on Nov 27, 2017 at 8:37:18 AM by Sebastian Huber <sebastian.huber@…>

In 642ef00/rtems:

bsps: Provide <tm27.h> in each BSP

Since the <tm27.h> is highly BSP-dependent and used only by the tm27
test program we must provide this header file for each BSP. Without the
preinstall build target each header file must have a unique source
header file.

Update #3254.

comment:6 Changed on Dec 5, 2017 at 1:31:43 PM by Sebastian Huber <sebastian.huber@…>

In 61bd8cd6/rtems:

bsp/gen5200: Avoid duplicate header installation

Update #3254.

comment:7 Changed on Dec 7, 2017 at 6:17:09 AM by Sebastian Huber <sebastian.huber@…>

In 28fb905/rtems:

bsps/powerpc: Fix mpc83xx_i2cdrv.h location

Update #3254.

comment:8 Changed on Dec 7, 2017 at 6:24:20 AM by Sebastian Huber <sebastian.huber@…>

In 3f575da/rtems:

Remove obsolete network header files

Update #3254.

comment:9 Changed on Dec 7, 2017 at 10:50:19 AM by Sebastian Huber <sebastian.huber@…>

In 7704f1a/rtems:

bsps/or1k: Avoid <libcpu/cache.h>

Update #3254.

comment:10 Changed on Dec 8, 2017 at 12:06:17 PM by Sebastian Huber <sebastian.huber@…>

In 102fd7c9/rtems:

bsps: Do not install <libcpu/cache.h>

This is a cache manager implementation header file.

Update #3254.

comment:11 Changed on Dec 8, 2017 at 12:06:32 PM by Sebastian Huber <sebastian.huber@…>

In e9d6114/rtems:

bsp/gumstix: Move libcpu files to BSP

Update #3254.

comment:12 Changed on Dec 8, 2017 at 12:06:46 PM by Sebastian Huber <sebastian.huber@…>

In 586c70ad/rtems:

bsps/arm: Remove obsolete s3c2400

Update #3254.

comment:13 Changed on Dec 8, 2017 at 12:06:58 PM by Sebastian Huber <sebastian.huber@…>

In 26ff9fd6/rtems:

bsp/csb336: Move libcpu files to BSP

Update #3254.

comment:14 Changed on Dec 8, 2017 at 12:07:10 PM by Sebastian Huber <sebastian.huber@…>

In 7829710/rtems:

bsp/rtl22xx: Move libcpu files to BSP

Update #3254.

comment:15 Changed on Dec 8, 2017 at 12:07:23 PM by Sebastian Huber <sebastian.huber@…>

In a1460043/rtems:

bsp/smdk2410: Move libcpu files to BSP

Update #3254.

comment:16 Changed on Dec 8, 2017 at 12:07:35 PM by Sebastian Huber <sebastian.huber@…>

In b748dffe/rtems:

bsp/csb337: Move libcpu files to BSP

Update #3254.

comment:17 Changed on Dec 8, 2017 at 1:14:12 PM by Sebastian Huber <sebastian.huber@…>

In 604f080c/rtems:

bsp/shsim: Move libcpu files to BSP

Update #3254.

comment:18 Changed on Dec 8, 2017 at 1:14:25 PM by Sebastian Huber <sebastian.huber@…>

In b850e7f/rtems:

bsp/gensh1: Move libcpu files to BSP

Update #3254.

comment:19 Changed on Dec 8, 2017 at 1:14:39 PM by Sebastian Huber <sebastian.huber@…>

In 533e2c0/rtems:

bsp/gensh2: Move libcpu files to BSP

Update #3254.

comment:20 Changed on Dec 8, 2017 at 1:14:51 PM by Sebastian Huber <sebastian.huber@…>

In f2969b5/rtems:

bsp/gensh4: Move libcpu files to BSP

Update #3254.

comment:21 Changed on Dec 13, 2017 at 8:07:50 AM by Sebastian Huber <sebastian.huber@…>

In 8e8cf72/rtems:

arm: Move <libcpu/arm-cp15.h> to cpukit

Update #3254.

comment:22 Changed on Dec 13, 2017 at 8:08:02 AM by Sebastian Huber <sebastian.huber@…>

In 6ad3f471/rtems:

libdebugger: Avoid use of <bsp/linker-symbols.h>

Update #3254.

comment:23 Changed on Dec 13, 2017 at 8:08:14 AM by Sebastian Huber <sebastian.huber@…>

In a397c7d8/rtems:

IMFS: Include <rtems/imfs.h>

Prepare for header file move to common include directory.

Update #3254.

comment:24 Changed on Dec 13, 2017 at 8:08:27 AM by Sebastian Huber <sebastian.huber@…>

In 339069fc/rtems:

devfs: Include <rtems/devfs.h>

Prepare for header file move to common include directory.

Update #3254.

comment:25 Changed on Dec 13, 2017 at 8:08:39 AM by Sebastian Huber <sebastian.huber@…>

In 51a30a4/rtems:

ftpd: Include <rtems/ftpd.h>

Prepare for header file move to common include directory.

Update #3254.

comment:26 Changed on Dec 13, 2017 at 8:08:50 AM by Sebastian Huber <sebastian.huber@…>

In 7683da8/rtems:

dosfs: Include <rtems/dosfs.h>

Prepare for header file move to common include directory.

Update #3254.

comment:27 Changed on Dec 13, 2017 at 8:09:02 AM by Sebastian Huber <sebastian.huber@…>

In 7d9455e/rtems:

pipe: Include <rtems/pipe.h>

Prepare for header file move to common include directory.

Update #3254.

comment:28 Changed on Dec 13, 2017 at 8:09:14 AM by Sebastian Huber <sebastian.huber@…>

In 990adc5/rtems:

libdl: Include <rtems/rtl/rtl-*.h>

Prepare for header file move to common include directory.

Update #3254.

comment:29 Changed on Dec 13, 2017 at 8:09:26 AM by Sebastian Huber <sebastian.huber@…>

In 295ca7d/rtems:

RFS: Include <rtems/rtems-rfs-shell.h>

Prepare for header file move to common include directory.

Update #3254.

comment:30 Changed on Dec 13, 2017 at 8:09:39 AM by Sebastian Huber <sebastian.huber@…>

In 249730de/rtems:

capture: Include <rtems/captureimpl.h>

Prepare for header file move to common include directory.

Update #3254.

comment:31 Changed on Dec 13, 2017 at 8:09:50 AM by Sebastian Huber <sebastian.huber@…>

In 47f236c6/rtems:

monitor: Include <rtems/monitor.h>

Prepare for header file move to common include directory.

Update #3254.

comment:32 Changed on Dec 13, 2017 at 8:10:02 AM by Sebastian Huber <sebastian.huber@…>

In 4a23aa45/rtems:

shell: Include <rtems/shell.h>

Prepare for header file move to common include directory.

Update #3254.

comment:33 Changed on Dec 13, 2017 at 8:10:14 AM by Sebastian Huber <sebastian.huber@…>

In a1626726/rtems:

redirector: Include <rtems/stdio-redirect.h>

Prepare for header file move to common include directory.

Update #3254.

comment:34 Changed on Dec 13, 2017 at 8:10:26 AM by Sebastian Huber <sebastian.huber@…>

In f666fc59/rtems:

utf8proc: Include <utf8proc/utf8proc.h>

Prepare for header file move to common include directory.

Update #3254.

comment:35 Changed on Dec 13, 2017 at 8:10:38 AM by Sebastian Huber <sebastian.huber@…>

In edfdc42/rtems:

uuid: Include <uuid/uuid.h>

Prepare for header file move to common include directory.

Update #3254.

comment:36 Changed on Dec 13, 2017 at 8:10:50 AM by Sebastian Huber <sebastian.huber@…>

In 9589755f/rtems:

mghttpd: Include <mghttpd/mongoose.h>

Prepare for header file move to common include directory.

Update #3254.

comment:37 Changed on Dec 13, 2017 at 8:11:03 AM by Sebastian Huber <sebastian.huber@…>

In 5346fa87/rtems:

pppd: Include <rtems/rtems*.h>

Prepare for header file move to common include directory.

Update #3254.

comment:38 Changed on Dec 13, 2017 at 8:11:15 AM by Sebastian Huber <sebastian.huber@…>

In 94e04b5/rtems:

telnetd: Include <rtems/passwd.h>

Prepare for header file move to common include directory.

Update #3254.

comment:39 Changed on Dec 13, 2017 at 8:26:41 AM by Sebastian Huber <sebastian.huber@…>

In 241fc046/rtems:

zlib: Do not generate zconf.h

Update #3254.

comment:40 Changed on Dec 13, 2017 at 8:33:00 AM by Sebastian Huber <sebastian.huber@…>

In d19e7aab/rtems:

zlib: Fix build

Update #3254.

comment:41 Changed on Dec 14, 2017 at 7:13:31 AM by Sebastian Huber <sebastian.huber@…>

In 12641f7b/rtems:

epiphany: Remove superfluous includes

Update #3254.

comment:42 Changed on Dec 15, 2017 at 6:23:48 AM by Sebastian Huber <sebastian.huber@…>

In 2717032d/rtems:

bsps/arm: Fix move <libcpu/arm-cp15.h> to cpukit

Update #3254.

comment:43 Changed on Jan 4, 2018 at 6:19:08 AM by Sebastian Huber <sebastian.huber@…>

In f3ce8f41/rtems:

bsps: Include bsp.am in all BSP Makefile.am

Update #3254.

comment:44 Changed on Jan 4, 2018 at 6:19:21 AM by Sebastian Huber <sebastian.huber@…>

In 33a2faa/rtems:

bsps: Add EXTRA_DIST to all BSP Makefile.am

This makes it possible to easily use

EXTRA_DIST += foobar

in fragments.

Update #3254.

comment:45 Changed on Jan 4, 2018 at 6:19:35 AM by Sebastian Huber <sebastian.huber@…>

In ec32100/rtems:

bsps: Use CPPASCOMPILE for startfile

Update #3254.

comment:46 Changed on Jan 4, 2018 at 6:19:59 AM by Sebastian Huber <sebastian.huber@…>

In e1c0d67/rtems:

bsp/mpc55xxevb: Move <bsp/irq.h>

Update #3254.
Update #3268.

comment:47 Changed on Jan 4, 2018 at 6:20:11 AM by Sebastian Huber <sebastian.huber@…>

In 7190005/rtems:

sparc: Move <libcpu/byteorder.h>

Update #3254.
Update #3260.

comment:48 Changed on Jan 4, 2018 at 6:20:23 AM by Sebastian Huber <sebastian.huber@…>

In 3b392b6/rtems:

sparc: Remove BSP specifics from <pci/access.h>

Update #3254.
Update #3260.

comment:49 Changed on Jan 4, 2018 at 6:20:36 AM by Sebastian Huber <sebastian.huber@…>

In 569fd50/rtems:

sparc: Remove BSP specifics from <pci/irq.h>

Update #3254.
Update #3260.
Update #3269.

comment:50 Changed on Jan 4, 2018 at 6:20:49 AM by Sebastian Huber <sebastian.huber@…>

In 4e100058/rtems:

sparc: Remove <bsp.h> from PCI shell command

Update #3254.
Update #3260.

comment:51 Changed on Jan 4, 2018 at 6:21:02 AM by Sebastian Huber <sebastian.huber@…>

In fb01816b/rtems:

bsps/powerpc: Move shared irq.h

This header file is only used by motorola_powerpc, so not shared.

Update #3254.
Update #3268.

comment:52 Changed on Jan 4, 2018 at 6:21:14 AM by Sebastian Huber <sebastian.huber@…>

In 375e923d/rtems:

bsps/powerpc: Rename BSP specific linkcmds.base

Avoid name conflicts with shared linkcmds.base.

Update #3254.

comment:53 Changed on Jan 5, 2018 at 10:58:11 AM by Sebastian Huber <sebastian.huber@…>

In f636e91a/rtems:

bsp/pc386: Do not install console_private.h

The name suggests that this is a private implementation header file.

Update #3254.

comment:54 Changed on Jan 5, 2018 at 10:58:22 AM by Chris Johns <chrisj@…>

In 6897cb1/rtems:

bsps: Add AM_CPPFLAGS to special case CPPFLAGS

This is necessary to pick up mandatory flags provided by the build
system.

Update #3254.

comment:55 Changed on Jan 5, 2018 at 10:58:46 AM by Chris Johns <chrisj@…>

In 3eed4f3/rtems:

bsp/altera-cyclone-v: Use public include path

Update #3254.

comment:56 Changed on Jan 5, 2018 at 10:58:57 AM by Chris Johns <chrisj@…>

In 1efd148b/rtems:

bsp/pc386: Use public include path

Update #3254.

comment:57 Changed on Jan 5, 2018 at 10:59:09 AM by Chris Johns <chrisj@…>

In 9c91520/rtems:

bsps/lm32: Use public include path

Update #3254.

comment:58 Changed on Jan 5, 2018 at 10:59:22 AM by Chris Johns <chrisj@…>

In caeaae26/rtems:

bsp/gen5200: Use public include path

Update #3254.

comment:59 Changed on Jan 5, 2018 at 10:59:34 AM by Chris Johns <chrisj@…>

In 230acc55/rtems:

libchip: Use public include path

Update #3254.

comment:60 Changed on Jan 5, 2018 at 10:59:46 AM by Chris Johns <chrisj@…>

In e2cf289/rtems:

bsp/mcf548x: Use public include path

Update #3254.

comment:61 Changed on Jan 5, 2018 at 10:59:58 AM by Chris Johns <chrisj@…>

In 010bf86/rtems:

bsps/powerpc: Use public include path

Update #3254.

comment:62 Changed on Jan 5, 2018 at 11:00:11 AM by Chris Johns <chrisj@…>

In 9dd2fdb9/rtems:

bsps/bfin: Use public include path

Update #3254.

comment:63 Changed on Jan 5, 2018 at 11:00:23 AM by Chris Johns <chrisj@…>

In 3964329/rtems:

bsp/beatnik: Use public include path

Update #3254.

comment:64 Changed on Jan 5, 2018 at 11:00:35 AM by Chris Johns <chrisj@…>

In 731abf4/rtems:

bsp/mvme3100: Use public include path

Update #3254.

comment:65 Changed on Jan 5, 2018 at 11:00:47 AM by Chris Johns <chrisj@…>

In 26ac19c/rtems:

bsps/powerpc: Use public include path

Update #3254.

comment:66 Changed on Jan 5, 2018 at 11:00:59 AM by Chris Johns <chrisj@…>

In f4dc9737/rtems:

bsps: Use public include path

Update #3254.

comment:67 Changed on Jan 5, 2018 at 11:01:11 AM by Chris Johns <chrisj@…>

In 8428b40/rtems:

bsp/edb7312: Use public include path

Update #3254.

comment:68 Changed on Jan 5, 2018 at 11:01:23 AM by Chris Johns <chrisj@…>

In 816f999f/rtems:

bsps/i386: Fix AC_CONFIG_SRCDIR()

Update #3254.

comment:69 Changed on Jan 5, 2018 at 11:01:35 AM by Chris Johns <chrisj@…>

In a7b0da2/rtems:

bsps/mips: Fix AC_CONFIG_SRCDIR()

Update #3254.

comment:70 Changed on Jan 5, 2018 at 11:01:47 AM by Sebastian Huber <sebastian.huber@…>

In 7cd389e/rtems:

bsps/m68k: Install shared <mvme16x_hw.h>

Update #3254.

comment:71 Changed on Jan 15, 2018 at 6:26:20 AM by Sebastian Huber <sebastian.huber@…>

In a67f44c/rtems:

bsps/lm32: Do not include network headers in bsp.h

Update #3254.

comment:72 Changed on Jan 15, 2018 at 6:26:32 AM by Sebastian Huber <sebastian.huber@…>

In 4b12436/rtems:

libchip: Use public include path

Update #3254.

comment:73 Changed on Jan 15, 2018 at 6:26:44 AM by Sebastian Huber <sebastian.huber@…>

In 0d08844/rtems:

bsps: Add AM_CPPFLAGS to special case CPPFLAGS

This is necessary to pick up mandatory flags provided by the build
system.

Update #3254.

comment:74 Changed on Jan 16, 2018 at 9:44:27 AM by Sebastian Huber <sebastian.huber@…>

In 47cc206/rtems:

bsps/powerpc: Move BSP specific file to BSP

Update #3254.

comment:75 Changed on Jan 22, 2018 at 6:06:19 AM by Sebastian Huber <sebastian.huber@…>

In d898f6e/rtems:

bsp/gen5200: Fix i2c.h and i2cdrv.h installation

Install these files only as <bsp/i2c.h> and <bsp/i2cdrv.h>.

Update #3254.

comment:76 Changed on Jan 22, 2018 at 9:38:31 AM by Sebastian Huber <sebastian.huber@…>

In 17fd0ff/rtems:

bsps: Move wd80x3.h to libchip/wd80x3.h

This header is used also by the motorola_powerpc BSP.

Update #3254.

comment:77 Changed on Jan 22, 2018 at 12:17:07 PM by Sebastian Huber <sebastian.huber@…>

In e79bb0c3/rtems:

bsp/gen5200: Use public include path

Update #3254.

comment:78 Changed on Jan 25, 2018 at 9:17:03 AM by Chris Johns <chrisj@…>

In 2afb22b/rtems:

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.

comment:79 Changed on Mar 9, 2018 at 7:44:27 AM by Sebastian Huber <sebastian.huber@…>

In 16f4661f/rtems:

network: Optionally install network headers

Install the network headers only if --enable-networking is specified.

Update #3254.

comment:80 Changed on Mar 21, 2018 at 6:59:00 AM by Sebastian Huber

Resolution: fixed
Status: newclosed

The header reorganization is complete.

comment:81 Changed on Mar 28, 2018 at 5:21:29 AM by Sebastian Huber <sebastian.huber@…>

In fc9db4c/rtems-docs:

user: Do not mention "bootstrap -p"

It is now obsolete and was never necessary for an RTEMS users.

Update #3254.

comment:82 Changed on Apr 11, 2018 at 3:28:15 AM by Chris Johns <chrisj@…>

In b8c59353/rtems:

build: Fix make clean.

Update #3254.

comment:83 Changed on Nov 8, 2018 at 3:26:52 PM by Sebastian Huber <sebastian.huber@…>

In edc4ff6/rtems-docs:

user: Remove obsolete boostrap -p step

Update #3254.

Note: See TracTickets for help on using tickets.