#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 (84)

comment:1 Changed on 11/24/17 at 05:25:37 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 11/27/17 at 06:34:35 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 11/27/17 at 06:34:46 by Sebastian Huber <sebastian.huber@…>

In affb282/rtems:

bsps: Remove empty tm27.h variants

Update #3254.

comment:4 Changed on 11/27/17 at 06:34:58 by Sebastian Huber <sebastian.huber@…>

In 0d5c795/rtems:

Move Ada includes

Update #3254.

comment:5 Changed on 11/27/17 at 08:37:18 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 12/05/17 at 13:31:43 by Sebastian Huber <sebastian.huber@…>

In 61bd8cd6/rtems:

bsp/gen5200: Avoid duplicate header installation

Update #3254.

comment:7 Changed on 12/07/17 at 06:17:09 by Sebastian Huber <sebastian.huber@…>

In 28fb905/rtems:

bsps/powerpc: Fix mpc83xx_i2cdrv.h location

Update #3254.

comment:8 Changed on 12/07/17 at 06:24:20 by Sebastian Huber <sebastian.huber@…>

In 3f575da/rtems:

Remove obsolete network header files

Update #3254.

comment:9 Changed on 12/07/17 at 10:50:19 by Sebastian Huber <sebastian.huber@…>

In 7704f1a/rtems:

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

Update #3254.

comment:10 Changed on 12/08/17 at 12:06:17 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 12/08/17 at 12:06:32 by Sebastian Huber <sebastian.huber@…>

In e9d6114/rtems:

bsp/gumstix: Move libcpu files to BSP

Update #3254.

comment:12 Changed on 12/08/17 at 12:06:46 by Sebastian Huber <sebastian.huber@…>

In 586c70ad/rtems:

bsps/arm: Remove obsolete s3c2400

Update #3254.

comment:13 Changed on 12/08/17 at 12:06:58 by Sebastian Huber <sebastian.huber@…>

In 26ff9fd6/rtems:

bsp/csb336: Move libcpu files to BSP

Update #3254.

comment:14 Changed on 12/08/17 at 12:07:10 by Sebastian Huber <sebastian.huber@…>

In 7829710/rtems:

bsp/rtl22xx: Move libcpu files to BSP

Update #3254.

comment:15 Changed on 12/08/17 at 12:07:23 by Sebastian Huber <sebastian.huber@…>

In a1460043/rtems:

bsp/smdk2410: Move libcpu files to BSP

Update #3254.

comment:16 Changed on 12/08/17 at 12:07:35 by Sebastian Huber <sebastian.huber@…>

In b748dffe/rtems:

bsp/csb337: Move libcpu files to BSP

Update #3254.

comment:17 Changed on 12/08/17 at 13:14:12 by Sebastian Huber <sebastian.huber@…>

In 604f080c/rtems:

bsp/shsim: Move libcpu files to BSP

Update #3254.

comment:18 Changed on 12/08/17 at 13:14:25 by Sebastian Huber <sebastian.huber@…>

In b850e7f/rtems:

bsp/gensh1: Move libcpu files to BSP

Update #3254.

comment:19 Changed on 12/08/17 at 13:14:39 by Sebastian Huber <sebastian.huber@…>

In 533e2c0/rtems:

bsp/gensh2: Move libcpu files to BSP

Update #3254.

comment:20 Changed on 12/08/17 at 13:14:51 by Sebastian Huber <sebastian.huber@…>

In f2969b5/rtems:

bsp/gensh4: Move libcpu files to BSP

Update #3254.

comment:21 Changed on 12/13/17 at 08:07:50 by Sebastian Huber <sebastian.huber@…>

In 8e8cf72/rtems:

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

Update #3254.

comment:22 Changed on 12/13/17 at 08:08:02 by Sebastian Huber <sebastian.huber@…>

In 6ad3f471/rtems:

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

Update #3254.

comment:23 Changed on 12/13/17 at 08:08:14 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 12/13/17 at 08:08:27 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 12/13/17 at 08:08:39 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 12/13/17 at 08:08:50 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 12/13/17 at 08:09:02 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 12/13/17 at 08:09:14 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 12/13/17 at 08:09:26 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 12/13/17 at 08:09:39 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 12/13/17 at 08:09:50 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 12/13/17 at 08:10:02 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 12/13/17 at 08:10:14 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 12/13/17 at 08:10:26 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 12/13/17 at 08:10:38 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 12/13/17 at 08:10:50 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 12/13/17 at 08:11:03 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 12/13/17 at 08:11:15 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 12/13/17 at 08:26:41 by Sebastian Huber <sebastian.huber@…>

In 241fc046/rtems:

zlib: Do not generate zconf.h

Update #3254.

comment:40 Changed on 12/13/17 at 08:33:00 by Sebastian Huber <sebastian.huber@…>

In d19e7aab/rtems:

zlib: Fix build

Update #3254.

comment:41 Changed on 12/14/17 at 07:13:31 by Sebastian Huber <sebastian.huber@…>

In 12641f7b/rtems:

epiphany: Remove superfluous includes

Update #3254.

comment:42 Changed on 12/15/17 at 06:23:48 by Sebastian Huber <sebastian.huber@…>

In 2717032d/rtems:

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

Update #3254.

comment:43 Changed on 01/04/18 at 06:19:08 by Sebastian Huber <sebastian.huber@…>

In f3ce8f41/rtems:

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

Update #3254.

comment:44 Changed on 01/04/18 at 06:19:21 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 01/04/18 at 06:19:35 by Sebastian Huber <sebastian.huber@…>

In ec32100/rtems:

bsps: Use CPPASCOMPILE for startfile

Update #3254.

comment:46 Changed on 01/04/18 at 06:19:59 by Sebastian Huber <sebastian.huber@…>

In e1c0d67/rtems:

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

Update #3254.
Update #3268.

comment:47 Changed on 01/04/18 at 06:20:11 by Sebastian Huber <sebastian.huber@…>

In 7190005/rtems:

sparc: Move <libcpu/byteorder.h>

Update #3254.
Update #3260.

comment:48 Changed on 01/04/18 at 06:20:23 by Sebastian Huber <sebastian.huber@…>

In 3b392b6/rtems:

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

Update #3254.
Update #3260.

comment:49 Changed on 01/04/18 at 06:20:36 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 01/04/18 at 06:20:49 by Sebastian Huber <sebastian.huber@…>

In 4e100058/rtems:

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

Update #3254.
Update #3260.

comment:51 Changed on 01/04/18 at 06:21:02 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 01/04/18 at 06:21:14 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 01/05/18 at 10:58:11 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 01/05/18 at 10:58:22 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 01/05/18 at 10:58:46 by Chris Johns <chrisj@…>

In 3eed4f3/rtems:

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

Update #3254.

comment:56 Changed on 01/05/18 at 10:58:57 by Chris Johns <chrisj@…>

In 1efd148b/rtems:

bsp/pc386: Use public include path

Update #3254.

comment:57 Changed on 01/05/18 at 10:59:09 by Chris Johns <chrisj@…>

In 9c91520/rtems:

bsps/lm32: Use public include path

Update #3254.

comment:58 Changed on 01/05/18 at 10:59:22 by Chris Johns <chrisj@…>

In caeaae26/rtems:

bsp/gen5200: Use public include path

Update #3254.

comment:59 Changed on 01/05/18 at 10:59:34 by Chris Johns <chrisj@…>

In 230acc55/rtems:

libchip: Use public include path

Update #3254.

comment:60 Changed on 01/05/18 at 10:59:46 by Chris Johns <chrisj@…>

In e2cf289/rtems:

bsp/mcf548x: Use public include path

Update #3254.

comment:61 Changed on 01/05/18 at 10:59:58 by Chris Johns <chrisj@…>

In 010bf86/rtems:

bsps/powerpc: Use public include path

Update #3254.

comment:62 Changed on 01/05/18 at 11:00:11 by Chris Johns <chrisj@…>

In 9dd2fdb9/rtems:

bsps/bfin: Use public include path

Update #3254.

comment:63 Changed on 01/05/18 at 11:00:23 by Chris Johns <chrisj@…>

In 3964329/rtems:

bsp/beatnik: Use public include path

Update #3254.

comment:64 Changed on 01/05/18 at 11:00:35 by Chris Johns <chrisj@…>

In 731abf4/rtems:

bsp/mvme3100: Use public include path

Update #3254.

comment:65 Changed on 01/05/18 at 11:00:47 by Chris Johns <chrisj@…>

In 26ac19c/rtems:

bsps/powerpc: Use public include path

Update #3254.

comment:66 Changed on 01/05/18 at 11:00:59 by Chris Johns <chrisj@…>

In f4dc9737/rtems:

bsps: Use public include path

Update #3254.

comment:67 Changed on 01/05/18 at 11:01:11 by Chris Johns <chrisj@…>

In 8428b40/rtems:

bsp/edb7312: Use public include path

Update #3254.

comment:68 Changed on 01/05/18 at 11:01:23 by Chris Johns <chrisj@…>

In 816f999f/rtems:

bsps/i386: Fix AC_CONFIG_SRCDIR()

Update #3254.

comment:69 Changed on 01/05/18 at 11:01:35 by Chris Johns <chrisj@…>

In a7b0da2/rtems:

bsps/mips: Fix AC_CONFIG_SRCDIR()

Update #3254.

comment:70 Changed on 01/05/18 at 11:01:47 by Sebastian Huber <sebastian.huber@…>

In 7cd389e/rtems:

bsps/m68k: Install shared <mvme16x_hw.h>

Update #3254.

comment:71 Changed on 01/15/18 at 06:26:20 by Sebastian Huber <sebastian.huber@…>

In a67f44c/rtems:

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

Update #3254.

comment:72 Changed on 01/15/18 at 06:26:32 by Sebastian Huber <sebastian.huber@…>

In 4b12436/rtems:

libchip: Use public include path

Update #3254.

comment:73 Changed on 01/15/18 at 06:26:44 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 01/16/18 at 09:44:27 by Sebastian Huber <sebastian.huber@…>

In 47cc206/rtems:

bsps/powerpc: Move BSP specific file to BSP

Update #3254.

comment:75 Changed on 01/22/18 at 06:06:19 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 01/22/18 at 09:38:31 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 01/22/18 at 12:17:07 by Sebastian Huber <sebastian.huber@…>

In e79bb0c3/rtems:

bsp/gen5200: Use public include path

Update #3254.

comment:78 Changed on 01/25/18 at 09:17:03 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 03/09/18 at 07:44:27 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 03/21/18 at 06:59:00 by Sebastian Huber

Resolution: fixed
Status: newclosed

The header reorganization is complete.

comment:81 Changed on 03/28/18 at 05:21:29 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 04/11/18 at 03:28:15 by Chris Johns <chrisj@…>

In b8c59353/rtems:

build: Fix make clean.

Update #3254.

comment:83 Changed on 11/08/18 at 15:26:52 by Sebastian Huber <sebastian.huber@…>

In edc4ff6/rtems-docs:

user: Remove obsolete boostrap -p step

Update #3254.

comment:84 Changed on 12/14/18 at 06:04:11 by Sebastian Huber <sebastian.huber@…>

In 6b0a729b/rtems:

build: Remove ampolish3

Update #3254.

Note: See TracTickets for help on using tickets.