source: rtems/testsuites/psxtests/configure.ac @ 48aa4b5d

5
Last change on this file since 48aa4b5d was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

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: 5.6 KB
Line 
1## Process this file with autoconf to produce a configure script.
2
3AC_PREREQ([2.69])
4AC_INIT([rtems-c-src-tests-psxtests],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
5AC_CONFIG_SRCDIR([psx01])
6AC_CONFIG_HEADER([config.h])
7RTEMS_TOP([../..],[..])
8RTEMS_SOURCE_TOP
9RTEMS_BUILD_TOP
10
11RTEMS_CANONICAL_TARGET_CPU
12
13AM_INIT_AUTOMAKE([no-define foreign 1.12.2])
14AM_MAINTAINER_MODE
15
16RTEMS_ENABLE_CXX
17
18RTEMS_ENV_RTEMSBSP
19
20RTEMS_PROJECT_ROOT
21
22RTEMS_PROG_CC_FOR_TARGET
23RTEMS_PROG_CXX_FOR_TARGET
24
25RTEMS_CANONICALIZE_TOOLS
26
27RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
28RTEMS_CHECK_CXX(RTEMS_BSP)
29RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
30RTEMS_CHECK_CPUOPTS([RTEMS_NETWORKING])
31
32AM_CONDITIONAL(HAS_CXX,test "$rtems_cv_HAS_CPLUSPLUS" = "yes")
33AM_CONDITIONAL([HAS_NETWORKING],test "$rtems_cv_RTEMS_NETWORKING" = "yes")
34AM_CONDITIONAL([HAS_CPLUSPLUS],[test x"$HAS_CPLUSPLUS" = x"yes"])
35
36RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
37AM_CONDITIONAL(HAS_POSIX,test x"${rtems_cv_RTEMS_POSIX_API}" = x"yes")
38
39# FIXME: IEEE Std 1003.1-2008 mandates sys/mman.h,
40# but newlib doesn't have sys/mman.h
41AC_CHECK_HEADERS([sys/mman.h])
42
43# FIXME: newlib should supply declaration of pthread_rwlock_unlock()
44AC_CHECK_DECLS([pthread_rwlock_unlock],[],[],[[#include <pthread.h>]])
45
46# FIXME: newlib should supply declaration of pthread_atfork()
47AC_CHECK_DECLS([pthread_atfork],[],[],[[#include <pthread.h>]])
48
49# Added to pthreads after initial revision.  May not be in toolset
50AC_CHECK_DECLS([pthread_attr_getstack],[],[],[[#include <pthread.h>]])
51
52# Added to pthreads after initial revision.  May not be in toolset
53AC_CHECK_DECLS([pthread_attr_setstack],[],[],[[#include <pthread.h>]])
54
55# Added to pthreads after initial revision.  May not be in toolset
56AC_CHECK_DECLS([pthread_attr_getguardsize],[],[],[[#include <pthread.h>]])
57
58# Added to pthreads after initial revision.  May not be in toolset
59AC_CHECK_DECLS([pthread_attr_setguardsize],[],[],[[#include <pthread.h>]])
60
61# Added to newlib pthreads for RTEMS SMP (np), may not be present
62AC_CHECK_DECLS([pthread_attr_setaffinity_np],[],[],[[
63  #define _GNU_SOURCE
64  #include <pthread.h>]])
65
66# Added to newlib pthreads for RTEMS SMP (np), may not be present
67AC_CHECK_DECLS([pthread_attr_getaffinity_np],[],[],[[
68  #define _GNU_SOURCE
69  #include <pthread.h>]])
70
71# Added to newlib pthreads for RTEMS SMP (np), may not be present
72AC_CHECK_DECLS([pthread_setaffinity_np],[],[],[[
73  #define _GNU_SOURCE
74  #include <pthread.h>]])
75
76# Added to newlib pthreads for RTEMS SMP (np), may not be present
77AC_CHECK_DECLS([pthread_getaffinity_np],[],[],[[
78  #define _GNU_SOURCE
79  #include <pthread.h>]])
80
81# Added to newlib pthreads for RTEMS SMP (np), may not be present
82AC_CHECK_DECLS([pthread_getattr_np],[],[],[[
83  #define _GNU_SOURCE
84  #include <pthread.h>]])
85
86# Mandated by POSIX, not declared in some versions of newlib.
87AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h])
88
89# Mandated by POSIX, not declared in some versions of newlib.
90AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h])
91
92# FIXME: adjtime is a non-standardized BSD/Linux extension
93# RTEMS should not rely on adjtime
94AC_CHECK_DECLS([adjtime],[],[],[[#include <sys/time.h>]])
95
96# FIXME: IEEE Std 1003.1-2008 mandates mprotect in sys/mman.h,
97# RTEMS provides a stub, despite newlib doesn't have sys/mman.h
98AC_CHECK_DECLS([mprotect],[],[],[[#include <sys/mman.h>]])
99
100# FIXME: IEEE Std 1003.1-2008 mandates seteuid in unistd.h
101# RTEMS provides it, despite newlib doesn't declare it.
102AC_CHECK_DECLS([seteuid],[],[],[#include <unistd.h>])
103
104# FIXME: We should get rid of this. It's a cludge.
105AC_CHECK_SIZEOF([off_t])
106AC_CHECK_SIZEOF([blksize_t])
107AC_CHECK_SIZEOF([blkcnt_t])
108AC_CHECK_SIZEOF([time_t])
109AC_CHECK_SIZEOF([mode_t])
110
111# Explicitly list all Makefiles here
112AC_CONFIG_FILES([Makefile
113psx01/Makefile
114psx02/Makefile
115psx03/Makefile
116psx04/Makefile
117psx05/Makefile
118psx06/Makefile
119psx07/Makefile
120psx08/Makefile
121psx09/Makefile
122psx10/Makefile
123psx11/Makefile
124psx12/Makefile
125psx13/Makefile
126psx14/Makefile
127psx15/Makefile
128psx16/Makefile
129psxaio01/Makefile
130psxaio02/Makefile
131psxaio03/Makefile
132psxalarm01/Makefile
133psxautoinit01/Makefile
134psxautoinit02/Makefile
135psxbarrier01/Makefile
136psxcancel/Makefile
137psxcancel01/Makefile
138psxchroot01/Makefile
139psxclassic01/Makefile
140psxcleanup/Makefile
141psxcleanup01/Makefile
142psxcleanup02/Makefile
143psxclock/Makefile
144psxclock01/Makefile
145psxclockrealtime01/Makefile
146psxconcurrency01/Makefile
147psxcond01/Makefile
148psxcond02/Makefile
149psxconfig01/Makefile
150psxdevctl01/Makefile
151psxeintr_join/Makefile
152psxenosys/Makefile
153psxfatal01/Makefile
154psxfatal02/Makefile
155psxfchx01/Makefile
156psxfile01/Makefile
157psxfile02/Makefile
158psxfilelock01/Makefile
159psxgetattrnp01/Makefile
160psxgetrusage01/Makefile
161psxglobalcon01/Makefile
162psxglobalcon02/Makefile
163psxhdrs/Makefile
164psxid01/Makefile
165psximfs01/Makefile
166psximfs02/Makefile
167psxintrcritical01/Makefile
168psxitimer/Makefile
169psxkey01/Makefile
170psxkey02/Makefile
171psxkey03/Makefile
172psxkey04/Makefile
173psxkey05/Makefile
174psxkey06/Makefile
175psxkey07/Makefile
176psxkey08/Makefile
177psxkey09/Makefile
178psxkey10/Makefile
179psxmount/Makefile
180psxmsgq01/Makefile
181psxmsgq02/Makefile
182psxmsgq03/Makefile
183psxmsgq04/Makefile
184psxmutexattr01/Makefile
185psxobj01/Makefile
186psxonce01/Makefile
187psxpasswd01/Makefile
188psxpasswd02/Makefile
189psxpipe01/Makefile
190psxrdwrv/Makefile
191psxreaddir/Makefile
192psxrwlock01/Makefile
193psxsem01/Makefile
194psxshm01/Makefile
195psxshm02/Makefile
196psxmmap01/Makefile
197psxsignal01/Makefile
198psxsignal02/Makefile
199psxsignal03/Makefile
200psxsignal04/Makefile
201psxsignal05/Makefile
202psxsignal06/Makefile
203psxspin01/Makefile
204psxstack01/Makefile
205psxstack02/Makefile
206psxstat/Makefile
207psxstrsignal01/Makefile
208psxsysconf/Makefile
209psxthreadname01/Makefile
210psxtime/Makefile
211psxtimer01/Makefile
212psxtimer02/Makefile
213psxtimes01/Makefile
214psxualarm/Makefile
215psxusleep/Makefile
216])
217AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.