source: rtems/cpukit/Makefile.am @ 89ac281

Last change on this file since 89ac281 was 2afb22b, checked in by Chris Johns <chrisj@…>, on Dec 23, 2017 at 7:18:56 AM

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.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1ACLOCAL_AMFLAGS = -I aclocal
2
3include $(top_srcdir)/automake/compile.am
4include $(top_srcdir)/automake/multilib.am
5
6# librtemscpu
7_SUBDIRS = . score rtems sapi posix
8_SUBDIRS += dev
9_SUBDIRS += dtc/libfdt
10_SUBDIRS += libcrypt
11_SUBDIRS += libcsupport libblock libfs
12_SUBDIRS += libdrvmgr
13_SUBDIRS += libnetworking librpc
14_SUBDIRS += libpci
15_SUBDIRS += libi2c
16_SUBDIRS += libmisc
17_SUBDIRS += libmd
18_SUBDIRS += libgnat
19_SUBDIRS += libdl
20_SUBDIRS += libstdthreads
21_SUBDIRS += libdebugger
22_SUBDIRS += wrapup
23
24_SUBDIRS += zlib
25
26# applications
27_SUBDIRS += ftpd
28_SUBDIRS += telnetd
29_SUBDIRS += pppd
30_SUBDIRS += mghttpd
31
32if LIBNETWORKING
33endif
34
35if LIBDL
36endif
37
38if LIBDEBUGGER
39endif
40
41if !LIBPCI
42endif
43## should be conditional and only installed for PowerPC, x86, and ARM
44## libfs
45## POSIX FIFO/pipe
46## devfs
47if LIBDOSFS
48endif
49
50# RFS
51# JFFS2
52## libblock
53## ftpd
54if LIBNETWORKING
55endif
56
57## bspcmdline
58## capture
59# tracing headers
60## cpuuse
61## devnull
62## dumpbuf
63## rtemsfdt
64## monitor
65## fb
66## mouse
67## libqos
68## redirector
69## shell
70if LIBSHELL
71endif
72
73## stringto
74## testsupport
75## i2c
76## serdbg
77if LIBSERDBG
78endif
79
80## stackchk
81## libuntar
82## fsmount
83## Driver manager
84if LIBDRVMGR
85endif
86
87if LIBGNAT
88endif
89
90## HACK: doxygen filter.
91EXTRA_DIST = doxy-filter
92
93include $(top_srcdir)/automake/subdirs.am
94include $(top_srcdir)/automake/local.am
95include $(srcdir)/headers.am
Note: See TracBrowser for help on using the repository browser.